Results 1 to 3 of 3

Thread: ERD Question

  1. #1
    Join Date
    Jan 2015
    Posts
    2

    ERD Question

    Hello everyone this is my first post so I'm sorry if I posted in the wrong section.

    I just came back from my database exam and we were asked to create an ERD anyways there was a question were it required us to input category and sub category entities into the ERD, this is the way I did it: I created 2 tables : Category and Sub-category and I linked the two tables with a one to many relationship stating that a sub-category must have a category and a category may have multiple sub-categories.

    After the exam I was discussing this question with my peers and they said that a recursive method was to be used for this question, now that I think about it does make a lot of sense but won't my way be correct as well?

    Thank you for your help.

  2. #2
    Join Date
    Jan 2015
    Posts
    2

    ERD Question I need help. Please

    Hello everyone this is my first post so I'm sorry if I posted in the wrong section.

    I just came back from my database exam and we were asked to create an ERD anyways there was a question were it required us to input category and sub category entities into the ERD, this is the way I did it: I created 2 tables : Category and Sub-category and I linked the two tables with a one to many relationship stating that a sub-category must have a category and a category may have multiple sub-categories.

    After the exam I was discussing this question with my peers and they said that a recursive method was to be used for this question, now that I think about it does make a lot of sense but won't my way be correct as well?

    Thank you for your help.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    The two-table version solves this specific use case. The recursive relationship solves the generic case, so it is preferred.

    -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
  •