Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2012
    Posts
    3

    Relationship source or Destination?

    Hi all,

    I am creating an ERM but I am slightly confused with design for the relationships. Say for example I have 2 tables, one table called Manager and one table called Branch. Obviously a manager belongs to a branch, and let's say the tables look something like this...

    --------------
    Branch
    --------------
    Branch_ID(PK)
    Branch_Name
    Has_Manager_ID(FK)
    etc
    etc

    -------------
    Manager
    -------------
    Manager_ID(PK)
    Manager_Name
    etc
    etc

    There can be 1 manager per branch therefore producing a one-to-one relationship. But which is the source/destination for the relationship?
    Personally I would say manager is the source in this scenario but I may have this the wrong way around.

    Any help is appreciated

    Thanks
    Last edited by ivlatt; 02-26-12 at 12:35.

  2. #2
    Join Date
    Feb 2012
    Posts
    76
    If the relationship is bijective, "source" and "target" is subjective. However, you have to pick a concrete way of representing the relationship. You can put the reference in either table, or have a separate link table - regardless of where you put it, both ID fields will be uniquely constrained. Unless there's other information to inform the choice, the decision is arbitrary.

Posting Permissions

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