Vernon,

> What is the best solution for this DB scheme problem?

Have you considered not using inheritance?   As a relational-SQL geek myself, 
I'm not keen on inheritance -- I feel it mucks up the relational model.  Not 
everyone agrees with me, of course.

Personally, I'd suggest the following structure:

Profile A
        id Primary Key
        detail1
        detail2

Profile B
        id Primary Key references Profile A ( ID )
        detail 3
        detail 4
        detail 5

Profile Languages
        id not null references profile A ( ID )
        language id
        primary key id, language id

etc.

In this way, Profile B is a child table with a 1:0-1 relationship with Profile 
A.  Multi-value dependancies, like Languages, can be related to either the 
people who belong to the B group (and, by implication, the B group) or the 
people who belong to the A group only.

Want the B group?  SELECT A JOIN B
Want the A group only?  SELECT A EXCEPT B

This is the "relational" way to approach the problem.

-- 
Josh Berkus
Aglio Database Solutions
San Francisco

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to