Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    3

    Foreign Key - Newbie Question

    Ok, really amateur question coming up:

    Three relations (A, B, C)

    I place a foreign key from relation A into relation B. I then place the same key from relation B into relation C.
    Is the placement from relation B into relation C creating a relationship between B and C, or A and C?

    Perhaps I am missing some very basic theory here?

    Thanks for your help in advance.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by VillaLion
    Is the placement from relation B into relation C creating a relationship between B and C
    yes, provided that it is the key of B that you're placing into C, rather than the key of A
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Dec 2007
    Location
    London, UK
    Posts
    741
    Quote Originally Posted by VillaLion
    Is the placement from relation B into relation C creating a relationship between B and C, or A and C?
    Both. It's a ternary (3 way) relationship - a relationship being "an association among things". However, in ER modelling and UML it is often the case that only simple binary relationships are named and represented diagramatically.

Posting Permissions

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