I came to this forum looking for help on creating a schema for a new app I'm building.
In this app I have 3 tables
Users, Classes and Students
Now I need to provide the following functionality in my application
- A User can be the Teacher of many Classes
- A class can have many teachers
- A User can also have Access to many Classes
- A Class can have many users that have access to it
However when a user is the teacher of a class, he automaticly has access to this class. BUT
if you have access to A class this doesn't mean that you are the teacher of this class.
Why am I asking this?
Well a teacher can add grades or scores to the diffrent students that belong to the classes he has access to. He can also view the file about this students.
If you just have access to a certain class you can only VIEW grades and VIEW the files.
What's the solution?
That's the part where you come in? I was thinking of maybe two assosiation tables
But this just feels wrong....
- MYSQL 5
- PHP 5
- Framework can't generate ORM for assn tables with more than 2 columns
All help is appreciated.
Sorry for my bad english