[RESOLVED] One To One Relationships
Ok, so I open up a book on beginning sql and it discusses relationships.
There is something that appears wrong. I am not understanding how the book is describing the one to one relationship. In it's figure, it shows that the same agency can have two different artist id's. But according to it's definition of one to one list can be related from both tables.
http://foo.gearsector.com/foo/instr_scrns/oneToMany.gif
Can someone explain this further please?
Thanks in advance.
Re: One To One Relationships
the diagram is not showing the relationship between artists and agencys.
It is showing the relationship between artist ID and artist Name as a 1 to 1 relationship. Each artist can have only one id and each id belongs to only one artist. The agency to artist is actually a one-to-many relationship.
The diagram above is showing 4 two-column tables and the relationship between them. These are evidently not the only ones in the database.
Re: One To One Relationships
to clarify more, the first table could just be a table and not have an underlying relationship set at all even though that would be bad sql.
Re: One To One Relationships
Thank you for clarifying that.