Re: Question about modeling
From: -CELKO- <jcelko212_at_earthlink.net>
Date: 26 Jan 2005 08:22:32 -0800
Message-ID: <1106756552.589434.294320_at_c13g2000cwb.googlegroups.com>
Date: 26 Jan 2005 08:22:32 -0800
Message-ID: <1106756552.589434.294320_at_c13g2000cwb.googlegroups.com>
>> If I create the table as you suggest, it wont tell wich departments
share the contract. For a client that have (as an example) four
departments, maybe only one, or two of them share the contract. <<
I did not understand that a client has departments. My model was that a contract has one and only one client, and each department can have one or more contracts. Thus you would find the department-client relations with a simple join on contract_id.
This sounds like a 4NF or 5NFproblem because of the multi-valued dependences and you can look that up in any RDBMS book. You will need a (client, department) table and the (client, department, contract) table will reference that two-column key. Received on Wed Jan 26 2005 - 17:22:32 CET
