Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2008
    Posts
    2

    Define entities and relationship (was "plz help")

    hello everyone how r u doin?
    so some teacher ask me to do a project ,when i start drawing the er diagram for my project i got confused in something.
    it says in the project that 'a course can be taught by many doctors, if it has more sections '
    so i came up with two solutions and iam not sure about them
    the first one is :
    that i draw two entity the doctor and course and an entity realtion between them (section)

    or my secound solution is i just draw two entity doctor and course and a one to many relationship
    so which one is right or if they are wrong can u help me ?

    --------------------------------------------------------------------------------

  2. #2
    Join Date
    Oct 2007
    Location
    Chicago, IL
    Posts
    82
    Sounds more like:
    COURSE has one or more SECTION. SECTION belongs to a COURSE. SECTION is taught by a DOCTOR. DOCTOR can teach more than one SECTION.


    -A

  3. #3
    Join Date
    Mar 2008
    Posts
    5
    You could make two entities, teacher and course. The relationship could be:
    Each course is taught by one or many teachers. Each teacher teaches one course (you need to make sure that a teacher teaches only one course). Alternatively I think you could also make subclasses.

  4. #4
    Join Date
    Mar 2008
    Posts
    5
    You could make two entities, teacher and course. The relationship could be:
    Each course is taught by one or many teachers. Each teacher teaches one course (you need to make sure each teacher teaches only once course). Alternatively I think you could also make subclasses.

  5. #5
    Join Date
    Oct 2007
    Location
    Chicago, IL
    Posts
    82
    Check the attached image...that's sorta what I had in mind based on your requirements
    Attached Thumbnails Attached Thumbnails course_section_teacher.gif  

  6. #6
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    architect, two comments:

    1. don't just hand him the homework assignment, make him do it

    2. you left out the doctor entity
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  7. #7
    Join Date
    Oct 2007
    Location
    Chicago, IL
    Posts
    82
    Quote Originally Posted by r937
    1. don't just hand him the homework assignment, make him do it
    I'll be more careful in the future when helping newbies

    Quote Originally Posted by r937
    2. you left out the doctor entity
    I'm assuming by Doctor, he meant teacher/professor, so the Teacher entity covers that requirement

    -A

  8. #8
    Join Date
    Apr 2008
    Posts
    2
    hey thanx guys and r937 he didnt hand me my homework its like what i had in mind and the the drawing is the easy part

Posting Permissions

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