Hi,
I Wonder if the use of Relationship is absolutely needed to build an access database??
There is an alternate way to work with table without having them in Relationship.
I have read thru many document about Relationship, but I still cant figure out the way to work around what I needed, so I Wonder if Relationship is really needed?
Example:
A student can have many classes.
Each class can have many exam.
Each class can have many activity.
Each exam can have many corrector.
Each activity can have many instructor.
If there is no Relationship needed, i will create my table this way:
tblStudent:
[student_id] PK
[student_name]
[student_address]
tblClass:
[id] PK
[student_id]
[student_class]
[class_local]
tblExam:
[id] PK
[student_id]
[student_class]
[exam_name]
[exam_corrector]
tblActivity:
[id] PK
[student_id]
[student_class]
[activity_name]
[activity_instructor]
Example of data:
tblStudent:
A225 - Tom Cruise - 1144 Street
A226 - Selina Rom - 3343 Street
tblClass:
1 - A225 - Math - L305
2 - A225 - Physic - L303
3 - A225 - Chemistry - L303
4 - A226 - Math - L305
5 - A226 - Education - L304
tblExam:
1 - A225 - Math - Exam1 - John Corrector
2 - A225 - Math - Exam2 - Sylvia Corrector
3 - A225 - Math - Exam3 - John Correct
4 - A225 - Physic - Exam1 - John Correct
5 - A225 - Chemistry - Exam1 - Richard Corrector
5 - A225 - Chemistry - Exam2 - John Corrector
6 - A226 - Math - Exam1 - Richard Corrector
7 - A226 - Education - Exam1 - Richard Corrector
tblActivity:
1 - A225 - Math - Activity1- Eric Instructor
2 - A225 - Physic - Activity1 - Eric Instructor
3 - A226 - Math - Activity1 - Eric Instructor
4 - A226 - Education - Activity1 - Manon Instructor
5 - A226 - Education - Activity2 - Manon Instructor
For each student in the form, I will need a subform to display all their class unique only.
I will need to display their activity, and exam as well.
It's easier for me to work with VBA to have the data filter for the student, but I just don't know if that is the right way, because I cant figure out how to make the Relationship works in this scenario.
I am stuck at the tblClass which has relation to tblActivity and tblExam.
Can anyone explain if I can just stay out the Relationship or it is important to have the Relationship built in?
Thanks.
I Wonder if the use of Relationship is absolutely needed to build an access database??
There is an alternate way to work with table without having them in Relationship.
I have read thru many document about Relationship, but I still cant figure out the way to work around what I needed, so I Wonder if Relationship is really needed?
Example:
A student can have many classes.
Each class can have many exam.
Each class can have many activity.
Each exam can have many corrector.
Each activity can have many instructor.
If there is no Relationship needed, i will create my table this way:
tblStudent:
[student_id] PK
[student_name]
[student_address]
tblClass:
[id] PK
[student_id]
[student_class]
[class_local]
tblExam:
[id] PK
[student_id]
[student_class]
[exam_name]
[exam_corrector]
tblActivity:
[id] PK
[student_id]
[student_class]
[activity_name]
[activity_instructor]
Example of data:
tblStudent:
A225 - Tom Cruise - 1144 Street
A226 - Selina Rom - 3343 Street
tblClass:
1 - A225 - Math - L305
2 - A225 - Physic - L303
3 - A225 - Chemistry - L303
4 - A226 - Math - L305
5 - A226 - Education - L304
tblExam:
1 - A225 - Math - Exam1 - John Corrector
2 - A225 - Math - Exam2 - Sylvia Corrector
3 - A225 - Math - Exam3 - John Correct
4 - A225 - Physic - Exam1 - John Correct
5 - A225 - Chemistry - Exam1 - Richard Corrector
5 - A225 - Chemistry - Exam2 - John Corrector
6 - A226 - Math - Exam1 - Richard Corrector
7 - A226 - Education - Exam1 - Richard Corrector
tblActivity:
1 - A225 - Math - Activity1- Eric Instructor
2 - A225 - Physic - Activity1 - Eric Instructor
3 - A226 - Math - Activity1 - Eric Instructor
4 - A226 - Education - Activity1 - Manon Instructor
5 - A226 - Education - Activity2 - Manon Instructor
For each student in the form, I will need a subform to display all their class unique only.
I will need to display their activity, and exam as well.
It's easier for me to work with VBA to have the data filter for the student, but I just don't know if that is the right way, because I cant figure out how to make the Relationship works in this scenario.
I am stuck at the tblClass which has relation to tblActivity and tblExam.
Can anyone explain if I can just stay out the Relationship or it is important to have the Relationship built in?
Thanks.