Skip to main content
Inspiring
May 20, 2008
Answered

Table I'm building

  • May 20, 2008
  • 2 replies
  • 316 views
I am creating a "Class" table to hold training class information for my company. Some classes are held on a single date. Others are held on multiple dates like 5/12 - 5/16. Some are held over a two week time frame. All are held on business days, no weekend dates. How should I record this? At first I thought about putting in fields labeled Date1, Date2, etc but then I had second thoughts that might not be the best way. Can anyone give me some advice on this? I am using CF8 and SQL Server 2000.

The fields that I have in my "Class" table thus far are:

ClassID
VendorID
InstructorID
...



Thanks very much.
This topic has been closed for replies.
Correct answer Dan_Bracuk
The most flexible approach would be a Class_dates table with two fields, Class_id and date. Add a record for each date the class runs.

You may also give consideration for maintainig a table of dates, since "business days" usually exclued holidays.

2 replies

Inspiring
May 20, 2008
Dan Bracuk wrote:
> The most flexible approach would be a Class_dates table with two fields,
> Class_id and date. Add a record for each date the class runs.

This is what I would suggest as well. This is definitely the most
flexible. For example, it would be easy to add time to this table so
that a class that is 2 and 1/2 days could easily be recorded.

I.E.
Class_Dates
classID classDate startTime endTime
abc123 5/20/2008 8:00 15:00
abc123 5/21/2008 8:00 15:00
abc123 5/22/2008 8:00 11:00
xyz890 5/30/2008 8:00 10:00
Dan_BracukCorrect answer
Inspiring
May 20, 2008
The most flexible approach would be a Class_dates table with two fields, Class_id and date. Add a record for each date the class runs.

You may also give consideration for maintainig a table of dates, since "business days" usually exclued holidays.