Database Design - Struggling with a property that also needs to be an entity

19 views Asked by At

Apologies if this isn't an appropriate place or question style, but I'm really struggling and hopeful I can get some help, even if it's just a pointer to another resource. I've done some work with databases before and have been tasked with building a more complex structure. There is one specific aspect of it I'm struggling to see how to model.

In short, I work at a school and a I need to build a database connecting students and TAs (teaching assistants) to classes. On it's own I can build that...

Students would be entities with their obvious properties (ID, name, etc) Classes would be entities (ID, name, periods they are on, etc)

This causes an N-N relationship so I'd have a linking table between the two.

So far so straightforward and I've build similar with an extension for teachers.

The problem with TAs (rather than teachers) is that they are assigned to periods of a class rather than whole classes. So a student might have maths say every day period 1, assigning them to maths connects them to all of those lessons so the connection from the student to the class makes sense.

The thing is that a TA might only work in that class for Tuesday's period 1 lesson. Now it's the periods that are the entities rather than classes, but the periods are a property of the classes.

I hope you can see my problem.

Thanks in advance for any help/advice/guidance.

0

There are 0 answers