C2SE.23 DatabaseDesign MR
C2SE.23 DatabaseDesign MR
Music Recommendation
CODE: DATABASE DESIGN
Date : March 01, 2023
Submitted by
Lam, Nguyen Viet Minh
Thi, Pham An
Thanh, Nguyen Tan
Huy, Chau Ngoc
Approved by Mentor
Man, Nguyen Duc PhD
Project acronym MR
Tel: 0935040813
Partner
Organization
C2SE.23 TEAM 2
DATABASE DESIGN DOCUMENT
Author(s) C2SE.23
Role C2SE.23-DatabaseDesign
C2SE.23-DatabaseDesign-
Date March 01, 2023 File name:
MR
URL
REVISION HISTORY
C2SE.23 TEAM 3
SIGNATURE
Document Approvals: The following signatures are required for approval of this
document.
Signature:
Signature:
Lam, Nguyen Viet Minh
Scrum master Date:
Signature:
Thi, Pham An
Date:
Signature:
Thanh, Nguyen Tan
Date:
Team
Signature:
member(s) Huy, Chau Ngoc
Date:
C2SE.23 TEAM 4
Contents
1. Introduction.......................................................................................................... 7
1.1. Purpose......................................................................................................................7
1.2. Document Objectives...............................................................................................7
1.3. Intended Audience....................................................................................................7
1.4. Scope..........................................................................................................................7
1.5. System Overview......................................................................................................7
1.6. Acronyms and Abbreviations..................................................................................7
2. System Overview....................................................................................................8
2.1. Database Management System Configuration......................................................8
2.2. Database Software Utilities......................................................................................8
2.3. Support Software......................................................................................................8
3. Database-Wide Design Decisions..........................................................................8
3.1. Key Factors Influencing Design..............................................................................8
3.2. Performance and Availability Decisions................................................................8
4. Database Administrative Functions.....................................................................9
4.1. Responsibility............................................................................................................9
4.2. Applications/Systems Using the Database..............................................................9
4.3. Physical Design.........................................................................................................9
4.3.1.1. api_user...............................................................................................................9
4.3.1.2. api_user_groups...............................................................................................10
4.3.1.3. api_user_user_permission...............................................................................10
4.3.1.4. api_songmood...................................................................................................11
4.3.1.8. api_play_list.....................................................................................................12
4.3.1.9. api_play_list_add.............................................................................................13
4.3.1.10. api_song_love................................................................................................13
4.3.1.7. Authtoken............................................................................................................14
4.4. Entity Mapping..........................................................................................................16
4.4.1. Entity Mapping Diagram.......................................................................................16
4.4.2. Industry...................................................................................................................17
C2SE.23 TEAM 5
4.4.2.1. Users (Role Admin and User).............................................................................17
C2SE.23 TEAM 6
1. Introduction
1.1. Purpose
- Setting up an overview of the database of Music Recommendation web
application.
- Provides database tables and the relationship between them.
- Description designing a database (DB), a collection of data related to storage
on a computer through database management system as a basis for data query
related software.
- Provide the entire needed database for Music Recommendation web
application.
1.2. System Overview
Acronym/Abbreviation Meaning
MR Music Recommendation
SQL SQLite
DB Database
C2SE.23 TEAM 7
2. System Overview
2.1. Database Management System Configuration
- System: Windows
- Vendor:
- Services enabled:
2.2. Database Software Utilities
C2SE.23 TEAM 8
4. Database Administrative Functions
4.1. Responsibility
MR-Web NA In Development NA
Constrain
Field Type Nullable Description
t
ID is the primary key for
api_users. This field is
id int PK False
populated automatically
by the database program.
username varchar(150) False The username of the User.
password Varchar(128) False The password of the User.
email Varchar(245) False The email of the User
first_name Varchar(150) False The first name of the User
last_name Varchar(150) False The last name of the User
is_superuser bool False Superuser's identity
last_login datetime True User's last login time
is_staff bool False Staff's identity
C2SE.23 TEAM 9
is_active bool False Users are active
date_joined datetime False User login date
4.3.1.2. api_user_groups
4.3.1.3. api_user_user_permission
1
C2SE.23 TEAM
0
4.3.1.4. api_songmood
Constra
Field Type Nullable Description
int
ID is the primary key for
api_songmood. This field
id int PK False
is populated automatically
by the database program.
mood Varchar(50) False Mood for the song
4.3.1.5. api_song_mood
4.3.1.6. api_song
Constra
Field Type Nullable Description
int
ID is the primary key for
Mood Song. This field is
id int PK False
populated automatically by
the database program.
artist Varchar(150) True Artist for the song
duration Varchar(10) True Duration for the song
1
C2SE.23 TEAM
1
poster Varchar(100) True Duration for the song
mp3_file Varchar(100) True Mp3_file for the song
love Varchar(150) False Love for the song
name Varchar(150) True Name of the song
4.3.1.7. api_late_song
4.3.1.8. api_play_list
1
C2SE.23 TEAM
2
The duration of the
duration Varchar(10) True
Playlist
poster Varchar(350) True The poster of the Playlist
The mp3_file of the
mp3_file Varchar(350) True
Playlist
id_Song Varchar(150) True Id of the Song
Play_list_Li Foreign key to
Bigint FK True
nk_id api_play_list_add.id
4.3.1.9. api_play_list_add
Const
Field Type Nullable Description
raint
4.3.1.10. api_song_love
1
C2SE.23 TEAM
3
The name of the Song
name Varchar(150) True
love
Foreign key to
User_Link_id Bigint FK True
api_user.id
4.3.1.7. Authtoken
1
C2SE.23 TEAM
4
time.
Foreign key to
user_id Bigint FK False
api_user.id.
1
C2SE.23 TEAM
5
4.4. Entity Mapping
4.4.1. Entity Mapping Diagram
1
C2SE.23 TEAM
6
4.4.2. Industry
4.4.2.1. Users (Role Admin and User)
1
C2SE.23 TEAM
7
4.4.2.3. Late songs
4.4.2.4. Playlist
1
C2SE.23 TEAM
8
4.4.2.5. Song love
4.4.2.6. Authtoken
1
C2SE.23 TEAM
9
5. References
2
C2SE.23 TEAM
0