Inheritance or no inheritance, there is a question

From: "Vernon Smith" <vwu98034(at)lycos(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Inheritance or no inheritance, there is a question
Date: 2003-08-19 03:59:34
Message-ID: GMCPCMGLPNDDCFAA@mailcity.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 profile table while the role B still has the whole profile table. In regarding of the DB scheme design, that should be an ideal case of using inheritance. I can have something like

table PROFILE_A (
ID int &#8211; 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, associated with 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, nor xml 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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Josh Berkus 2003-08-19 04:36:39 Re: Inheritance or no inheritance, there is a question
Previous Message Josh Berkus 2003-08-18 23:11:27 Re: Reverse pattern match.