[英]Database design for meeting room availability and booking
I am trying to create a scheduling system for our office meeting rooms.我正在尝试为我们的办公室会议室创建一个日程安排系统。 currently we have three meeting rooms, each one in a different size , different floor and not all of them are available the entire week ( for example between 12:00 - 14:00 one of them operates as a dining hall )
目前我们有三间会议室,每间都有不同的大小、不同的楼层,而且并不是所有的会议室都可以在整个星期使用(例如在 12:00 - 14:00 之间,其中一个用作餐厅)
my current problem is how to represent the time table for each room ie我目前的问题是如何表示每个房间的时间表,即
Meeting room 1
capacity: 16 ( how many people can fit )
available:
Monday: 8:00-12:00 , 14:00-18:00
Tuesday: 8:00-12:00 , 14:00-18:00
..
..
Sunday: UNAVAILABLE.
so in our office management system ( python-flask ) im having hard time figuring out how to build and represent the database tables ( MySQL ) and how to design my code.所以在我们的办公室管理系统 (python-flask) 中,我很难弄清楚如何构建和表示数据库表 (MySQL) 以及如何设计我的代码。
any suggestion / guidance will be appreciated任何建议/指导将不胜感激
ERD of your solution您的解决方案的 ERD
You will need a ternary junction table.您将需要一个三元连接表。 Many rooms are available for many days and for many hours.
许多房间可以使用很多天和很多小时。 Foreign keys from the Room, Day, and Time tables to make each record unique.
来自 Room、Day 和 Time 表的外键,使每条记录都是唯一的。 If a day/time compound key is not listed for a room, default is "Not available".
如果房间未列出日期/时间复合键,则默认为“不可用”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.