我们正在努力建立一个教师和家长沟通平台。我们在第一年的平台上有大约500所学校,30万名学生,30,000名教师和500,000名家长。
我在考虑以下设计
Design 1
All students from all the schools are in one table , Max 300,000 rows
All teachers from all the schools are in one table, Max 30,000 rows
All events,posts from all the schools are in one table., INCREMETNS BY 1500 every day.
All the schools attendance data in single table.. increments 300,000 per a day.
Design 2
Separating tables at school level,
school_1_students table contains only school_1 student details,
school_2_students table contains only school_2 student details,
So totally 300 schools * 5 tables = 1500 tables
Design 3
Separating databases at school level,
School_1_db contains all the tables of school1,
so totally 300+ dbs.
设计1在行级别很容易区分,只有出勤才是每天实际增加30万行的表格,我们应该只将这个表格分成学校水平还是任何建议?
Design 2在一个数据库中创建了1000多个表,几乎所有表的模式都是相同的。
设计3提供了良好的分离,我们是否可以使用nodejs动态处理不同的数据库以及如何管理与多个dbs的连接?
学生和家长将逐年增加。所以我们必须考虑未来的系统生存。我们应该使用NOSQL还是SQL?
这种系统的行业惯例是什么?请提出一些更改或参考。