B
boaz
Hi,
I think the modeling group is dead. I will post this here.
----------------------------------------
Do you guys know what's wrong with a one-to-one relationship?
The reason I want to make it like this is that at the very end of the chain,
the set of keys is huge. I want to limit the number of columns to be the
key. i.e. the [company] table has 1 column as the key. The [employee]
table will have 2 columns as the key.
e,g,
If I add a [sale] table to the [company]-[employee] chain, the third table
will have 3 columns as the key -- "company id", "employee id", and "sale
id".
I have a company with many employees and computers. But instead of classify
all these, I just want to call all these as an entity. A company is an
entity. An employee is just another entity. etc.
So, instead of a one-to-many:
[company]---*[employee]---*[sale]
|
|
*
[computer]
I make it one-to-one.
[entity]---*[entity]
If I want to know the name and address of the entity "employee", I will have
a 1-to-1 table [employee] to look up the information for this employee
entity.
[entity]---*[entity]
|
|
[company]
|
|
[employee]
|
|
[computer]
|
|
[sale]
--
I think the modeling group is dead. I will post this here.
----------------------------------------
Do you guys know what's wrong with a one-to-one relationship?
The reason I want to make it like this is that at the very end of the chain,
the set of keys is huge. I want to limit the number of columns to be the
key. i.e. the [company] table has 1 column as the key. The [employee]
table will have 2 columns as the key.
e,g,
If I add a [sale] table to the [company]-[employee] chain, the third table
will have 3 columns as the key -- "company id", "employee id", and "sale
id".
I have a company with many employees and computers. But instead of classify
all these, I just want to call all these as an entity. A company is an
entity. An employee is just another entity. etc.
So, instead of a one-to-many:
[company]---*[employee]---*[sale]
|
|
*
[computer]
I make it one-to-one.
[entity]---*[entity]
If I want to know the name and address of the entity "employee", I will have
a 1-to-1 table [employee] to look up the information for this employee
entity.
[entity]---*[entity]
|
|
[company]
|
|
[employee]
|
|
[computer]
|
|
[sale]
--