Inheritance or no inheritance, there is a question - Mailing list pgsql-sql

From Vernon Smith
Subject Inheritance or no inheritance, there is a question
Date
Msg-id GMCPCMGLPNDDCFAA@mailcity.com
Whole thread Raw
Responses Re: Inheritance or no inheritance, there is a question
List pgsql-sql

I am working on an application system refinement. There is a user profile table in the current system. After the
refinement,there are new separated roles, A and B, of the users. The role A only has a few valid fields of the original
profiletable while the role B still has the whole profile table. In regarding of the DB scheme design, that should be
anideal case of using inheritance. I can have something like
 

table PROFILE_A ( 
ID int – PK,
...
):

table PROFILE_B {
...
inherits (A)
);

However, there is a problem. There are some multi-valued field tables, such as languages the person can speak,
associatedwith the profile table referred by ID in the profile table. These tables are still needed for the A and B.
But,the ID is not accessible from the PROFILE_B. 
 

What is the best solution for this DB scheme problem? 

p.s. I can't use array data type for the multi-valued fields since they need to be workable with a selection statement,
norxml or comma separated format for maintainablity concern. 
 

Thanks,

v.


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005


pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Reverse pattern match.
Next
From: Josh Berkus
Date:
Subject: Re: Inheritance or no inheritance, there is a question