Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: design question
vnr1995_at_gmail.com wrote:
> hpuxrac wrote:
>
> > Is this a real life work related question or is this based on some
> > class you are taking?
>
> it is work related.
You don't give a lot of detail but from what you supplied it looks like you have 2 entities
One entity is question(s) the other is test(s)
Sounds like a many to many relationship ... the old proven way is to break it into English ( natural language ) sentences and see if it makes sense.
Each question may be used on one or more tests.
Each test must be composed of one or more questions.
With a many to many relationship ( if that is what it is ) you use an intersection or map table to hold the relationships. Something like question_test_map which would have 2 ( or more ) columns holding the value of the key for the question and the key for the test.
The uniqueness part can be handled by using a primary key or if you use an artifical key for the primary key then by the unique constraint. Received on Wed Dec 13 2006 - 14:45:45 CST