I am creating a database and unsure how to continue.
I have two tables created so far: Members, Instructors
Each student can attend only one class; but each instructor can teach multiple classes. I have linked Customer ID as Primary Key with Course ID. However they are linked in the order they are shown. I want to link multiple customers with a Class.
I hope I have made sense.
Thanks in advance!!
Andrew
16 1799
Can you give the field names?
Table 1 Field names: Customer ID (PK); Prename; Surname;Address
Table 2 Field Names: ClassID; Date/Time; Exercise; Instructor
You should have some sort of Enrollment table that has foreign keys for students, instructors and courses. This should allow any combination for your classes.
So I need to have 3 tables?
I would recommend at least these:
1 Table listing all your students
1 Table listing all your courses
1 Table listing all your instructors
1 Table listing all enrollments, which would use the PK from the other tables to know which students are taking which courses (which gives the instructor, too).
Depending on if you have different terms or semesters, you would have a table for that as well.
Structure is simple, but would allow you to adjust instructors to classes as necessary.
Please let m eknow if you have any additional questoins.
I believe that you will need 4 tables. Since each class can have many students and each student can take multiple classes, this forms a many-to-many relationship which requires a join table. So your tables would be like the following: tblInstructors
InstructorID PK
Prename
Surname
Address
etc. tblStudents
StudentID PK
StuPrename
StuSurname
StuAddress
etc. tblClasses
ClassID PK
ClassName
Instructor
NumberOfCredits
etc.
Your join table would be tblStudentClasses
StudentID PK
ClassID PK
Instructors would be related to the classes, classes to the join table and students to the join table.
Ok thanks for your answers, but the database I am making means that one student can only join one class but a class can have multiple students.
Okay, then you can get rid of the join table (tblStudentClasses) and add a Class field to tblStudents and make a relationship on that.
Of course, this assumes that a student would only ever take one class. If the student returns for another class, you still need the tblStudentClasses so keep a record of which classes the student took in the past.....
so in terms of relationship, what fields would i join together
Assuming no tblStudentClasses...
tblInstructors to tblclasses on InstructorID:Instructor.
tblStudents to tblClasses on Class:ClassID.
Seth gave a pretty good example in #7 above. That should really be your starting point. There will probably be more info you need to build into this table, but this should be the skeleton you start with.
Ok, I managed to do it on MS Access and its working. Thank you Seth and twinnyfo.
Sorry for asking another question, but do you know how I would make a query which would list the classes a particular instructor must attend
As this is a separate question from the original topic, please start a new thread and I/we can help you there. I'm not an admin for this website, or I would move it for you.
Ok thanks, will do that now
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ed |
last post by:
I am running Access 2002 and just ran the built in Access wizard for
splitting a database into a back end (with tables) and front end (with
queries, forms, modules, etc.).
After running the...
|
by: Max |
last post by:
Hi. I really hope someone can help me. Going slowly insane with this
problem.
I have a two Access 2000 databases. One is the backend containing
tables and some admin queries. The other is the...
|
by: Ruben Baumann |
last post by:
Just wondered if anyone has had occasion to use, or does use, FileMaker, or
Raining Data's Omnis, or Alpha5's software, and how they compare with
Access?
Ruben
|
by: davegb |
last post by:
I'm totally new to relational database design. My boss has asked me to
create a database of information on the employees in our group. Seemed
to me like a simple application to learn the ropes. A...
|
by: Dixie |
last post by:
I need to delete some relationships in code. How do I know what the names
of those relationships are?
|
by: salad |
last post by:
I'm curious about your opinion on setting relationships.
When I designed my first app in Access I'd go to Tools/Relationships and
set the relationships. Over time I'd go into the window and see...
|
by: ARC |
last post by:
Hello all,
Prior to going live with my app, I have questions on relationships theory.
My prior app was done in Access 97, and I did NOT use relationships at all.
I have 65 tables in my...
|
by: Richard |
last post by:
Hi folks, thanks for taking the time to read this (and hopefully point
our where I'm going wrong).
The scenario:
I have a local Access2007 database which links in several read only
mySql...
|
by: Phil Stanton |
last post by:
I have a FE, BE database on my home computer and a duplicate on the office
computer. Both use Ak2 on Windows XP. The one at home appears normal.
The BE consists of about 50 tables with numerous...
|
by: Gordon Padwick |
last post by:
A form contains controls, one or more of which can be other forms. A form that contains another form is known as a main form. A form contained by a main form is known as a subform. A subform itself...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |