Reply
DB Design Problem (University Database)
Old 12-03-2008, 06:26 AM DB Design Problem (University Database)
Junior Talker

Posts: 3
Hi All,

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




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
Folly is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 12-03-2008, 07:30 AM Re: DB Design Problem (University Database)
tripy's Avatar
Do not try this at home!

Posts: 2,818
Name: Thierry
Location: Latitude 46.79057 :: Longitude 7.119377
with a 1n<->n1 join from table_student to tbl_grade via a linking table

Code:
+----------+ 1     N +---------------+  N        1 +----------+
| students |---------| studentGrades |-------------|  grades  |
+----------+         +---------------+             +----------+
__________________
Trust me, I know what's good for you...

tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 12-03-2008, 08:38 AM Re: DB Design Problem (University Database)
Junior Talker

Posts: 3
I would need to include the module in there somewhere?
Folly is offline
Reply With Quote
View Public Profile
 
Old 12-03-2008, 10:01 AM Re: DB Design Problem (University Database)
stoot98's Avatar
Ultra Talker

Posts: 426
Name: Stuart
Location: Glasgow, Scotland
I would have it as just a single table, like

Student
--studentID
--name
--...etc

Grades
--moduleID
--studentID
--grade

The only reason i w ould do it as Tripy suggests is to normalize the 'grade' field, which if it is a letter (e.g. A, B, C etc) and you wanted to convert all to numbers (e.g. A=1, B=2, C=3 etc) then you would only change one row for each. But if it is stoerd as a percentage for example it would save more space and time to store as i have suggested.
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 12-03-2008, 11:08 AM Re: DB Design Problem (University Database)
tripy's Avatar
Do not try this at home!

Posts: 2,818
Name: Thierry
Location: Latitude 46.79057 :: Longitude 7.119377
Quote:
The only reason i would do it as Tripy suggests is to normalize the 'grade' field
It was my idea of not directly using the grades table, yeah.
__________________
Trust me, I know what's good for you...

tripy is online now
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to DB Design Problem (University Database)
 

Thread Tools

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10458 seconds with 12 queries