Mysql – Schema for yearly data models

database-designMySQLschema

I am developing a school management system.

Most data will not be reused after the end of the school year.

I am contemplating using schemas to separate data in various school years, however I am afraid I don't know very much about schemas.

Would it be a good idea to use a new schema for each school year to store data (see below), rather than adding a year field and using a where clause for all queries?

schema_year1.attendance_of_staff
schema_year2.attendance_of_staff

Best Answer

Maybe, you should use staff, attendance_staff, and school.

staff table
==========
id, 
fullname,
birthday
...

school Table
==============
id,
name, 
founded,
number_of_staff
...

attendance_staff table
=======================
id,
staff_id,
school_id,
attended_date,
...