首页 > 解决方案 > 活动组织者的数据库架构设计

问题描述

我最近开始自己学习一个项目,该项目是我的前同事给我的,他们给了我一个设计 golang 应用程序的技术挑战,我仍在学习该语言,并且我正在尝试提出一个健全的数据库设计。这是应用程序目标,

Goals 
1. Allow self-registration of users into the system, each user having a unique username and a password. 


2. Allow events to be created, scheduled, deleted and automatically archived once the is past. Events should have: 
    1. Owners, the only ones allowed to change event time, description, venue or modify anything but scheduled content for the event. 
    2. Scheduled dates and durations (eg. “starts 2019/04/03 at 10am and ends on 2019/04/04 at 5pm”). 
    3. Venues: An address field where the event will occur 
    4. Description: What the event is about. This can optionally include a picture - an event logo or banner or other descriptive graphic. 

3. Allow existing events to have ad-hoc sessions proposed by anyone who has signed up event. A session should have a title, a basic description, a speaker (by default, the 
user proposing the event) and a duration. 


4 Sessions should be scheduled into the available time for the event in a first-come, first scheduled basis. 
No session can overlap another session. 
If all available time slots have been claimed for the event, no additional 
sessions should be schedulable unless the event owner or a 
session owner deletes or changes the necessary time for a session to make room. 

我的目标是学习很多关于这个应用程序的开发,我创建了一个对我有意义的数据库模式,帮助我改进这个应用程序并发展我的思维过程。

我打算使用 golang、gorm 和 mux 进行数据库抽象和 API 开发。在此处输入图像描述

标签: database-design

解决方案


推荐阅读