| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Question about modeling
Hi David,
First, i'd like to thank you for your help. It is _really_ appreciated.
I read your post... twice and it seem to me that you got it right. You defined the problem well.
I have implemented a solution (That, I must admit, do not look nice to me). Here is what I actualy have:
CLIENTS (CLIENTS_ID*, ...)
DEPARTMENTS (DEPARTMENTS_ID, CLIENT_ID (FK), ...)
CONTRACTS (CONTRACTS_ID, CLIENT_ID (FK), ...)
Then I have this table doing a link between DEPARTEMENTS AND CONTRACT
CONTRACTS_DEPARTEMENTS(CONTRACTS_ID*, DEPARTEMENTS_ID*, CLIENT_ID (FK of both DEPARTMENTS and CONTRACTS))
So ! Now I have the contracts attached to the client and I also use this FK in the relation with the DEPARTEMENTS table. So I can not have a contract shared among departments of different clients. What I do not like in this solution is that I duplicated the fact that a contract belong to wich client. There is now two way to look it out : 1) Look at the CLIENT_ID attribute of CONTRACTS, 2) Follow a link from a contact, to a departments, to a client. But, maybe it is the thing to do and I should not worry at all.
In any case, I would like to know what is your solution.
Again, thanks for your help and I hope I am clear, english is not my primary language and I fear I'm a better english reader than writer.
Mathieu Pagé
informatique_at_csf_REMOVE_inc.com
Received on Thu Feb 03 2005 - 14:09:46 CST
![]() |
![]() |