Cross Tab Table Normalization

  • Thread starter Merkling, Steven
  • Start date
M

Merkling, Steven

I am designing a database to hold, among other things the following matrix.

The matrix holds information for access times to particular zones.
ie.
An employee could have:
Access to Zone1 from 800AM to 500PM Mon - Fri
Access to Zone3 from 800AM to 300PM Tue
Access to Zone3 from 800AM to 100PM Fri
etc
etc
etc

What is the best way to Normalize this Matrix in a database Table?


__________|Mon|Tue|Wen|Thu|Fri|Sat|Sun|
1 Start Time|___|___|____|___|__|___|___|
1 Stop Time|___|___|____|___|__|___|___|
2 Start Time|___|___|____|___|__|___|___|
2 Stop Time|___|___|____|___|__|___|___|
3 Start Time|___|___|____|___|__|___|___|
3 Stop Time|___|___|____|___|__|___|___|
4 Start Time|___|___|____|___|__|___|___|
4 Stop Time|___|___|____|___|__|___|___|


Thanks
Steve
 
J

John Vinson

What is the best way to Normalize this Matrix in a database Table?

EmployeeID
SiteID
AccessDate
StartTime
EndTime

or store the date and time together to make permission spanning
midnights easier:

EmployeeID
SiteID
StartDateTime
EndDateTime
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top