If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > University Database Design (small problem)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-08, 05:24
Folly Folly is offline
Registered User
 
Join Date: Nov 2008
Posts: 4
University Database

Hi All,

I have been asked to design a University database (for a small uni project) and this is what I have so far (please see attached image).

I've designed the database so that a student can only enroll on a signle programme. Each programme has multiple modules (eg A business degree would have an Accounting, Human resources module etc).

The problem I have now is that I want to be able to record each students grade for each module in a new table. I was wondering what the best way of doing this was.

Many thanks

Folly
Attached Thumbnails
University Database Design (small problem)-university.jpg  

Last edited by Folly; 12-03-08 at 06:15.
Reply With Quote
  #2 (permalink)  
Old 12-03-08, 06:25
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Threads merged. Folly, please do not cross-post.
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 12-03-08, 06:29
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Add a table that links Students, Modules and Grades. Consider what the key should be (and I don't mean "StudentModuleGradeID" - see below!)

Some comments:
  • Why prefix your tables with "Table_"? Students, Modules, Grades are good table names.
  • You don't need to add a surrogate key to every table - in particular, not to the one that links Modules to Programmes, which should have as its key the compound (ModuleID, ProgrammeID), and the new table. You need to think about what makes a row really unique - consider:
Code:
insert into Grades (GradeId, Grade) values (1, 'A');
insert into Grades (GradeId, Grade) values (2, 'A');
insert into Grades (GradeId, Grade) values (3, 'A');
Your design makes that perfectly acceptable data.
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On