I would like to design and develop school application using PHP and MYSQL as backend. The frontend - a combination of HTML, JS and CSS - has a registration form for every school.
Every school has its own students, classes, teachers and the like.
I would like to use a single database with one students table having a client
column that refers to the owner of every record.
e'g: sutd_id, client_id, first_name, last_name......
e'g: class_id, client_id, description, blahblah....
Question 1
Will a WHERE
clause with too many parameters affect performance? I mean thinks like WHERE id='blah' AND class_ID='blah' AND client_id='blah' AND enroll_date between 'time' AND 'AGO'
.
If the case that affects performance, I've thought of creating views for every new client, example: When new successful registration takes place, I will create some extra views
to the database by using new client's unique name.
e'g: new client which is abc
is registered than automatically i will create these views
: (abc_students
, abc_classes....
)
Question 2
Would this approach (the one with the views) affect the performance or accuracy of results?
Question 3
Is there another way to increase the performance, other that creating views?