On Oct 16, 2006, at 4:15 AM, Peter Bozek wrote:
On 10/16/06, Youri <[EMAIL PROTECTED]> wrote:
Regarding the Unique ID being an Integer, how can I trust an
Integer to
be unique?
If this "rowid" is generated by SQLite, how will it be treated when
exporting datas out of the DB and back? How to maintain the "link"
between tables if I use these rowid for JOINS?
SQLite ensures that rowID is unique. However, your concerns are valid
and IMHO rowID has a limited usability as a primary key. In more
complex databases you should define your own primary key. There are
many ways how to do that:
- use Max function
max is not good because you will get repeated row id's if you remove
data from the table
- use separate table to store next sequence ID
- use build in support for defined sequences, if db supports it
(SQLite IMHO does not support sequences, but most other databases do)
- use UUID.
Or the current totalseconds in a Unint64
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>