Tải bản đầy đủ (.pdf) (22 trang)

Capstone Project 2 Database Design Online Service Market System.pdf

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (2.07 MB, 22 trang )

<span class="text_page_counter">Trang 1</span><div class="page_container" data-page="1">

Phuc Truong Gia Thuan Huynh Van Truong Nguyen Lam

Approved by Huy Nguyen Dang Quang M.Sc.

Proposal Review Panel Representative:

Capstone Project 2-Mentor:

</div><span class="text_page_counter">Trang 2</span><div class="page_container" data-page="2">

Capstone Database Design v2.0 <i>– OSM</i>

PROJECT INFORMATION Project

acronym <sup>Online Service Market System </sup>

Project Tittle <sup>A marketplace that connects Customers & Service Providers in m</sup><sub>service categories </sub> Start Date 21 Feb 2023 End Date 20 May 2023

25211200029 <sup>Quan Tran </sup><sub>Anh </sub> 0362474855 25211203121 <sup>Khiem Le Do </sup><sub>Hoang </sub> 0348597672 25211217162 <sup>Phuc Truong </sup><sub>Gia </sub> 0981864173 25214302052 <sup>Thuan Huynh </sup><sub>Van </sub> 25211217426 <sup>Truong </sup>

Nguyen Lam <sup> </sup>

</div><span class="text_page_counter">Trang 3</span><div class="page_container" data-page="3">

Capstone Database Design v2.0 <i>– OSM</i>

PROJECT PLAN DOCUMENT Document Title Project Plan

Quan Tran Anh, Scrum Master Role Khiem Le Do Hoang Member Phuc Truong Gia Member Thuan Huynh Van Member Truong Nguyen Lam Member Date 28 Apr 2023 Filename

</div><span class="text_page_counter">Trang 4</span><div class="page_container" data-page="4">

Capstone Database Design v2.0 <i>– OSM</i>

DOCUMENT HISTORY

V1.0 20 Mar 2023 Draft for comment V2.0 28 Apr 2023 Update database V3.0 05 May 2023 Update database

</div><span class="text_page_counter">Trang 5</span><div class="page_container" data-page="5">

Capstone Database Design v2.0 <i>– OSM</i>

2.1. Database Management System Configuration ... 2

2.2. Database Software Utilities... 3

2.3. Support Software ... 3

3. Database-Wide Design Decisions ... 3

3.1. Key Factors Influencing Design ... 3

3.2. Performance And Availability Decisions ... 3

4. Database Administrative Functions ... 3

</div><span class="text_page_counter">Trang 6</span><div class="page_container" data-page="6">

Capstone Database Design v2.0 <i>– OSM</i>

LIST OF TABLES

Table 1: System Overview ... 2

Table 2: Acronyms And Abbreviations ... 2

Table 3: Database Software ... 3

Table 4: Support Software ... 3

</div><span class="text_page_counter">Trang 7</span><div class="page_container" data-page="7">

Capstone Database Design v2.0 <i>– OSM</i>

TABLE OF FIGURES

Figure 1. Entity Mapping ... 14

</div><span class="text_page_counter">Trang 8</span><div class="page_container" data-page="8">

Capstone Database Design v2.0 <i>– OSM</i>

• 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 OSM web application. 1.2. Document Objectives

The Database Design Document has the following objectives

• To describe the design of a database, that is, a collection of related data stored in one or more computerized files that can be accessed by users or developers via a DBMS.

• To serve as a basis for implementing the database and related software units. It provides the acquirer visibility into the design and provides information necessary for software development.

1.3. Intended Audience

• This document is intended for the following audiences

• Technical developers, who must evaluate the quality of this document • Developer including:

o Architects, whose overall architecture design must meet the requirements specified in this document.

o Designers, whose design must meet the requirements specified in this document.

o Developers, whose software must implement the requirements specified in this document. Quality Assurance personnel, whose test cases must validate the requirements specified in this document.

1.4. Scope

• This Database Design Document provides the basic database design of OSM web application.

</div><span class="text_page_counter">Trang 9</span><div class="page_container" data-page="9">

Capstone Database Design v2.0 <i>– OSM</i>

• It describes both logical and physical definition, non-functional, database interfaces, tables, code create tables.

• It includes the tables and performance considerations and requirements. The following topics are covered in this document:

o Assumptions and decisions on database design o Entity – mapping

o Table, column definitions

o Column and row level validation rules (check constraints) o Interfaces and dependencies with other components.

• This Database Design Document of Online Service Market web application is composed of definitions for database objects derived by mapping entities to tables, attributes to columns, unique identifiers to unique keys and relationship to foreign keys.

1.5. System Overview

Table 1: System Overview System Overview Details

System Name Online Service Market System Type Web application Operational Status In development 1.6. Acronyms And Abbreviations

Table 2: Acronyms And Abbreviations Acronym/Abbreviation Meaning

OSM Online Service Market

RDMS Relational atabase Management System D DBMS Database Management ystem S

</div><span class="text_page_counter">Trang 10</span><div class="page_container" data-page="10">

Capstone Database Design v2.0 <i>– OSM</i>

- Services enabled: Linux Virtual Machine 2.2. Database Software Utilities

Table 3: Database Software

Vendor Product Version Comments Oracle

Corporation

MySQL

Workbench <sup>8.0 </sup>

This application enables the ability to manage MySQL database usin GUI.

2.3. Support Software

Table 4: Support Software Product Version Purpose MySQL

Workbench <sup>8.0 </sup> <sup>Generate ERD diagram of MySQL database. </sup> 3. Database-Wide Design Decisions

3.1. Key Factors Influencing Design

- The database should be designed independent when the frontend and backend are still being developed.

- The database should be designed to meet the data warehouse principles. 3.2. Performance And Availability Decisions

We use common dimensional tables for all the fact tables for better performance 4. Database Administrative Functions

4.2. Applications/Systems Using the Database

Table 6: Systems Using the Database

</div><span class="text_page_counter">Trang 11</span><div class="page_container" data-page="11">

Capstone Database Design v2.0 <i>– OSM</i>

The id is the primary key for User record. email <sup>varchar, </sup>

unique <sup>False The email of the user. </sup> password varchar False <sup>The password of the </sup>

user.

full_name varchar False <sup>The full name of the </sup> user.

birthday timestamp True The birthday of the user gender varchar True The gender of the user.

</div><span class="text_page_counter">Trang 12</span><div class="page_container" data-page="12">

Capstone Database Design v2.0 <i>– OSM</i>

total_rate bigInt True total_star bigInt True

click_rate float True

is_valid tinyInt True <sup>User account status (so</sup> delete)

created_at timestamp False <sup>Date and time the </sup> record was created. updated_at timestamp False <sup>Date and time the </sup>

record was last updated

PK False <sup>The id is the primary key </sup> for location record.

user_id bigInt FK False <sup>User identification number.</sup> Foreign key to User.id province_id bigInt True The id of the province. province_nam

e <sup>varchar </sup> <sup>False The name of the province. </sup> district_id bigInt True The id of the district.

</div><span class="text_page_counter">Trang 13</span><div class="page_container" data-page="13">

Capstone Database Design v2.0 <i>– OSM</i>

district_name varchar True The name of the district. ward_id bigInt Tue The id of the ward. ward_name varchar True The name of the ward.

The longitude of the user’s location.

is_primary bit

created_at timestamp False <sup>Date and time the record </sup> was created.

updated_at timestamp False <sup>Date and time the record </sup> was last updated.

The id is the primary key for image record. asset_type varchar True Type of file (image) parent_type varchar True <sup>Describe what model </sup>

this image belongs to. parent_id varchar True Id of parent model.

</div><span class="text_page_counter">Trang 14</span><div class="page_container" data-page="14">

Capstone Database Design v2.0 <i>– OSM</i>

file_name varchar True Name of the file. mime varchar True Type of image file. created_at timestamp False <sup>Date and time the </sup>

record was created.

updated_at timestamp False

Date and time the record was last

The id is the primary key for banner record.

author_id bigInt FK False

User identification number. Foreign key to User.id.

title varchar True The title of the post. content text True The content of the post. date timestamp True Post creation date. tags varchar True The tags of the post. is_valid

tinyInt True Post status (soft delete)

created_at timestamp False <sup>Date and time the record </sup> was created.

updated_at timestamp False <sup>Date and time the record </sup> was last updated.

</div><span class="text_page_counter">Trang 15</span><div class="page_container" data-page="15">

Capstone Database Design v2.0 <i>– OSM</i>

The id is the primary key for category record. name varchar True The name of the category

updated_at timestamp False <sup>Date and time the record </sup> was last updated.

The id is the primary key for service record.

category_id bigInt FK False

Category identification number. Foreign key to Category.id.

</div><span class="text_page_counter">Trang 16</span><div class="page_container" data-page="16">

Capstone Database Design v2.0 <i>– OSM</i>

avg_price bigInt True Average price of service. max_price bigInt True <sup>The highest price of the </sup>

total_rate bigInt True total_star bigInt True

packages <sup>bigInt </sup> <sup>True </sup>

is_valid tinyInt True Service status (soft delete created_at timestamp False <sup>Date and time the record</sup>

was created. updated_at timestamp False <sup>Date and time the record</sup>

was last updated.

The id is the primary key for service record.

</div><span class="text_page_counter">Trang 17</span><div class="page_container" data-page="17">

Capstone Database Design v2.0 <i>– OSM</i>

name varchar True The name of the package description text True <sup>The description of the </sup>

package.

price bigInt True The price of the package total_rate bigInt True

total_star bigInt True

is_negotiable tinyInt True updated_at timestamp False <sup>Date and time the record</sup>

was last updated.

The id is the primary key for appointment record.

</div><span class="text_page_counter">Trang 18</span><div class="page_container" data-page="18">

Capstone Database Design v2.0 <i>– OSM</i>

complete_date timestamp True

The time that the appointment is completed

cancel_date timestamp True

The time when the appointment was rejected

</div><span class="text_page_counter">Trang 19</span><div class="page_container" data-page="19">

Capstone Database Design v2.0 <i>– OSM</i>

offer_date timestamp True <sup>The time on which the </sup> appointment is offered created_at timestamp False <sup>Date and time the </sup>

record was created.

updated_at timestamp False

Date and time the record was last

The id is the primary key for feedback

Number of star for appointment (customer’s rate).

</div><span class="text_page_counter">Trang 20</span><div class="page_container" data-page="20">

Capstone Database Design v2.0 <i>– OSM</i>

created_at timestamp False <sup>Date and time the </sup> record was created.

updated_at timestamp False

Date and time the record was last updated. 5. Entity Mapping

</div><span class="text_page_counter">Trang 21</span><div class="page_container" data-page="21">

C2SE.08

Figure 1. Entity Mapping

</div><span class="text_page_counter">Trang 22</span><div class="page_container" data-page="22">

Capstone Database Design v2.0 <i>– OSM</i>

6. References

- [SDA] 006 Database Design.docx (Man, Nguyen Duc). -

×