Database design and establishment

Initial establishment of the database

After several editions of improvements, the database has been initially established. The following is a brief description:

demand analysis

The administrator creates a conference. In this conference, you can set multiple roles, such as moderator, participant type one, type two, etc., and then make different roles correspond to different files. In this meeting, a tablet corresponds to a role.

Administrators can create polls, and one tablet can cast one or more options in one poll.

This design uses the mechanism of separation of roles and devices to control permissions. Meeting-related documents are not directly associated with the device, which improves the flexibility of the system. The administrator can designate any device as the host or adjust the role at will Permissions, through the management of roles and equipment to achieve batch adjustment of permissions.

Data Dictionary

Entity set

1.meeting table

name Types of Description
uid int Meeting number
name varchar meeting name
content varchar Content of meeting
begin_time time Meeting start time
end_time time Meeting end time

The meeting table contains the basic content of the meeting, the main key is the meeting number

2.device table

name Types of Description
uid int device ID
mac varchar MAC address
name varchar Equipment name

The device table contains the basic information of the device, and the primary key is the device number

3. Role table

name Types of Description
uid int Role number
name varchar Role Name

The role table contains the basic information of the role, the primary key is the role number

4.file table

name Types of Description
uid int File Number
name varchar file name
address varchar address

The file table contains the basic information of the file, the primary key is the file number

5.choice table

name Types of Description
uid int Option number
content varchar Option content
belongs int Which vote belongs to

The option table contains the basic information of the option, the primary key is the option number

6.vote table

name Types of Description
uid int Voting number
name varchar Voting name
content varchar Voting content
anonymous int Is anonymous
type int Voting type
meeting_id int Owning Conference Number

The voting table contains the basic information of the voting, and the primary key is the voting number

Relation set

1.device_role

name Types of Description
role_id int
device_id int
meeting_id int

2.meeting_role

name Types of Description
meeting_id int
role_id int
file_id int

3.device_choice

name Types of Description
device_id int
choice_id int

Guess you like

Origin blog.csdn.net/weixin_55713817/article/details/115048742