Re: [GENERAL] using ID as a key

2000-02-08 Thread Marten Feldtmann
> sounds intriguing. although it still use db, but because it > does not need any special db feature (table-locking is > common), it qualifys as "programmatical" solution. > > however, not totally understood yet, let's see: > > comparing to file locking (e.g. perl's flock) > 1) locking is enf

Re: [GENERAL] using ID as a key

2000-02-08 Thread kaiq
sounds intriguing. although it still use db, but because it does not need any special db feature (table-locking is common), it qualifys as "programmatical" solution. however, not totally understood yet, let's see: comparing to file locking (e.g. perl's flock) 1) locking is enforced. safer tha

Re: [GENERAL] using ID as a key

2000-02-07 Thread Marten Feldtmann
> [EMAIL PROTECTED] wrote: > > > > Hi Sheila, > > > > For general database design considerations (not specific to Postgres) I > > disagree with the others on the use of serials and sequences. These > > things never migrate well from platform to platform, they often break, and > > dealing with t

Re: [GENERAL] using ID as a key

2000-02-07 Thread Marten Feldtmann
And here's the description of the "high-low" algorithm for programs to create unique id's in a multi-user environement. *** Structure of the identifier *** Contents of the identifier: a) session-id b) current number within session c) class id These are three numbers. You may create a uniq

Re: [GENERAL] using ID as a key

2000-02-07 Thread kaiq
either way, I do not think it's "programmatic", I assume nobody think they are? On Mon, 7 Feb 2000, Ross J. Reedstrom wrote: > On Mon, Feb 07, 2000 at 01:37:21PM -0600, Ed Loehr wrote: > > [EMAIL PROTECTED] wrote: > > > > > > and, it seems not "programmatically at all. > > > > What would make

Re: [GENERAL] using ID as a key

2000-02-07 Thread Ross J. Reedstrom
On Mon, Feb 07, 2000 at 01:37:21PM -0600, Ed Loehr wrote: > [EMAIL PROTECTED] wrote: > > > > and, it seems not "programmatically at all. > > What would make it "programmatic" in my view would be calling a > function, as in "$newID = GetNewID()", prior to INSERT and then using > the returned ID v

Re: [GENERAL] using ID as a key

2000-02-07 Thread Ed Loehr
[EMAIL PROTECTED] wrote: > > On Mon, 7 Feb 2000, Ed Loehr wrote: > > > These are resolvable problems. One way to do a programmatic ID > > generation as David B. suggests is to have a DB server whose purpose > > is to issue "seed numbers" which designate, through use of a > > pre-determined mult

Re: [GENERAL] using ID as a key

2000-02-07 Thread Ed Loehr
"Ross J. Reedstrom" wrote: > > > ... One way to do a programmatic ID > > generation as David B. suggests is to have a DB server whose purpose > > is to issue "seed numbers" which designate, through use of a > > pre-determined multiplier, a *range* of allocated IDs guaranteed to be > > unique acr

Re: [GENERAL] using ID as a key

2000-02-07 Thread Keith G. Murphy
Simon Drabble wrote: I agree with everything Simon says (hmmm, there's a game in that) and would add: It's very likely that at some time you will change your database design such that you will want to add or remove a field or two that uniquely identify the record (hmmm, person's first and last n

Re: [GENERAL] using ID as a key

2000-02-04 Thread Ed Loehr
Marc Tardif wrote: > > I recommend you read Momjian's online book, very informative and provides > all the necessary information about using various kinds of id's: > http://www.postgresql.org/docs/aw_pgsql_book/index.html In glancing at Momjian's stuff on this just now, I noticed the book could

Re: [GENERAL] using ID as a key

2000-02-04 Thread Marc Tardif
I recommend you read Momjian's online book, very informative and provides all the necessary information about using various kinds of id's: http://www.postgresql.org/docs/aw_pgsql_book/index.html As for referential integrity using foreign keys, you can add this functionality to postgresql using tr

RE: [GENERAL] using ID as a key

2000-02-04 Thread Barnes
ebruary 04, 2000 11:41 AM To: [EMAIL PROTECTED] Subject: [GENERAL] using ID as a key Hi, I'm new to data base design so please bare with me if my question is so basic.. I'm designing a database, two of the tables are EMPLOYEES and AGENCIES. I need an ID for each of them. I would a

Re: [GENERAL] using ID as a key

2000-02-04 Thread Ed Loehr
sheila bel wrote: > > Hi, > > I'm new to data base design so please bare with me if my > question is so basic.. > I'm designing a database, two of the tables are EMPLOYEES and > AGENCIES. I need an ID for each of them. I would also need to > have the agencyID in the EMPLOYEES table so that I can

Re: [GENERAL] using ID as a key

2000-02-04 Thread kaiq
search for oid and serial or sequence, referential or foreign key in the doc or archive of this list. there are a lot lot very good advices. On Fri, 4 Feb 2000, sheila bel wrote: > Hi, > > I'm new to data base design so please bare with me if my > question is so basic.. > I'm designing a dat

[GENERAL] using ID as a key

2000-02-04 Thread sheila bel
Hi, I'm new to data base design so please bare with me if my question is so basic.. I'm designing a database, two of the tables are EMPLOYEES and AGENCIES. I need an ID for each of them. I would also need to have the agencyID in the EMPLOYEES table so that I can identify which agency they belong