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 > Database Server Software > MySQL > Table Design for repeated event

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-12-09, 09:21
Jsama Jsama is offline
Registered User
 
Join Date: Oct 2009
Posts: 2
Table Design for repeated event

hello hi,

i am new to mysql and i have a question about designing a table.

I need to create a table to store students' class schedule.
For example,
studentA has class on every monday
etc etc.

Apart from simply storing their class schedule, there will also be a php form to update students' schedule.
For example,
studentA will not have class on 19.Oct.2009 (monday), but he will have class on 21.Oct.2009 (wednesday), after that, he will resume to have class on next monday again (on 26.oct.2009)


So the question is, i am thinking how my database should be designed. I am thinking to store every monday in the table.

Code:

Student  Date
studentA 2009-09-28
studentA 2009-10-05
studentA 2009-10-12
studentA 2009-10-19
studentA 2009-10-26
stutentA 2009-11-02
studentA 2009-11-09
the good thing is it is easy to update schedule (including deleting date that i don't need and add new ones)
but the disadvantage is i don't know how many entries i should create because the class supposed to run every monday.

May i ask if anybody has a better idea how this should be designed? or better way to accomplish this?

Thanks a lot.
Reply With Quote
  #2 (permalink)  
Old 10-12-09, 09:56
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,258
a student signs up for a course
a course is held on certain dates
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 10-12-09, 10:22
Jsama Jsama is offline
Registered User
 
Join Date: Oct 2009
Posts: 2
hi healdem,

thanks for your reply.
actually it is a bit different with normal course schedule because the class itself opens everyday and students are welcomed to join on any days.
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