J
Joerg Gippert
Hello all!
I´m working on a webapplication that makes use of a database. I used to
make use of the "autonumber" or "autoincrement" feature of the
underlying database system. However, I read in a Java "best practices"
book, that one should not rely on those features and the number
generated, could possibly *not* unique. So, I´m just thinking of how to
provide my own unique primary keys. The book mentioned above doesn´t
really say how to create your own unique keys. How sophisticated do
those functions have to be, in order to create unique keys? The more
sophisticated it gets, the more the server has to compute, which could
be a problem when there´s a huge load put on the server, no? And how
relieable are those "autonumber" features in RDBMS today (Postgres and
MySQL to be specific, can´t afford Oracle on my server :' ( ... ). Does
anyone has some information or links on that topic?
Any hint is greatly appreciated!
Regards,
Joerg!
I´m working on a webapplication that makes use of a database. I used to
make use of the "autonumber" or "autoincrement" feature of the
underlying database system. However, I read in a Java "best practices"
book, that one should not rely on those features and the number
generated, could possibly *not* unique. So, I´m just thinking of how to
provide my own unique primary keys. The book mentioned above doesn´t
really say how to create your own unique keys. How sophisticated do
those functions have to be, in order to create unique keys? The more
sophisticated it gets, the more the server has to compute, which could
be a problem when there´s a huge load put on the server, no? And how
relieable are those "autonumber" features in RDBMS today (Postgres and
MySQL to be specific, can´t afford Oracle on my server :' ( ... ). Does
anyone has some information or links on that topic?
Any hint is greatly appreciated!
Regards,
Joerg!