If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Define entities and relationship (was "plz help")

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-04-08, 12:06
barca4ever barca4ever is offline
Registered User
 
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 ?

--------------------------------------------------------------------------------
Reply With Quote
  #2 (permalink)  
Old 04-04-08, 15:22
architect architect is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 04-08-08, 11:52
Ace1111111 Ace1111111 is offline
Registered User
 
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.
Reply With Quote
  #4 (permalink)  
Old 04-08-08, 11:54
Ace1111111 Ace1111111 is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 04-08-08, 15:31
architect architect is offline
Registered User
 
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
Define entities and relationship (was "plz help")-course_section_teacher.gif  
Reply With Quote
  #6 (permalink)  
Old 04-08-08, 19:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
architect, two comments:

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

2. you left out the doctor entity
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #7 (permalink)  
Old 04-09-08, 01:13
architect architect is offline
Registered User
 
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
Reply With Quote
  #8 (permalink)  
Old 04-09-08, 01:34
barca4ever barca4ever is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On