relatioship diagram

winshent

Registered User.
Local time
Today, 16:13
Joined
Mar 3, 2008
Messages
162
I am documenting my database and just realised that my relationship diagram is showing one of the relationships oncorrectly.

The foreign key field is set as indexed with no duplicates, but the relationship diagram displays it as a one-many relationship..

am i missing something here?

one-onerelationship.gif
 
Last edited:
sorted !!

it appears that the relationship diagrams do not update. I must have set the index no duplicates on the foreign key after i created the relationship..
 
Looks to me like your relationship is backwards. It doesn't make sense to have PhaseID be unique in the company table. Are you sure you don't want CompanyID to be in the phase table?

Also, if your PKs are autonumbers, the cascade Update will NEVER happen since you can NEVER change the value of an autonumber.
 
Hi Pat

Thanks for your comments.

Not sure why you suggest putting CompanyID in the phase table, as its a one-one relationship.. so in my mind it wouldnt make any difference ???

I hear your second point.. I never use autonumbers when i am designing a database from scratch as i find them quite limited.. i much prefer to 'roll my own'..
 
My point wasn't to not use autonumbers. It was that autonumbers cannot be changed (which is actually part of the definition of a key in a relational database) and so there was no point to specifying cascade update. Keys should not be changeable.

1-1 relationships are extremely rare and I don't see the point of this one. Why do you want to separate the Phase from the company table if their relationship is 1-1?
 

Users who are viewing this thread

Back
Top Bottom