健身课程预约系统的数据库模式
我需要一个健身课的方案。
预订系统需要存储它可以容纳的最大学生人数、预订加入班级的学生人数、学生 ID、日期时间等。
学生表需要存储他/她预订的课程。但如果我将学生 ID 存储在班级表中,则可能不需要这样做。
我希望能得到一些好主意。
提前致谢。
I need a schema for fitness class.
The booking system needs to store max-number of students it can take, number of students who booked to join the class, students ids, datetime etc.
A student table needs to store classes which he/she booked. But this may not need if I store students ids in class tables.
I am hoping to get some good ideas.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
*不是 mySql 专家,我通常使用 MS SQL 打交道,但我想您会明白的。您可能需要在 mySql 文档中进行一些挖掘,以找到与我建议的数据类型相匹配的适当数据类型。另外,我只对某些类型进行了简短的解释,以阐明它们的用途,因为这是 mySql 而不是 MS SQL。
Class_Enrollment - 存储每个学生注册的班级
Class - 存储您的班级
Student - 存储您的学生
*Not a mySql guru, I typically deal w/ MS SQL, but I think you'll get the idea. You might need to dig a little in the mySql docs to find appropriate data types that match the ones I've suggested. Also, I only gave brief explanation for some types to clarify what they're for, since this is mySql and not MS SQL.
Class_Enrollment - stores the classes each student is registered for
Class - stores your classes
Student - stores your students