Results 1 to 3 of 3
  1. #1
    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 Attached Thumbnails university.jpg  
    Last edited by Folly; 12-03-08 at 07:15.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Threads merged. Folly, please do not cross-post.
    George
    Home | Blog

  3. #3
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •