Implementing relationship with the EER
Hello,
I am working on a sqldb project with SQL Workbench 6.2
I have read the documentation but I am still a bit confused in the design of relationship between tables and I would like to sort this out through a simple example and your help, of course!
Suppose we have 3 tables: 'people', 'cars' and 'makers' (car makers) each defined with a primary key and a name.
The table 'people' shall indicate which car(s) each person has.
The table 'cars' shall indicate which is the car maker for each car.
We have the following setting:
'makers' has 2 makers: maker1 and maker2.
'cars' has 3 car types: car1 from maker1, car 2 from maker2 and car3 from maker1
'people' has 3 persons: john, sam and george:
- 'john' has no car (the poor guy)
- 'sam' has 1 car of type 'car1'
- 'georges has 3 cars of type 'car1', 'car2' and 'car3' (the rich guy)
which makes 7 relationships.
For each relationship, could you kindly indicate if it is:
- idenitfying or non-identifying?
- 1:1, 1:n or n:m?
- which table I have to click first to connect to the other?
I guess this should cover any case (or at least most of them) and would fully clarify how to use Workbench in this aspect.
Thank you very much for your support!
JM
Subject
Written By
Posted
Implementing relationship with the EER
July 18, 2015 04:55AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.