Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Gevik Babakhani
: [GENERAL] table inheritance and DB design I understand your bang theory perfectly :) I just wanted to know if there were plans to fix this. I just looked at the TODO list at http://developer.postgresql.org/todo.php and found the section with inherited ref. constraints in the Indexes section. On

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
Berend, thanks for posting a part of your schema. In OO terms you used incapsulation by providing a reference from customer table to organization table instead of inheritance. This makes sense. But again, in order to find a supplier represented by an organizaion record, your business layer would

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alvaro Herrera
On Fri, Dec 03, 2004 at 10:02:07AM -0800, Alec Swan wrote: > On the TODO page it says: "A hyphen, "-", marks > changes that will appear in the upcoming 8.1 > release.", but none of the items are marked with a > hyphen. I guess this TODO page needs to be updated. Development for 8.1 hasn't started

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Tom Lane
Alec Swan <[EMAIL PROTECTED]> writes: > On the TODO page it says: "A hyphen, "-", marks > changes that will appear in the upcoming 8.1 > release.", but none of the items are marked with a > hyphen. I guess this TODO page needs to be updated. It's perfectly up to date ... nothing's been done for 8.

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
I understand your bang theory perfectly :) I just wanted to know if there were plans to fix this. I just looked at the TODO list at http://developer.postgresql.org/todo.php and found the section with inherited ref. constraints in the Indexes section. On the TODO page it says: "A hyphen, "-", mar

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Fri, Dec 03, 2004 at 08:24:38AM -0500, Berend Tober wrote: >> My personal take-away was that the behavior was not going to be fixed >> in the near term > The problem is that no developer is interested in fixing it (it's "low > on everyone's to-do lis

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Berend Tober
> ...have a Resource table and a Car table > and a ResCar many-to-many relation. I don't think you need the ResCar table. The Car table defines a many-to-many relation with Appointment. As does the Resource table. The Car table contains a subset of rows from the Resource table. > ...it's not exte

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Joshua D. Drake
Alec Swan wrote: Berend, I understand your alternative design. So, you are suggesting to have a Resource table and a Car table and a ResCar many-to-many relation. This will work, but it's not extensible. Suppose, my application needs to find the resource that is assigned to an appointment. My progr

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
Berend, I understand your alternative design. So, you are suggesting to have a Resource table and a Car table and a ResCar many-to-many relation. This will work, but it's not extensible. Suppose, my application needs to find the resource that is assigned to an appointment. My program will have to

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alvaro Herrera
On Fri, Dec 03, 2004 at 08:24:38AM -0500, Berend Tober wrote: > > On Thu, Dec 02, 2004 at 10:53:37PM -0500, Berend Tober wrote: > > > >> I learned that the unusual behavior (or at least the behavior that > >> seems weird to me) regarding relational integrity and uniquness > >> constraints as been a

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Berend Tober
> On Thu, Dec 02, 2004 at 10:53:37PM -0500, Berend Tober wrote: > >> I learned that the unusual behavior (or at least the behavior that >> seems weird to me) regarding relational integrity and uniquness >> constraints as been around for a while, and some people actually think >> is is SUPPOSED to w

Re: [GENERAL] table inheritance and DB design

2004-12-02 Thread Alvaro Herrera
On Thu, Dec 02, 2004 at 10:53:37PM -0500, Berend Tober wrote: > I learned that the unusual behavior (or at least the behavior that > seems weird to me) regarding relational integrity and uniquness > constraints as been around for a while, and some people actually think > is is SUPPOSED to work tha

Re: [GENERAL] table inheritance and DB design

2004-12-02 Thread Berend Tober
> I am trying to create a database, which allows me to store appointment > information. ... > > Now, I want to have several tables, say Car and Driver, which INHERIT from > the Resource table. I also want AppRes table can enforce a ref. constraint > on the Resource table. So, in the future I can ad

[GENERAL] table inheritance and DB design

2004-12-02 Thread Alec Swan
Greetings.   I am trying to create a database, which allows me to store appointment information. The key here is that I don't know what resources will be associated with an appointment, but they will all have a unique id. So, I want to have an Appointment table, a Resource table and a many-to-many