On 21 Oct 2002 at 8:44, Josh Berkus wrote:
Hello Josh,
> > sequence and use nextval() primary keys for every table. Someone
> > recommended a book (Pascal: practical issues in db management). I've
> > ordered it and will read it, hope it will help me make up my mind.
>
> Me. Unfortunately, it won't help you make up your mind on the OID vs.
> Sequence issue.
That's not a problem. I saw some articles from Pascal on the web, and
I'm sure his book will be valuable anyway.
> The reason I reccomended it is that Pascal is a real
> fanatic about the relational database model, and gives you
> a) detailed explanations of why it's dangerous* to get creative with
> the relational model, and
> b) suggestions for how to do a lot of complex things *within* the
> relational model.
> OID vs. sequence is strictly a PostgreSQL implementation issue, and
> even the core developers are divided on the issue, though it's 3 to 1
> against the last time I saw this argued out.
I guess that's 3:1 against OID? Well, I'm beginning to be convinced not
to use OID (Andrew, thanks for your posting too).
So let's say I don't use OID. Is a SEQUENCE bound to several tables the
best solution? Any other suggestions?
> *not to say that you should *never* get creative -- though Pascal
> thinks you shouldn't -- just that it's very important to know the
> penalties involved.
I don't _want_ to be creative, not in this db anyway :). I want
everything to be as standard as possible, as solid as possible.
The way I'm struggling to solve this issue makes me wonder if I'm not
making a huge design mistake. OTOH I cant imaging that I'm the first
one to encounter this. I guess the issue is
a one to many relationship where "one" can be any table in the db
How does one solve this in a relational model? Sorry if I keep going on
about this, but I have a hunch that this is _very_ important for my db.
If I don't solve it correctly, I'm sure I will be in a lot of trouble
later on.
TIA!