Results 1 to 4 of 4

Thread: [RESOLVED] One To One Relationships

  1. #1

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Resolved [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.



    Can someone explain this further please?

    Thanks in advance.

  2. #2
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  3. #3
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4

    Thread Starter
    Hyperactive Member gjon's Avatar
    Join Date
    Nov 2004
    Location
    Inescapable Void
    Posts
    442

    Re: One To One Relationships

    Thank you for clarifying that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width