DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Normalization in schedules

  1. #1
    Join Date
    Mar 2010
    Posts
    2

    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.

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by atmaturen View Post
    It turns out that the teacher thought that we just had a single string for the schedule that went something like "M1-2W1-2".
    Did the teacher gave any particular reason for such particular data modeling approach?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Mar 2010
    Posts
    2
    He just said thats what he thought we were doing and that it wouldn't break 1NF. Im assuming its because of time restraints and that we arent going to have to query specific schedules...

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    oh ... I got it, he was teaching 1NF - that explains it.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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


Click Here to Expand Forum to Full Width