A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

One class, multiple students?



 
 
Thread Tools Display Modes
  #1  
Old October 8th, 2007, 12:05 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Bob Quintal
external usenet poster
 
Posts: 939
Default One class, multiple students?

"Eric IsWhoIAm" wrote in
:

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" wrote in message
. ..
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" wrote in message
...
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

  #2  
Old October 8th, 2007, 12:17 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Eric IsWhoIAm
external usenet poster
 
Posts: 37
Default 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


  #3  
Old October 8th, 2007, 12:27 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Ken Snell
external usenet poster
 
Posts: 177
Default One class, multiple students?

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" wrote in message
...
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




  #4  
Old October 8th, 2007, 12:38 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Eric IsWhoIAm
external usenet poster
 
Posts: 37
Default One class, multiple students?

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" wrote in message
. ..
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" wrote in message
...
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






  #5  
Old October 8th, 2007, 12:50 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Bob Quintal
external usenet poster
 
Posts: 939
Default One class, multiple students?

"Ken Snell \(MVP\)" wrote in
:

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

  #6  
Old October 8th, 2007, 01:03 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default One class, multiple students?

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" wrote in message
...
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" wrote in message
. ..
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" wrote in message
...
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








  #7  
Old October 8th, 2007, 01:18 AM posted to microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Fred Boer
external usenet poster
 
Posts: 314
Default One class, multiple students?

Dear Eric:

I am late to this thread, and I see other threads that include you that I
haven't read - so pardon me for jumping in (and forgive me if this has been
suggested already)but I thought I might mention that Microsoft has a
template for classroom managment that you might find useful. You can use it
to set up classes, list students, etc.

Look he

http://office.microsoft.com/en-us/te...CT101426031033

Cheers!
--
Fred Boer - Amateur Access Enthusiast
Interests: Library software / Z39.50 / Web Services
Freeware Small Library Application available he
http://www3.sympatico.ca/lornarourke/


"Eric IsWhoIAm" wrote in message
...
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




  #8  
Old October 8th, 2007, 01:41 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Ken Snell
external usenet poster
 
Posts: 177
Default One class, multiple students?

"Ken Snell (MVP)" wrote in message
...
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" wrote in message
...
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" wrote in message
. ..
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" wrote in message
...
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










  #9  
Old October 8th, 2007, 02:16 AM posted to microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
Eric IsWhoIAm
external usenet poster
 
Posts: 37
Default One class, multiple students?

Dear Fred,

Thank you for your suggestion! I am very much a "hands-on" type of guy, but
I am certainly going to check that out. Thank you for the tip!

Cheers,
Eric


"Fred Boer" wrote in message
...
Dear Eric:

I am late to this thread, and I see other threads that include you that I
haven't read - so pardon me for jumping in (and forgive me if this has
been suggested already)but I thought I might mention that Microsoft has a
template for classroom managment that you might find useful. You can use
it to set up classes, list students, etc.

Look he

http://office.microsoft.com/en-us/te...CT101426031033

Cheers!
--
Fred Boer - Amateur Access Enthusiast
Interests: Library software / Z39.50 / Web Services
Freeware Small Library Application available he
http://www3.sympatico.ca/lornarourke/


"Eric IsWhoIAm" wrote in message
...
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






  #10  
Old October 8th, 2007, 04:22 AM posted to comp.databases.ms-access,microsoft.public.access,microsoft.public.access.gettingstarted,microsoft.public.access.tablesdbdesign
HELENA SMITH
external usenet poster
 
Posts: 64
Default One class, multiple students?

my is helena smith dale jr why are not talk
"Eric IsWhoIAm" wrote in message
...
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




 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.