开发者

Database design to manage user meetings

开发者 https://www.devze.com 2023-02-12 19:16 出处:网络
I have an existing database, with a bunch of users. These users will be split among two types, which we will call groups A and B. I need to make a system where group A can schedule meetings with a per

I have an existing database, with a bunch of users. These users will be split among two types, which we will call groups A and B. I need to make a system where group A can schedule meetings with a person in group B, at 20 specific time slots. To do this the way I want, I need:

  • A way to pull a list of all users in group B and who they are meeting with at slot X, including users who don't have a meeting at the time being marked as NULL or similar. Alternatively (and, frankly, preferably), this could be an array of all slots for all users in group B.
  • A way to pull up a full schedule for a given user, whether in group a or group B

I can't think of a decent way to structure a database to ma开发者_开发百科ke these look-ups easy. Any Ideas?


I would probably have a table for Users with a type filed... (A or B). A "meeting slot" to define the specific meeting times. A meeting table that has UserWhoScheduled (not necessary), "meeting slot", and MeetingID. A User_meeting table to link users to meetings.

The look ups would be fairly simple.

0

精彩评论

暂无评论...
验证码 换一张
取 消