Re: id field
Fernando Antonio Mac Cracken Cezar <[email protected]> Tue, 11 Nov 2003 11:25:29 +0100
| Newsgroups | gmane.comp.tools.memaid.devel |
|---|---|
| Message-ID | <1068546329.3964.26.camel@corsario> |
On Tue, 2003-11-11 at 11:43, David Calinski wrote: > On Tuesday 11 of November 2003 10:33, Fernando Antonio Mac Cracken Cezar > wrote: > > > Talking the system time as id number may lead 2 or more > > cards to have the same id. If 2 cards are created in a given > > short period of time, the 2 successive system time calls may delivery > > the same value (this short period is SO dependent). > > Is anybody able to pass through 2 new items, and pick 2 grades for them, in > just 1 second? Yes. I do, better saying my software ;-) ... If I write for example a program to import a dictionary into my Memaid database, what actually I also want to write. It isn't a nice approach to write a sleep statement before importing each new word, is it? ;-). > > > My suggestion is to take a random number and make a bit operation > > on top of the system time. > > That *can* result in a 2 same id, can't it? Yes, you're right. That was just a first suggestion, easy to implement and that would reduce the probability to have ID conflicts. But of course, better solutions are welcome ..... F. > > DC > > > > ------------------------------------------------------- > This SF.Net email sponsored by: ApacheCon 2003, > 16-19 November in Las Vegas. Learn firsthand the latest > developments in Apache, PHP, Perl, XML, Java, MySQL, > WebDAV, and more! http://www.apachecon.com/ > _______________________________________________ > Memaid-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/memaid-devel -- Fernando Antonio Mac Cracken Cezar <[email protected]> ------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/