Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old June 9th, 2003, 06:55 PM
charm charm is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 2 charm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Database Design for College Dept

I had previously posted this question. I am trying to do a class project. I want to build a database for the computer department of a college. Any help would be appreciated. Below are the tables I have created so far. The tables I am having problem with are the course table not quite sure if creditvalue and courseduration should be in this table. Also having some problem with the enrollment table - don't know if I have it set up properly.

Student table
StudentID (int 4) – primary key not null
SFirstName (nvarchar 20) not null
SLastName (nvarchar 20) not null
SContactNumber (varchar 20) not null
SAddress (nvarchar 20)
SCity (nvarchar 20)
SState (varchar 2)
SZipCode (varchar 5)

Course table
CourseID (int) – primary key not null
CourseTitle (nvarchar)
CreditValue (smallint)?
CourseDuration

Offering table
OfferingID (int) – primary key not null
InstructorID – foreign key not null
CourseID (int) foreign key not null
StartDate (datetime)
EndDate (datetime)
DateWkHeld (datetime)
LabNumber (smallint)
Section
HrsHeld
CourseFee –

Enrollment Table
OfferingID (int) foreign key
CourseID (int) foreign key not null
StudentID (int) foreign key not null
EnrollmentDate (datetime)
NumGrade (smallint)
Pass/Fail (bit)
CourseLoad(FT/PT) (bit)
TypeClassID (int) key would have one of 2 values: 1 or 2 1=MAC 2=PC)
OnlineClass/InPerson (bit)
CreditClass/NonCreditClass (bit)
CourseFee
CourseFeePayDate

Instructor table
InstructorID (int) primary key not null
IFirstName (nvarchar 20) not null
ILastName (nvarchar 20) not null
IContactNumber varchar 20) not null
IAddress (nvarchar)
ICity (nvarchar 20)
IState (varchar 2)
IZipCode (varchar 5)

Reply With Quote
  #2  
Old June 16th, 2003, 12:24 PM
eegdorf eegdorf is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Colorado
Posts: 10 eegdorf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 13 sec
Reputation Power: 0
Just my opininon, but:

I'd keep creditvalue and courseduration in the course table, I'd also move HrsHeld and CourseFee from offering to the course table. Not sure what you mean by section so you may or may not want to move it as well. I'd also probably move all of the following from enrollment to the offering table:

TypeClassID
OnlineClass/InPerson
CourseFee (possibly part of course instead)
CourseFeePayDate

Not sure about: CourseLoad(FT/PT), is that relating to the student or the course? Either way I don't think it should be in offering.

The key to table design is to think of the tables as distinct objects, only place columns in the table that fit the "idea" for the table. You can then build relationship tables to resolve the many to many relationships that will form. Its a bit of a black art to design without over normalizing and without killing the performance. Also it is perfectly ok to do multiple iterations on the design. The design will never be perfect the first time around and the design will need to be changed as performance/programming issues arise.

Good luck,

Eric

Reply With Quote
  #3  
Old June 16th, 2003, 08:56 PM
ngibsonau ngibsonau is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 138 ngibsonau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
I haven't gone through the tables too thoroughly but I think your course table looks ok.

The best thing to do is either build the database 3 or 4 differnet ways and pick the best one.

Usually time does not permit such luxury.
Second best (or maybe even better) is to apply a good set of rules or even some hueristic where the special cases are few and can be worked out at the end.

If you try to normailize everything to 3rd normal form your not far from correct most of the time.

Here is my simplistic view of what 3rd normal form is. (I may be wrong or slightly vauge, but then lets call it the hueristic not the rule version)

Make sure you have a coulmn or columns that can be used as a key to usinquely indentify every row without ambiguity.

Make sure any data that repeatedly appears in several different rows eg. suburb names. gets taken out and placed in a new table and referneced via a key eg. postcode.

Make sure all fields in each table depend directly on the key column/columns and not on each other. Again suburb name would be moved out of a record for a person and their address here because a persons address would be assoicated with a postcode and a the postcode would be associated with a suburb name
(or perhaps the reverse, the suburb may be kept with the person and the postcode and suburb name in another table)

In your case the Instructor table has a state field which should probably removed and placed in its own table because you can work out the state from the zipcode. But you cant work out what state it is if you know the city because some cities in different states have the same name.

Also in your student table I would be inclined to move the student details out into another table. ie. contact number, address etc. as these do not rely on the firstname or lastname but only on the person id, so they should be moved out to a student details table with studentId as key. This also allows for the growth of new student detail feilds in your system without affecting other parts that only care about the student name.
Im also in favour or moving phone numbers into their own table so that people can have more than one phone number.

In your course table the credit value column may be fine if all courses have the same type of value. But if some courses are measured in credit points and others are measured in percentages then you would need to rework it so that you can tell which type you are talking about and what the value actually was.

One final note your Enrollment table may need splitting as it seems a little bloated. But all depends on your interpretation of what fields hold. I think things like pass/fail and course load would probably be better out in some other tables of their own.

Don't just take my word for it I may be totally wrong. But remeber
a wise king has many advisers
__________________
--

ngibsonau

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Database Design for College Dept


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway