another simple data modelling question
Date: Thu, 17 May 2001 20:50:12 GMT
Message-ID: <8QWM6.6168$6j3.557704_at_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 {
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 {
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
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
characteristic_id,
personality_id
}
person_id,
characteristic_id
}
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 - 22:50:12 CEST
