Re: basic calendar question
Tim - You're asking a fairly complicated question. Let me simplify the way I ended up doing it was a related datamodel: event [event_id, ...details...] event_date [event_id, date (day, month, year), time, duration] Now, the important thing to note is that event_date is unique on event_id AND date. Every day that an even was good for, got a new record. For my application, time duration were not necessarily the same on every day, in which case, I needed to put it in event date. A more elaborate scheme would be the following event [event_id, ...details...] event_recur [event_id, recur_id, duration] recur [recur_id, ...] In this scheme, ColdFusion would be in charge of placing recurring to the screen properly. A recurrence might be: every other week. A duration might be: 12 times. Lots of effort is put into printing recurrence on output. This scheme also makes determining exactly which events occur on a particular day difficult in SQL. Mike Wokasch At 01:25 PM 10/15/2002 -0400, you wrote: I am creating a calendar of events database CF app from scratch.. An initial question that comes to mind is.what is the best way to store event dates for this.using separate fields called something like from_day, to_day from_month to_month from_year to_year OR - should I somehow just use two fields.one for the from date (ex. 3/12/02) and one for the to date (ex. 3/13/02) I'm trying to think ahead to the customer making calendar changes and displaying the calendar Could anyone with experience creating this type of event calendar share their thoughts on this? Thanks in advance Tim Laureska ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: basic calendar question
Definitely store it as a date. What about time? Do you ever foresee the need to know the time of an event? If so, use a datetime to store it. And if an event doesn't have a time, while others do, use a standardized placehlolder like midnight to designate don't care on the time object. Jerry Johnson [EMAIL PROTECTED] 10/15/02 01:25PM I am creating a calendar of events database CF app from scratch.. An initial question that comes to mind is.what is the best way to store event dates for this.using separate fields called something like from_day, to_day from_month to_month from_year to_year OR - should I somehow just use two fields.one for the from date (ex. 3/12/02) and one for the to date (ex. 3/13/02) I'm trying to think ahead to the customer making calendar changes and displaying the calendar Could anyone with experience creating this type of event calendar share their thoughts on this? Thanks in advance Tim Laureska ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: basic calendar question
Mike ... thanks for the responseI see the basis of what you saying is that an event could have multiple days with potentially different times on each day so set up a different record for each day the event occurs I'm still learning CF/SQL so I got lost in your last paragraph on recurrence. Can you try to explain that aspect again or point me in a direction so I can gain a basic knowledge of what you're talking about Thanks -Original Message- From: Mike Wokasch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 1:41 PM To: CF-Talk Subject: Re: basic calendar question Tim - You're asking a fairly complicated question. Let me simplify the way I ended up doing it was a related datamodel: event [event_id, ...details...] event_date [event_id, date (day, month, year), time, duration] Now, the important thing to note is that event_date is unique on event_id AND date. Every day that an even was good for, got a new record. For my application, time duration were not necessarily the same on every day, in which case, I needed to put it in event date. A more elaborate scheme would be the following event [event_id, ...details...] event_recur [event_id, recur_id, duration] recur [recur_id, ...] In this scheme, ColdFusion would be in charge of placing recurring to the screen properly. A recurrence might be: every other week. A duration might be: 12 times. Lots of effort is put into printing recurrence on output. This scheme also makes determining exactly which events occur on a particular day difficult in SQL. Mike Wokasch At 01:25 PM 10/15/2002 -0400, you wrote: I am creating a calendar of events database CF app from scratch.. An initial question that comes to mind is.what is the best way to store event dates for this.using separate fields called something like from_day, to_day from_month to_month from_year to_year OR - should I somehow just use two fields.one for the from date (ex. 3/12/02) and one for the to date (ex. 3/13/02) I'm trying to think ahead to the customer making calendar changes and displaying the calendar Could anyone with experience creating this type of event calendar share their thoughts on this? Thanks in advance Tim Laureska ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: basic calendar question
Mike it just occurred to me...what if you have an event that runs for a couple of months? Does the calendar administrator have to enter the same information 60 times? -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 2:05 PM To: CF-Talk Subject: RE: basic calendar question Mike ... thanks for the responseI see the basis of what you saying is that an event could have multiple days with potentially different times on each day so set up a different record for each day the event occurs I'm still learning CF/SQL so I got lost in your last paragraph on recurrence. Can you try to explain that aspect again or point me in a direction so I can gain a basic knowledge of what you're talking about Thanks -Original Message- From: Mike Wokasch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 1:41 PM To: CF-Talk Subject: Re: basic calendar question Tim - You're asking a fairly complicated question. Let me simplify the way I ended up doing it was a related datamodel: event [event_id, ...details...] event_date [event_id, date (day, month, year), time, duration] Now, the important thing to note is that event_date is unique on event_id AND date. Every day that an even was good for, got a new record. For my application, time duration were not necessarily the same on every day, in which case, I needed to put it in event date. A more elaborate scheme would be the following event [event_id, ...details...] event_recur [event_id, recur_id, duration] recur [recur_id, ...] In this scheme, ColdFusion would be in charge of placing recurring to the screen properly. A recurrence might be: every other week. A duration might be: 12 times. Lots of effort is put into printing recurrence on output. This scheme also makes determining exactly which events occur on a particular day difficult in SQL. Mike Wokasch At 01:25 PM 10/15/2002 -0400, you wrote: I am creating a calendar of events database CF app from scratch.. An initial question that comes to mind is.what is the best way to store event dates for this.using separate fields called something like from_day, to_day from_month to_month from_year to_year OR - should I somehow just use two fields.one for the from date (ex. 3/12/02) and one for the to date (ex. 3/13/02) I'm trying to think ahead to the customer making calendar changes and displaying the calendar Could anyone with experience creating this type of event calendar share their thoughts on this? Thanks in advance Tim Laureska ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: basic calendar question
Tim - In the first format, yes. If it happens often, then perhaps another solution is in order. However, if it is possible that place or time can change, you may end up with that result anyway In my production version, I think that the only thing that gets replicated are: id and date. Everything else is in related tables. Mike Wokasch UW-Extension At 02:21 PM 10/15/2002 -0400, you wrote: Mike it just occurred to me...what if you have an event that runs for a couple of months? Does the calendar administrator have to enter the same information 60 times? -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 2:05 PM To: CF-Talk Subject: RE: basic calendar question Mike ... thanks for the responseI see the basis of what you saying is that an event could have multiple days with potentially different times on each day so set up a different record for each day the event occurs I'm still learning CF/SQL so I got lost in your last paragraph on recurrence. Can you try to explain that aspect again or point me in a direction so I can gain a basic knowledge of what you're talking about Thanks -Original Message- From: Mike Wokasch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 15, 2002 1:41 PM To: CF-Talk Subject: Re: basic calendar question Tim - You're asking a fairly complicated question. Let me simplify the way I ended up doing it was a related datamodel: event [event_id, ...details...] event_date [event_id, date (day, month, year), time, duration] Now, the important thing to note is that event_date is unique on event_id AND date. Every day that an even was good for, got a new record. For my application, time duration were not necessarily the same on every day, in which case, I needed to put it in event date. A more elaborate scheme would be the following event [event_id, ...details...] event_recur [event_id, recur_id, duration] recur [recur_id, ...] In this scheme, ColdFusion would be in charge of placing recurring to the screen properly. A recurrence might be: every other week. A duration might be: 12 times. Lots of effort is put into printing recurrence on output. This scheme also makes determining exactly which events occur on a particular day difficult in SQL. Mike Wokasch At 01:25 PM 10/15/2002 -0400, you wrote: I am creating a calendar of events database CF app from scratch.. An initial question that comes to mind is.what is the best way to store event dates for this.using separate fields called something like from_day, to_day from_month to_month from_year to_year OR - should I somehow just use two fields.one for the from date (ex. 3/12/02) and one for the to date (ex. 3/13/02) I'm trying to think ahead to the customer making calendar changes and displaying the calendar Could anyone with experience creating this type of event calendar share their thoughts on this? Thanks in advance Tim Laureska ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm