473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

One class, multiple students?

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
13 3733
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
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
"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

"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

"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
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
"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
"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
"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
"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
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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Gary | last post by:
I haver a table of students - Say 100 students that I need to be able to update/delete and amend. I know I can do this one student at a time which is simple but lets say I want to see all the...
7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
2
by: Bodger | last post by:
Hi, Bearing in mind that I am new to this game, understand very little about SQL and don't work in IT, I was wondering if someone could give me some friendly advice on how to design...
9
by: jaYPee | last post by:
I have search a lot of thread in google newsgroup and read a lot of articles but still i don't know how to update the dataset that has 3 tables. my 3 tables looks like the 3 tables from...
4
by: Dave White | last post by:
Hello Everyone, I have created two tables to track my students' lessons. Each student is responsible for most, but not all. of the lessons. I've tried a junction table but I can't figure out...
7
by: SeaviewBlue | last post by:
Howdy folks, I am new to the site and new to joins, so I'm hoping I can get some much needed assistance. Using ASP, VBscript & an Access 2003 db, I am building a page to display results from...
9
by: pnayak | last post by:
Hi, I am trying to write an intrusive List template class that accepts any type that is derived from a class called Link. I've derived a class called Student from Link to experiment. When I use...
3
by: Ethan Furman | last post by:
Hey all. My thanks to all who have responded so far with my other questions. It is much appreciated. Some background on what I'm doing (a good explanation can be found at...
25
by: doznot | last post by:
Let's say you want to use Moodle to teach an introductory class in PHP programming. Some of the students have little or no computer experience. In addition to background reading and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.