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 Aid Primary Keydetail1detail2
Profile Bid Primary Key references Profile A ( ID )detail 3detail 4detail 5
Profile Languagesid not null references profile A ( ID )language idprimary 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