Hello, Doug Thanks for your message. That helped a lot. ambs
On Tue, Sep 15, 2009 at 6:47 PM, Douglas E. Fajardo < dfaja...@beyondtrust.com> wrote: > I'm not sure if you are looking to make a entry unique, or determine the > order in which the entries occurred. In either case, be aware - time can go > *backwards* on a system, especially if it is being syncd to an outside > source such as with NTP. > > Normally the 'jitter' is under a second, but exceptions do occur (including > the one where the Sysadmin changes the system clock!). Note that a backward > "jitter" could (conceivably) result in the same timestamp occurring twice. > Also, depending on the resolution of the clock (which may vary depending on > installation options) it may be possible for two entries to occur at the > same 'time'. As a result, I've sworn off using the time for anything more > than a logging label. > > I've had good success with the auto-increment approach. As for code to > hide it, just set auto-incrementing up on a field in the schema, and there > is no extra code involved. > > *** Doug F. > > > -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto: > sqlite-users-boun...@sqlite.org] On Behalf Of Alberto Simões > Sent: Tuesday, September 15, 2009 4:38 AM > To: General Discussion of SQLite Database > Subject: [sqlite] Temporal SQLite database > > Dear SQLite users, > > I am preparing a temporal database. Basically, entries will have a compound > key composed by the real key and some kind of time stamp. This is not > complicated to do, but I would like to know if anybody did something > similar > and if: > - used the number of non-leap seconds since whatever time the system > considers to be the epoch, as time stamp > - used an auto-increment value as the time-stamp, and adding the time > stamp > as an auxiliary column, > - knows of any Perl module that hides this time management. > > Thanks for your ideas. > ambs > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- Alberto Simões _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users