Demand analysis
The system is designed to facilitate the management of student residences.
Provide registration for students and teachers, check the student dormitory number, adjust the dormitory and other functions.
At the same time, considering the need for maintenance and refurbishment of the dormitory, the system provides the function of submitting and accepting maintenance applications. After the student submits the repair application, the dormitory management will dispatch maintenance personnel to the maintenance.
User classification
- Student (Male/Female): Managed by a boarding teacher
- Dormitory manager: Manage all rooms and students
- Maintenance personnel: Including cleaning, maintenance personnel, etc…
Functions
Dormitory manager:
- Check student accommodation
- Reasonable allocation of rooms
- Adjust student dormitory allocation
- Delete students who are no longer staying
Maintenance personnel:
- Inquiry repair application form
- Query working hours
- Check the repair area (room id)
Database Design
This database includes a total of 5 tables: student_db, administrator_db, dormitry_db, maintenance_personnel_db, maintenance_application_db
student_db:
{ID, name, sex, room number (room id)}
This table is used to record and manage different kinds of students.
administrator_db:
{ID, sex, managed room id}
This table is used to record the student’s boarding teacher and the objects they need to manage.
dormitry_db:
{ID, types(male or female), sister teacher's id}
This table is used to record information about the dorms that need to be managed.
maintenance_personnel_db:
{ID, name, sex, position (project responsible for maintenance), working time, off work time}
This table is used to record information about maintenance personnel, including working hours, etc.
maintenance_application_db:
{room id, application for repair}
This tavle is used to record the repair application submitted by the student and is also the work content of the maintenance staff.
Contact
- Student accommodation:
{student_db, dormitry_db}
- Dormitory management:
{administrator_db, dormitry_db}
- Repair application:
{student_db, maintenance_application_db}
- Dormitory maintenance:
{maintenance_personnel_db, maintenance_application_db}
E - R
Table design
student_db:
列名 | 数据类型 | 允许 Null 值 |
---|---|---|
student_id | nchar(10) | False |
student_name | nchar(10) | False |
student_sex | nchar(10) | False |
room_id | nchar(10) | False |
administrator_db:
列名 | 数据类型 | 允许 Null 值 |
---|---|---|
administrator_id | nchar(10) | False |
administrator_name | nchar(10) | False |
administrator_sex | nchar(10) | False |
dormitry_db:
列名 | 数据类型 | 允许 Null 值 |
---|---|---|
room_id | nchar(10) | False |
dormitry_types | nchar(10) | False |
administrator_id | nchar(10) | False |
maintenance_personnel_db:
列名 | 数据类型 | 允许 Null 值 |
---|---|---|
maintenance_personne_id | nchar(10) | False |
maintenance_personnel_name | nchar(10) | False |
maintenance_personnel_sex | nchar(10) | False |
working_time | datetime | True |
off_work_time | datetime | True |
maintenance_application_db:
列名 | 数据类型 | 允许 Null 值 |
---|---|---|
maintenance_application_id | int IDENTITY(1, 1) | False |
maintenance_application | varchar(50) | False |
room_id | nchar(10) | False |
maintenance_personnel_id | nchar(10) | True |
work_status | bit DEFAULT(0) | False |
Database implementation
Case data
student_db:
student_id | student_name | student_sex | room_id |
---|---|---|---|
0001 | Mogeko | Male | M101 |
0002 | Ezie | Female | F101 |
0003 | Washington | Male | M101 |
0004 | Licoln | Male | M102 |
0005 | Daisy | Female | F101 |
0006 | Trump | Male | M101 |
0007 | Noah | Male | M102 |
0008 | Lucy | Female | F101 |
0009 | Obama | Male | M101 |
0010 | Lucy | Female | F101 |
administrator_db:
administrator_id | administrator_name | administrator_sex |
---|---|---|
001 | Herrington | Male |
002 | Van | Male |
003 | Rossett | Male |
004 | Jade | Female |
005 | Eva | Female |
006 | May | Female |
dormitry_db:
room_id | dormitry_types | administrator_id |
---|---|---|
M101 | Male | 001 |
M102 | Male | 001 |
M103 | Male | 001 |
M104 | Male | 002 |
M105 | Male | 002 |
F101 | Female | 004 |
F102 | Female | 004 |
F103 | Female | 004 |
F104 | Female | 004 |
F105 | Female | 004 |
maintenance_personnel_db:
maintenance_personnel_id | maintenance_personnel_name | maintenance_personnel_sex | working_time | off_work_time |
---|---|---|---|---|
001 | Roosevelt | Male | 2018-12-22T09:00:00 | 2018-12T22 22:00:00 |
002 | Kennedy | Male | ||
003 | Nannie | Female | 2018-12-22T09:00:00 | 2018-12-22T22:00:00 |
004 | Dawn | Female |
maintenance_application_db:
maintenance_application_id | maintenance_application | room_id | maintenance_personnel_id | work_status |
---|---|---|---|---|
1 | Door damage | M102 | 001 | 0 |
2 | Faucet damage | F101 | 0 |
Import case data
Create the tables
|
|
Set FOREIHN KEY
|
|
Insert data into the form STUDENT_DB.dbo.administrator_db
|
|
Insert data into the form STUDENT_DB.dbo.dormitry_db
|
|
Insert data into the form STUDENT_DB.dbo.student_db
|
|
Insert data into the form STUDENT_DB.dbo.maintenance_application_db
|
|
Insert data into the form STUDENT_DB.dbo.maintenance_personnel_db
|
|
(Example) Features
Check student accommodation information.
|
|
Newborn stay.
|
|
Students move out of the bedroom.
|
|
Submit a repair request.
|
|
Check the repair application list.
|
|
Accept repair request.
|
|
Complete repair.
|
|