Solved

Table design idea for Calendar

Posted on 2011-09-22
2
245 Views
Last Modified: 2012-05-12

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
Comment
Question by:Camillia
2 Comments
 
LVL 21

Accepted Solution

by:
JestersGrind earned 500 total points
ID: 36581412
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
 
LVL 7

Author Comment

by:Camillia
ID: 36581460
ah, yes, i dont need to separate day, time, month, etc tables. Thanks. I will try that.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now