Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2013
    Posts
    3

    Recursive relationship in SQL - how to code?

    Hi I am currently creating an eer based on a scenario, i have a recursive relationship where a gardener (manages) a gardener. How would I code this in SQL? what would be in the manages table? a gardener_manager_no (which would be the gardener no from the gardener table) and supervises_gardener (which would be the gardener_no of the gardener being managed by the first)?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Yes, that would work.

    This is a consideration, but probably not a problem... This design does not preclude a gardener having more than one manager.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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