Re: [Tutor] Generating unique ID

2009-10-29 Thread Alan Gauld
"Timo" wrote I'm using SQLite as database and will try the ROWID. Take a look at my working with databases topic under the heading Linking Data Across Tables which gives an exampler and discussion of using an autoincementing key in SqlLite. -- Alan Gauld Author of the Learn to Program w

Re: [Tutor] Generating unique ID

2009-10-29 Thread Timo
Thanks for all the answers. I'm using SQLite as database and will try the ROWID. Timo Modulok schreef: I'm writing an application which will hold a database of people. Ofcourse, people can have the same name, so I want to stock them with an unique ID. I've searched and found some things: - u

Re: [Tutor] Generating unique ID

2009-10-28 Thread Modulok
> I'm writing an application which will hold a database of people. Ofcourse, > people can have the same name, so I want to stock them with an unique ID. > > I've searched and found some things: > - uuid.uuid4() > - id(name) > - os.urandom(n) > > But they seem overkill to me. Well, maybe not id(). >

Re: [Tutor] Generating unique ID

2009-10-28 Thread Serdar Tumgoren
> I'm writing an application which will hold a database of people. Ofcourse, > people can have the same name, so I want to stock them with an unique ID. > If you're using an actual database rather than a plain old text file, you can let the database do the work for you. Most flavors (sqlite, post

Re: [Tutor] Generating unique ID

2009-10-28 Thread Wayne
On Wed, Oct 28, 2009 at 1:52 PM, Timo List wrote: > Hello, > > I'm writing an application which will hold a database of people. Ofcourse, > people can have the same name, so I want to stock them with an unique ID. > > I've searched and found some things: > - uuid.uuid4() > - id(name) > - os.urand