• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 398
  • Last Modified:

Database Design

I need to design an ERd for a student teacher scheduler program. The program would let the following to take place :
the teacher would be able to set his office hours
the teaxcher would be able to set free times for meeting students
the student would be able to read teacher meeting time periods and reserve one of them.

what is the best way to design that, how many tables do I need.
0
lojayn
Asked:
lojayn
  • 4
  • 2
1 Solution
 
macarrillo1Commented:
lojayn,  is this a homework assignment?
0
 
DerokorianCommented:
I would say 4 tables: Students (id, name, whatever else), Instructors (id, name, whatever else), AvailableHours (id,instructor_id,begin available datetime, end available datetime) and Scheduled (available_id, student_id)

HTH
0
 
lojaynAuthor Commented:
what about separating the adviser office hours and the meetings time hours in two different tables. If I did so, what is the best design for office hours table. I amthinking if ( instructor_id, Mon_hours, Tue_hours, Wed_hours, Thur_hours)
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
DerokorianCommented:
That seems like poor database design IMO. Instead you should use something like (instructor_id, day (mon, teus, etc), begin (08:00 for example) and end (13:00 for example)
0
 
DerokorianCommented:
Then for an instructor you might have 3 rows:
3,Monday,08:00,12:00
3,Wednesday,09:00,12:00
3,Friday,13:00,15:00

This is especially helpful if an instructor has office hours say from 9am to 11am and 3pm to 5pm the same day.
0
 
lojaynAuthor Commented:
I apologize, I accepted the wrong solution. How would I fix that
0
 
DerokorianCommented:
Hey thanks for the points! Hope your question was answered to your satisfaction =D
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now