#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    77
    Rep Power
    6

    Relational database delphi


    I am designing an application that uses a database to track students attendance for Saturday school programme for disadvantaged kids. I am using MS Access with the following information:

    1. StudentTable: StudentID, SubjectID, StudentName, Surname, School etc
    2. StudentAttendanceTable: StudentID, 1stTerm, 2ndTerm, 3rdTerm, 4thTerm
    3. TutorTable: TutorID, Name, Surname, IDNumber, SubjectID
    4. TutorAttendanceTable:,TutorID, 1stTerm, 2ndTerm, 3rdTerm, 4thTerm
    5. SubjectTable: SubjectID, TutorID, SubjectName
    6. StudentResultsTable: StudentID, Grade1, Grade2, Grade3, Grade4

    I have set up a relational table where I want the following to happen:

    1. A student can only pick one subject, have one attendance record, have one set of results
    2. A tutor can only teach one subject, have one attendance record

    Not sure how to attach the image properly, hopefully it shows else please tell me how
    Last edited by chisoko_n; September 20th, 2012 at 07:15 AM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    151
    Rep Power
    3
    I am not sure what is the problem, since you have never explicitly asked it. But I am assuming that the proble is related with what I quoted below.

    Originally Posted by chisoko_n
    I have set up a relational table where I want the following to happen:

    1. A student can only pick one subject, have one attendance record, have one set of results
    2. A tutor can only teach one subject, have one attendance record
    1. a) Link StudentTable with SubjectTable with one-to-one relationship.
    b) and/or make unique index in StudentTable on StudentID and SubjectID fields.
    c) Make StudentID field in StudentAttendanceTable either the primary key (prefered) or as unique index.
    d) Make StudentID field in StudentResultsTable either the primary key or as unique index.

    2. a) Link TutorTable with SubjectTable with one-to-one relationship.
    b) and/or make unique index in TutorTable on TutorID and SubjectID fields.
    c) Make TutorID field in TutorAttendanceTable as either primary key (prefered) or unique index.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    77
    Rep Power
    6
    Thank you for the assistance, I will try the following. Because I was having a problem inputting the data into my database due to some of my relationships, hopefully that will work

IMN logo majestic logo threadwatch logo seochat tools logo