title: Database Design: weekday and hour availability
body: <p>I'm attempting to create a scheduling system based on a group's availability for a specific hour during a weekday. A group has the possibility of being available any hour for any day of the week. For example, Group A is available Monday 2AM to 8AM, 1PM to 11PM, Tuesday at ...</p>
  
  <p>These times are important because there are over 400 groups and an administrator needs to schedule them for activities based on their availability. I've brainstormed 3 different options and read through many similar situations, but none really correlate.</p>
  
  <p>All 3 of these options should work in theory, but which would you advise:</p>
  
  <p>Option #1</p>
  
  <pre><code>Group Table
    -ID
    -Name
    -Availability (store as array) ["M0", "M1", "Su10"] where M represents Monday and 0 represents 12AM
  </code></pre>
  
  <p>Option #2
      Group Table
        -ID</p>
  
  <pre><code>Group Availability Table
    -ID
    -GroupID
    -Monday (store as array) ["0", "1", "2"] where 0 represents 12AM, 1 - 1AM, etc.
    ...all 7 days of the week
  </code></pre>
  
  <p>Option #3
       Group Table
         -ID</p>
  
  <pre><code> Group Availability Table
     -GroupID
     -M0 (boolean)
     -M1 (boolean)
     ...all 168 possible weekday-hour combos
  </code></pre>
  
  <p>I don't think Option #1 is viable when the admin will be querying this data several times a day and Option #3 is a huge table although it's not very data heavy with just booleans. Thanks for the help.</p>