By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,454 Members | 2,629 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,454 IT Pros & Developers. It's quick & easy.

One class, multiple students?

P: n/a
I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create a
Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple students. I
only want to store the information once, though. I can't declare an array of
Students for each class.... can I? What is the right way to do this?

Thanks,
Eric
Oct 7 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table, and foreign
key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
>I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create a
Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple students.
I only want to store the information once, though. I can't declare an
array of Students for each class.... can I? What is the right way to do
this?

Thanks,
Eric


Oct 7 '07 #2

P: n/a
Heh... guess I should have seen that one. I only wanted it to show the class
once, but that is really not an option, I now realize. :)
Okay, so this will make it so that I can put in the class and put in the
student. I can list the same class and many students (showing the same class
each time), and I can have the same student in multiple classes.

I'm used to thinking in a programming fashion, where only one object is
defined but it can have an array (or linked list) of other objects in its
definition. They are not analogous to Access database programming, though :)

Thanks,
Eric

"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com. ..
Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table, and
foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
>>I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create a
Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple students.
I only want to store the information once, though. I can't declare an
array of Students for each class.... can I? What is the right way to do
this?

Thanks,
Eric



Oct 7 '07 #3

P: n/a
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in
news:c6***************@newsfe06.lga:
Heh... guess I should have seen that one. I only wanted it to show
the class once, but that is really not an option, I now realize.
:) Okay, so this will make it so that I can put in the class and
put in the student. I can list the same class and many students
(showing the same class each time), and I can have the same
student in multiple classes.

I'm used to thinking in a programming fashion, where only one
object is defined but it can have an array (or linked list) of
other objects in its definition. They are not analogous to Access
database programming, though :)

Thanks,
Eric
That third table is called a junction table.

Consider each record in a table as an array, so the whole table
becomes a two-dimensional array. The primary key of each table is
sort of the subscript to identify which ekement of the array you
work with.

The junction table is an array of pointers to the subscripts in the
main arrays (tables) It's just, in database parlance, the
subscripts are called keys. in your junction table, the keys are
foreign keys, refering to the records in othre tables.

As to showing the class once, or the student once, it's very easy to
do based on this table structure,

If you put the class info in the form header, and the student info
in the detail rows, you get the class once, and each student in a
row below that. You can even get more sophisticated, by using the
form for the class, and a sub-form for the students.
"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com. ..
>Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table,
and foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
>>>I have four tables created so far: Courses, Instructors, Courses
and Instructors (which shows the Course and Instructor Name
fields, but holds their IDs since those are the keys), and
Students. Now, I wish to create a Classrooms (or something
similar) table which will allow me to pick the Course from
Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple
students. I only want to store the information once, though. I
can't declare an array of Students for each class.... can I?
What is the right way to do this?

Thanks,
Eric






--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 8 '07 #4

P: n/a

"Bob Quintal" <rq******@sPAmpatico.cawrote in message
news:Xn**********************@66.150.105.47...
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in
news:c6***************@newsfe06.lga:
>Heh... guess I should have seen that one. I only wanted it to show
the class once, but that is really not an option, I now realize.
:) Okay, so this will make it so that I can put in the class and
put in the student. I can list the same class and many students
(showing the same class each time), and I can have the same
student in multiple classes.

I'm used to thinking in a programming fashion, where only one
object is defined but it can have an array (or linked list) of
other objects in its definition. They are not analogous to Access
database programming, though :)

Thanks,
Eric

That third table is called a junction table.

Consider each record in a table as an array, so the whole table
becomes a two-dimensional array. The primary key of each table is
sort of the subscript to identify which ekement of the array you
work with.

The junction table is an array of pointers to the subscripts in the
main arrays (tables) It's just, in database parlance, the
subscripts are called keys. in your junction table, the keys are
foreign keys, refering to the records in othre tables.

As to showing the class once, or the student once, it's very easy to
do based on this table structure,

If you put the class info in the form header, and the student info
in the detail rows, you get the class once, and each student in a
row below that. You can even get more sophisticated, by using the
form for the class, and a sub-form for the students.
Excellent! I am going to now create a report based on all of my work. Thank
you again!
>"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com ...
>>Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table,
and foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
I have four tables created so far: Courses, Instructors, Courses
and Instructors (which shows the Course and Instructor Name
fields, but holds their IDs since those are the keys), and
Students. Now, I wish to create a Classrooms (or something
similar) table which will allow me to pick the Course from
Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple
students. I only want to store the information once, though. I
can't declare an array of Students for each class.... can I?
What is the right way to do this?

Thanks,
Eric




--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 8 '07 #5

P: n/a

"Bob Quintal" <rq******@sPAmpatico.cawrote in message
news:Xn**********************@66.150.105.47...
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in
news:c6***************@newsfe06.lga:
>Heh... guess I should have seen that one. I only wanted it to show
the class once, but that is really not an option, I now realize.
:) Okay, so this will make it so that I can put in the class and
put in the student. I can list the same class and many students
(showing the same class each time), and I can have the same
student in multiple classes.

I'm used to thinking in a programming fashion, where only one
object is defined but it can have an array (or linked list) of
other objects in its definition. They are not analogous to Access
database programming, though :)

Thanks,
Eric

That third table is called a junction table.

Consider each record in a table as an array, so the whole table
becomes a two-dimensional array. The primary key of each table is
sort of the subscript to identify which ekement of the array you
work with.

The junction table is an array of pointers to the subscripts in the
main arrays (tables) It's just, in database parlance, the
subscripts are called keys. in your junction table, the keys are
foreign keys, refering to the records in othre tables.

As to showing the class once, or the student once, it's very easy to
do based on this table structure,

If you put the class info in the form header, and the student info
in the detail rows, you get the class once, and each student in a
row below that. You can even get more sophisticated, by using the
form for the class, and a sub-form for the students.
Excellent! I am going to now create a report based on all of my work. Thank
you again!
>"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com ...
>>Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table,
and foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
I have four tables created so far: Courses, Instructors, Courses
and Instructors (which shows the Course and Instructor Name
fields, but holds their IDs since those are the keys), and
Students. Now, I wish to create a Classrooms (or something
similar) table which will allow me to pick the Course from
Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple
students. I only want to store the information once, though. I
can't declare an array of Students for each class.... can I?
What is the right way to do this?

Thanks,
Eric




--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com


Oct 8 '07 #6

P: n/a
If you want to make the database even more normalized, you could eliminate
the "Courses and Instructors" table, add a third field to the
"CourseStudents" table for identifying if the record is for a student or for
an instructor, change the name of "CourseStudents" to
"CourseStudentInstructor", and use that for both purposes.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:c6***************@newsfe06.lga...
Heh... guess I should have seen that one. I only wanted it to show the
class once, but that is really not an option, I now realize. :)
Okay, so this will make it so that I can put in the class and put in the
student. I can list the same class and many students (showing the same
class each time), and I can have the same student in multiple classes.

I'm used to thinking in a programming fashion, where only one object is
defined but it can have an array (or linked list) of other objects in its
definition. They are not analogous to Access database programming, though
:)

Thanks,
Eric

"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com. ..
>Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table, and
foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
>>>I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create
a Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple
students. I only want to store the information once, though. I can't
declare an array of Students for each class.... can I? What is the right
way to do this?

Thanks,
Eric




Oct 8 '07 #7

P: n/a
"Ken Snell (MVP)" <kt***********@ncoomcastt.renaetlwrote in message
news:uW**************@TK2MSFTNGP06.phx.gbl...
If you want to make the database even more normalized, you could eliminate
the "Courses and Instructors" table, add a third field to the
"CourseStudents" table for identifying if the record is for a student or
for an instructor, change the name of "CourseStudents" to
"CourseStudentInstructor", and use that for both purposes.
Note that, in this setup, the second field would hold either the Student
foreign key value or the Instructors foreign key value.

And, then you could have just one table -- StaffStudents -- instead of
Instructors and Students tables. And you could put instructors and students
in the same table (with fields to identify when a record is an instructor,
etc.).
--

Ken Snell
<MS ACCESS MVP>


>
--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:c6***************@newsfe06.lga...
>Heh... guess I should have seen that one. I only wanted it to show the
class once, but that is really not an option, I now realize. :)
Okay, so this will make it so that I can put in the class and put in the
student. I can list the same class and many students (showing the same
class each time), and I can have the same student in multiple classes.

I'm used to thinking in a programming fashion, where only one object is
defined but it can have an array (or linked list) of other objects in its
definition. They are not analogous to Access database programming, though
:)

Thanks,
Eric

"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in message
news:Y6******************************@comcast.com ...
>>Create an additional table: CourseStudents.

In that table, put two fields: foreign key for "Courses" table, and
foreign key for "Students" table.

--

Ken Snell
<MS ACCESS MVP>
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but
holds their IDs since those are the keys), and Students. Now, I wish to
create a Classrooms (or something similar) table which will allow me to
pick the Course from Courses and Instructors, and hold multiple Students
for each Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple
students. I only want to store the information once, though. I can't
declare an array of Students for each class.... can I? What is the
right way to do this?

Thanks,
Eric




Oct 8 '07 #8

P: n/a
"Ken Snell \(MVP\)" <kt***********@ncoomcastt.renaetlwrote in
news:uW**************@TK2MSFTNGP06.phx.gbl:
If you want to make the database even more normalized, you could
eliminate the "Courses and Instructors" table, add a third field
to the "CourseStudents" table for identifying if the record is for
a student or for an instructor, change the name of
"CourseStudents" to "CourseStudentInstructor", and use that for
both purposes.
Doesn't that violate first rule of normalization?

First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an organized
database:
Eliminate duplicative columns from the same table.
Create separate tables for each group of related data and identify each
row with a unique column or set of columns (the primary key).

http://databases.about.com/od/specif...malization.htm

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 8 '07 #9

P: n/a
"Bob Quintal" <rq******@sPAmpatico.cawrote in message
news:Xn*********************@66.150.105.47...
"Ken Snell \(MVP\)" <kt***********@ncoomcastt.renaetlwrote in
news:uW**************@TK2MSFTNGP06.phx.gbl:
>If you want to make the database even more normalized, you could
eliminate the "Courses and Instructors" table, add a third field
to the "CourseStudents" table for identifying if the record is for
a student or for an instructor, change the name of
"CourseStudents" to "CourseStudentInstructor", and use that for
both purposes.

Doesn't that violate first rule of normalization?

First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an organized
database:
Eliminate duplicative columns from the same table.
Which is what my additional suggestion in the second post suggests doing --
one table for "people".
--

Ken Snell
<MS ACCESS MVP>

Create separate tables for each group of related data and identify each
row with a unique column or set of columns (the primary key).

http://databases.about.com/od/specif...malization.htm

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 8 '07 #10

P: n/a
"Ken Snell" <kt***********@ncoomcastt.renaetlwrote in
news:1c******************************@comcast.com:
"Bob Quintal" <rq******@sPAmpatico.cawrote in message
news:Xn*********************@66.150.105.47...
>"Ken Snell \(MVP\)" <kt***********@ncoomcastt.renaetlwrote in
news:uW**************@TK2MSFTNGP06.phx.gbl:
>>If you want to make the database even more normalized, you could
eliminate the "Courses and Instructors" table, add a third field
to the "CourseStudents" table for identifying if the record is
for a student or for an instructor, change the name of
"CourseStudents" to "CourseStudentInstructor", and use that for
both purposes.

Doesn't that violate first rule of normalization?

First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an
organized database:
Eliminate duplicative columns from the same table.

Which is what my additional suggestion in the second post suggests
doing -- one table for "people".
I suppose that that's one way of looking at the issue. I suppose I
should have realized that "CourseStudentInstructor" means "People"
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Oct 8 '07 #11

P: n/a
my is helena smith dale jr why are not talk
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create a
Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple students.
I
only want to store the information once, though. I can't declare an array
of
Students for each class.... can I? What is the right way to do this?

Thanks,
Eric


Oct 8 '07 #12

P: n/a
You.... want to talk?

"HELENA SMITH" <254 FLINT STwrote in message
news:eY**************@TK2MSFTNGP03.phx.gbl...
my is helena smith dale jr why are not talk
"Eric IsWhoIAm" <re******@postnewsmessage.comwrote in message
news:wO***************@newsfe06.lga...
>I have four tables created so far: Courses, Instructors, Courses and
Instructors (which shows the Course and Instructor Name fields, but holds
their IDs since those are the keys), and Students. Now, I wish to create
a
Classrooms (or something similar) table which will allow me to pick the
Course from Courses and Instructors, and hold multiple Students for each
Course. I am unsure how to do this in Access.

Each student can have multiple classes; each class has multiple students.
I
>only want to store the information once, though. I can't declare an array
of
>Students for each class.... can I? What is the right way to do this?

Thanks,
Eric



Oct 8 '07 #13

P: n/a
"HELENA SMITH" <254 FLINT STwrote
my is helena smith dale jr why are not talk
Helena,

This isn't a chat room nor e-mail; it is a newsgroup devoted to Questions,
Answers, and Discussion of Microsoft Access database software. I can only
guess that you accidentally posted here, and intended to post where "dale
jr" would see your post. Probably the reason "why dale jr are not talk" is
that he doesn't participate in the newsgroup comp.databases.ms-access. It
may also be a reason why you will not see this response, because you may not
accidentally get into the newsgroup again.

Larry Linson
Microsoft Access MVP
Oct 8 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.