trouble converting from mysql
Thorsten Hohage
thohage at objectmanufactur.com
Mon Nov 5 01:46:13 CST 2007
Hi Joseph,
On 2007-11-05, at 06:11, Joseph Morgan wrote:
> Hello everyone,
>
> I am still working on the mysql>valentina switch.
>
> I have an existing primary key: "_RowID" for each table in the
> database.
>
> I need them to auto increment. I know I need some sort of ID that
> won't be reused
> because they correspond to user accounts and invoice id's that end
> users will see and use.
I think there come some transition issues all together.
First of all Valentina always have a "internal" column RecID for each
table created. This is ULong and of course you can use it, but not
change or re-define it.
Read more about it, e.g. <http://www.valentina-db.com/dokuwiki/doku.php?id=paradigma:public:en:documentation:vkernel:vfield:recid&s=recid
>
BUT when discussing DB-/ app-design there is one(!) philosophy, that
says NEVER, NEVER show the internal ID to any user at all and IMHO
there are several good reasons to not do it. E.g. each DB has it own
system of ID-keys. So when using e.g. my customer id separate from the
recID I can keep it while migrating from a db to another. Perhaps a
customer id could change, a recID never, ...
Managing "my" id's I use a set of stored procedures and propitiate
settings (indexed, not null). If you prefer to use a trigger on
creation, handle it in your app depends on your logic.
regards
Thorsten Hohage
--
objectmanufactur.com - Hamburg,Germany
More information about the Valentina
mailing list