Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> another simple data modelling question

another simple data modelling question

From: crappy <nospam_at_newsranger.com>
Date: Thu, 17 May 2001 20:50:12 GMT
Message-ID: <8QWM6.6168$6j3.557704@www.newsranger.com>

greetings all.

i have this stupid problem that is stumping me. there must be a simple answer, but ..

let's say you have 3 entities: person, characteristic, and personality, and let's say each one has a integer primary key and a text description field for simplicity.

now let's say that person is a child of personality. 1 person has exactly one personality, one personality can be had by 0 or many persons.

now, suppose characteristics and personality are many:many, so you make a junction

characteristic_personality {
characteristic_id,
personality_id
}

with appropriate foreign keys of course. so this table is saying that only certain characteristics apply to certain personalities.

now suppose person and characteristic are many:many as well, so you do the same kind of junction table between these two.

person_characteristic {
person_id,
characteristic_id
}

blah blah.

now my problem is this: how do you ensure that person/characteristic pairs are valid with respect to the characteristic/personality pairs, *as well as* the implied personality of each person (via the child-parent relationship between person and personality)?

in other words, with the given setup, it is possible to give a person a characteristic (in person_characteristic) that isn't 'allowed' for that person's personality.

i know that's kind of confusing but from reading your other posts i know you're all smart people. thanks in advance. Received on Thu May 17 2001 - 15:50:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US