Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 20th, 2012, 02:37 AM
chisoko_n chisoko_n is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 77 chisoko_n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 17 m 50 sec
Reputation Power: 4
Facebook
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.

Reply With Quote
  #2  
Old September 25th, 2012, 12:18 AM
Luthfi Luthfi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2012
Posts: 140 Luthfi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #3  
Old September 29th, 2012, 06:25 AM
chisoko_n chisoko_n is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 77 chisoko_n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 17 m 50 sec
Reputation Power: 4
Facebook
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Relational database delphi

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap