Normalization in schedules
In class, we're designing a database for course registration. It had 3 attributes for the schedule (days, startTime, endTime) where days was 5 characters to allow for MTWRF.
This would allow classes to be multiple days (albeit at the same time) ie "MW" for a class that meets both on Monday and Wednesday. ie) days:"MW" startTime:"1" endTime:"2"
It turns out that the teacher thought that we just had a single string for the schedule that went something like "M1-2W1-2".
I proposed taking these attributes out into a second table with four fields (classID, day, startTime, endTime) so it would look like:
class:"1" day"M" startTime:"1" endTime:"2"
class:"1" day"W" startTime:"1" endTime:"2"
I was under the assumption to be at least in 1NF that "MW" shouldn't be one value. Am I wrong? Which way is better?
Thank You So Much in Advance.
Click Here to Expand Forum to Full Width