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 > General > Database Concepts & Design > Best Practice for storing calendar information

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-25-04, 14:19
Greener Greener is offline
Registered User
 
Join Date: Oct 2004
Posts: 1
Question Best Practice for storing calendar information

Hello,

I am wondering what is the best practice for storing calendar information. It just needs to store what date is open or not.

Year, Month, Calendar (1=Open, 0=Closed)

2004, 10, 1001111100111110011111001111100
etc

or should it go down

Date, Status
2004-10-01, OPEN
2004-10-02, CLOSED
2004-10-03, CLOSED
2004-10-04, OPEN
2004-10-05, OPEN
etc.

I have seen it both ways and curious if anyone has come across this and can comment on efficiency, ease of use, space usage, etc.

Thanks
Reply With Quote
  #2 (permalink)  
Old 10-25-04, 19:16
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
write the sql for how many dates are open in november

should answer your question

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 10-26-04, 05:29
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Quote:
Originally Posted by r937
write the sql for how many dates are open in november

should answer your question

Yes, or better still: how many dates are open between 17th of October and 13th of December!
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
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