Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778

    1:1 relationship

    Hi,

    I have the following constraints
    An employee can manage @ most 1 department
    A department can have @ most 1 manager

    Thus by the rules of "pick a relationship and include the fk in x etc.", I have

    Employee_ID(PK) | Department_Id

    Data =
    1 - DA
    2 - DB
    3 - DB
    4 - DA

    Clearly the above violations have been violated. I do not understand

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: 1:1 relationship

    You would need to add a UNIQUE constraint on employee.department_id to prevent setting up many employees as manager of same department.

Posting Permissions

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