Re: [SQL] Design problem : using the same primary keys for inherited objects.

2005-10-17 Thread David Pradier
> That is perfectly valid. Only, I would argue that an actor is a person. Oups, i really made a vocabulary mistake here. Let me paste what i wrote some minutes earlier to Daryl : By 'actor', I meant "somebody who does something". Lots of tables inherits from 'actor' in our current design, ea

Re: [SQL] Design problem : using the same primary keys for inherited objects.

2005-10-17 Thread David Pradier
> >I give a clearer example : > >CREATE TABLE actor ( > >id_actor serial PRIMARY KEY, > >arg1 type1, > >arg2 type2 > >) > >CREATE TABLE person ( > >id_person INTEGER PRIMARY KEY REFERENCES actor, > >arg3 type3, > >arg4 type4 > >) > >Don't you think it is a BAD design ? > >If it isn't, well, it will

Re: [SQL] Design problem : using the same primary keys for inherited objects.

2005-10-14 Thread Russell Simpkins
Thanks Russ, but well... It doesn't help me a lot. Our needs seem to allow that we use an id as primary key and foreign key at the same time. What i fear more is that it be against a good database design practice, because leading to potential problems. I give a clearer example : CREATE TABLE act

Re: [SQL] Design problem : using the same primary keys for inherited

2005-10-14 Thread Daryl Richter
David Pradier wrote: Most of the inheritance i've seen done in databases retain the parent primary as a foreign key and a primary key. That being said, only you and your team can decide if more than one object will extend a base class. If you were doing something more like this person -> sweep

Re: [SQL] Design problem : using the same primary keys for inherited objects.

2005-10-14 Thread David Pradier
> Most of the inheritance i've seen done in databases retain the parent primary > as a foreign key and a primary key. That being said, only you and your team > can decide if more than one object will extend a base class. If you were > doing something more like this > person -> sweepstakes entry

Re: [SQL] Design Problem...

2004-04-24 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > The problem is that it is possible that the service can be switched to a > different business unit, and then possibly back to the original later on. First, you will get more responses if you do not create a new topic in the middle of an existin

[SQL] Design Problem...

2004-04-22 Thread Ryan Riehle
Our business has multiple cost/profit centers that I call business units, these are in a table called buinessunits. We also have a table that holds a list of services that are offerred by a business. Each business unit has many services it offers; 1 businees unit => Many Services. We want to be a