Jump to content

Best way to create a school schedule with 8 periods?


luiscovar

This topic is 3312 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hello,

 

I have a database with the information of every student in the school linked and everyone has a unique ID provided by the school. Now, I have access to their school schedules from an excel file. Each student has 8 periods. What is the best way to create a relationship so I can have some sort of portal on the layout with the student information to show their schedule sorted from period 1 - 8.

 

What I currently did was have 8 excel files each with the student ID and each excel file had only one period. So I imported the period 1 and period 2 but without matching, i just kept adding new records. Right there would be 8 records in the "Schedule" table all with the same student ID. This approach worked but I know it is not the best way to do this. Can anyone suggest a better way?

Link to comment
Share on other sites

Sounds about right to me, what is it that's troubling you?

Isn't it bad that there are 8 serials which are supposed to be unique?

 

I created a separate database for a Saturday school session we are having and only some of the students of the school participated in it. Now, I want to import the schedule from the other database that has the schedule of all the students but when I go to do that it only imports one period since I am importing by matching student ID and it overrides the original data when the student id comes up again during the import.

Link to comment
Share on other sites

Isn't it bad that there are 8 serials which are supposed to be unique?

 

In the Schedule table, each Student is supposed to have many (8 in your example) records, and the StudentID is not supposed to be unique.

 

That's how every one-to-many relationship works: in the parent (one) table the ParentID must be unique - usually this will be an auto-entered serial number; in the child (many) table, the ParentID field is just a regular field and the values will not be unique, because by definition one parent has many children.

  • Like 1
Link to comment
Share on other sites

This topic is 3312 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.