Results 1 to 7 of 7
  1. #1
    SONCH is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    7

    linking tables

    Hi!
    I wish to design a data base to manage student enrollment and their Test scores.


    I have two tables:
    1) the enrollment table which caries: StdId; StdName; Sex; Class etc
    NB: each Class has 2 streams i.e. Class 1A; 1B...; Class 2A, 2B ...Class 5A, 5B...
    2) Table 2 is design to hold: Class; StdId; Test1; Test2; Test3

    actually i am thinking there should be many tables of the form of table2 which hold info about each
    such that when you input a student in the enrollment table, an assign a class (e.g. Class 1A) that student should automatically appear in the Class 1A Talbe and test scores can be input there. I hope someone will understand me and propose something for me.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    No, one table. If class stream is not in the enrollment table then have another field in table 2 for this identifier.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,792
    tblStudents: StdID, ForeName, LastName, Sex; ...
    tblClasses: Class (Class values will be "1A","1B", "2A", ...)
    tblStudentClasses: SCID, StdID, YearNo, Class, ...
    tblStudentTests: STID, SCID, TestNo, TestResult

    In case you want to get statistics per Test too, you can consider a table tblClassTests: CTID, Class, YearNo, TestNo, TestDescription.
    Then
    tblStudentTests: STID, SCID, CTID, TestResult

    In case a test containc several questions, and you want to save info about how every student did every question, you need additionally
    tblClassTestCuestions: CTQID, CTID, Question
    tblStudentTestQuestions: STQID, SCID, CTQID, TestResult

  4. #4
    SONCH is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    7
    Thanks for the response. It is actually working.
    Please can you help define the primary key for the table=> tblStudentClasses: SCID, StdID, YearNo, Class, ...
    Will the SCID be the same as the Class Values i.e. 1A, 1B, 2B for example

  5. #5
    Join Date
    Apr 2017
    Posts
    1,792
    Quote Originally Posted by SONCH View Post
    Will the SCID be the same as the Class Values i.e. 1A, 1B, 2B for example
    No! Primary key must be unique. In same class usually are several students. And also the same class can exist in different years - with different set of students. And in case leaving weak students for 2nd year in same calss is practiced, the same student can be in same class more than once - but in different years.

    For best, use autonumeric fields for all PK's (Except for tblClasses, where field Class will be unique anyway)

  6. #6
    SONCH is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    May 2018
    Posts
    7
    Thanks for the info.
    I have some difficulty with the tblStudentsTest. I want us to modify it. it may take two or more tables again.
    This is the problem: in a school year we have three terms and students study a set of subjects per term e.g. English, french, Maths ....
    so I am struggling to create a table for 1st, 2nd and 3rd term results.
    i.e tblTerm1: studentID, ClassId, English, French, Maths
    tblTerm2: studentID, ClassId, English, French, Maths
    tblTerm3: studentID, ClassId, English, French, Maths
    Please help modify this for me

  7. #7
    Join Date
    Apr 2017
    Posts
    1,792
    Then maybe it will be better to use in tblStudentsTests TestDate instead of TestNo. (And probably you add a field TestSubject too)

    You have to add at table where study year terms are registered too
    tblStudyTearTerms: STTID, YearNo, TermNo, TermFrom, TermTo.

    The test belongs to term where TermFrom <= TestDate AND TermTo >= TestDate

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Linking Tables
    By label027 in forum Import/Export Data
    Replies: 1
    Last Post: 11-07-2011, 05:16 PM
  2. linking tables
    By chiefmsb in forum Access
    Replies: 3
    Last Post: 06-23-2011, 05:18 PM
  3. Linking Tables
    By mcintke in forum Access
    Replies: 3
    Last Post: 06-13-2011, 06:28 PM
  4. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  5. Linking tables
    By jlmnjem in forum Database Design
    Replies: 1
    Last Post: 09-17-2010, 01:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums