The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Delphi Programming
|
Relational database delphi
Discuss Relational database delphi in the Delphi Programming forum on Dev Shed. Relational database delphi Delphi Programming forum discussing Delphi related topics including Kylix, C++ Builder, and more. Delphi is a high-performance language, originally based on the PASCAL language.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

September 20th, 2012, 02:37 AM
|
|
Contributing User
|
|
Join Date: Jul 2009
Posts: 77
Time spent in forums: 19 h 17 m 50 sec
Reputation Power: 4
|
|
|
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.
|

September 25th, 2012, 12:18 AM
|
|
Contributing User
|
|
Join Date: May 2012
Posts: 140
Time spent in forums: 1 Day 4 h 58 m 17 sec
Reputation Power: 2
|
|
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.
Quote: | 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.
|

September 29th, 2012, 06:25 AM
|
|
Contributing User
|
|
Join Date: Jul 2009
Posts: 77
Time spent in forums: 19 h 17 m 50 sec
Reputation Power: 4
|
|
|
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
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|