Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2003, 11:40 PM
Registered User
 
Join Date: Oct 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 1 table or 2

I need to give administrators the ability of adding instructors to an instructor pool. Instructors will be assigned to courses from the pool. Multiple instructors can be assigned to the same course. I'm trying to decide if I would be better off handling one table or two tables. If I use one table then I will need to check to see if the instructor has been assigned to a course, if so, add another entry otherwise update the courseid column. If I use two tables then I will need to check the pool table to make sure an instructor exists before making an entry in the instuctor table. I'm leaning towards one table. What do you think is best? Thank you for your help.
 
Old October 16th, 2003, 09:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

I'm guessing from your description that the situation you are trying to model has instructors, courses, and course assignments. That looks like three tables to me.

Presumably there are attributes which are constant for any given instructor, demographic data like their name, qualifications, date of hire, whether they are currently active and available for assignment, etc. These attributes are independant of any assignment of the instructor, so should be in a separate table which defines these constants.

The same can be said for any given course. The course description, location, meeting times, etc, are constant attributes of the course and are independant of any instructor assignment.

Finally, there is the assignment of a given instructor to a given course. Perhaps you need to keep a history of what instructors were assigned to what courses when. Such information would not be available if you only had a current assignment value in the instructors table.

It all depends on your application's information requirements, but it looks to me like the three tables I describe may be appropriate, but only you know for sure.

Jeff Mason
Custom Apps, Inc.
www.custom-apps.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
very urgent:cals table to indesign table using xsl franklinclinton XSLT 1 December 16th, 2009 03:48 PM
Populate a List Box with Table Names & Table date hewstone999 Access VBA 1 February 27th, 2008 10:10 AM
Sort Table Columns by Table Header Attribute omrieliav XSLT 4 June 7th, 2006 01:05 AM
(oracle 8i)Alter Table <table> coalesce partition combo Oracle 3 October 13th, 2004 09:35 AM
size of table (type table is table of number) MikoMax Oracle 1 November 19th, 2003 03:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.