pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vernon Smith <vwu98034@lycos.com>
To: pgsql-sql@postgresql.org
Subject: Inheritance or no inheritance, there is a question
Date: Mon, 18 Aug 2003 23:59:34 -0400
Message-ID: <GMCPCMGLPNDDCFAA@mailcity.com> (raw)



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



view thread (4+ messages)  latest in thread

Message-ID: <GMCPCMGLPNDDCFAA@mailcity.com>
Permalink:  ../GMCPCMGLPNDDCFAA@mailcity.com/
Also on:    postgresql.org/message-id/GMCPCMGLPNDDCFAA@mailcity.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: vwu98034@lycos.com
  Subject: Re: Inheritance or no inheritance, there is a question
  In-Reply-To: <GMCPCMGLPNDDCFAA@mailcity.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox