I've to design a database for a tuition centre.

Here is some business rules for it:
- A centre has many student (1-m)
- A centre has many teacher (1-m)
- A centre offer one or more subjects (1-m)
- A teacher teaches one or more subjects and a subject can be taught by many teachers (m-n)
- A student may take one or more subjects and a subject can be taken by many students (m-n)
- A subject has one or more schedule (different day different time slot) (1-m)
- Different centre for the same subject can have different schedule (???)

I've some problem on how to fix the many-to-many (m-n) relationship and also the last one which different centre for the same subject can have different schedule (It will affect how a teacher may get different timetable regarding the centre and subject).

Here I've attached the ERD for the database. Hope someone can guide me on this.
Thanks :)

Recommended Answers

All 3 Replies

If I want to search subject taught by a teacher can I go through Centre table and search for the subject? The same goes to student.

Does the problem involve more than one centre? Or is it one centre running many courses? If the later, you would not need the centre entity.

Do teachers teach at more than one centre? If so, you need a linking table for that.
Is a student attending more than one centre (probably not).
If a student takes more than one subject, you need a linking table for that.

currently your erd is too simple. Work on the many to many relations first.

Yeah, I understand that the ERD is too simple because it is just a first draft.

The problem involve more than one centre, that's why there's a centre entity.
Teachers teach at one centre only. (m-1)
students attending at one centre only. (m-1)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.