Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 271
  • Last Modified:

Table design idea for Calendar


I need to design a table for a calendar. I'll be using Telerik's calendar control. User opens the calendar in week or month view. They
click on , for example, Thursday 1 PM March 2012 and Tuesday 2 PM October 1st, etc.  I need to save calendar choices in the database for each user. Multiple choices (dates) for each user.

How can I design this table? Do I need more than one table? One for each month, one for each day, one for each hour? and one for each month?
(I need to read the data back as well and populate the calendar control with this data...for example, mark the calendar red or something.)
0
Camillia
Asked:
Camillia
1 Solution
 
JestersGrindCommented:
It sounds like you are trying to associate a date/time with a user.  Assuming that you already have a Users table, I would add a Schedule table with a ScheduleID as it's primary key.  ScheduleID could be an identity column.  Then a UserID column with a foreign key reference to your Users table.  Then a ScheduleDate datetime column to hold the date/time of the scheduled date.  Maybe a few other columns depending on what other characteristics you need to capture like comments, color if you allow the user to select this, etc...

Greg



0
 
CamilliaAuthor Commented:
ah, yes, i dont need to separate day, time, month, etc tables. Thanks. I will try that.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now