September 20th, 2012, 03:37 AM
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 08:15 AM.
September 25th, 2012, 01:18 AM
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.
1. a) Link StudentTable with SubjectTable with one-to-one relationship.
Originally Posted by chisoko_n
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.
September 29th, 2012, 07:25 AM
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