Hi, I'm just getting in PHP and MySQL and in English is my second language so please forgive me until I try to describe your question. Well.
I am trying to create a feedback system where students can leave feedback about the teacher. First select a subject by logging in to a student, then find a teacher who teaches that topic and can leave the teacher's response. All responses to a teacher can be seen publicly (login is not required) and teachers can log in and log in and view feedback, once marked as a feedback reading It will not be shown publicly again
The problem I am facing is not about myself or the login system etc. It is about the database structure. Primarily teacher feedback databases, first teachers are classified by topics, then each teacher needs to store feedback, and those feedback can be activated (can not be read yet) or passive (read).
Since I'm new to PHP and MySQL, I do not know how to design how to make the database effective, let's give a problem as an example "The active responses of a teacher Display numbers "I think of some ways to approach this, but it can not decide how best is
Solution 1, a huge database to store everything, the most First time Depending on the topics, the database should be filtered, then filtered by the teacher name / id, then filter the inactive, then how many active feedbacks are there, giving a personal database, and when the student leaves the feedback, then that special teacher Is stored directly in an active database, when the teacher marks it as inactive, it can be moved individually. (Disabled) Database of that teacher, so to know the number of active feedback, just count the number of data in that active database
Solution 3, Alliance Solutions 1 and 2, because each teacher only has one subject So we create large databases for each subject, and for each topic we create an inactive database where we store passive feedback, a feedback It has been marked as read, it will be transferred to that database. Then to know the number of active reactions, we can filter the subject to find the teacher and the teacher count can count only because all passive people will be in a different database
I hope That I did not confuse you with your details, I really appreciate if any of you make me the database for this problem in PHP and MySQL Can tell you the effective way! Edit 1: Sorry, I mean tables rather than database, so the question is, should I make several tables for this problem or stick with one.