GWFOS Design Database

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

GURU PROJECT

DESIGN DATABASE
Version 1.0

Date: 22 - Feb - 2022

GURUACADEMY

WEBSITE FOR ONLINE STUDYING


Submitted by

Do Vu Dung

Dang Xuan Chien

Dang Quang Huy

Le Quang Duong Lam

Nguyen Thi Huu Nhi

Approved by

Guru Project - Mentor:

Name Signature Date

Hung, Dang Viet............................................................................22 - Feb - 2022

Proposal Review Panel Representative:

Name Signature Date


DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

PROJECT INFORMATION

Project Acronym GWFOS

Project Title GURUACADEMY – WEBSITE FOR ONLINE STUDYING


Project Web
URL
Start Date: 22 - Feb - 2022

End Date: 11 - Jun - 2022

Lead Institution International School, Duy Tan University

Project Mentor Ph.D. Hung, Dang Viet


Chien, Dang
Scrum Master Xuanchienk58@gmail.com 0384.565.564
Xuan
Dung, Do Vu Vudung05032000@gmail.com 0795.461.796
Huy, Dang
Dqhuy153@gmail.com 0783.465.975
Quang
Team Members
Lam, Le Quang
Duonglam.dev@gmail.com 0796.751.185
Duong
Nhi, Nguyen Thi
Nguyenhuunhi2610@gmail.com 0372.220.380
Huu

DOCUMENT INFORMATION

Document Title Design Database

Author(s) Team GURU

Role [GWFOS] Design Database_v1.0

Date 22 – Feb – 2022 File Name [GWFOS] Design Database

URL

Access

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

REVERSION HISTORY

Version Person(s) Date Description Approval

1.0 GWFOS team 22/02/2022 Initial Release x

Document Approval
The following signatures are required for approval of this document
Mentor Hung, Dang Viet Date

Scrum Master Chien, Dang Xuan Date

Product Owner Dung, Do Vu Date

Huy, Dang Quang Date

Team Member Lam, Le Quang Duong Date

Nhi, Nguyen Thi Huu Date

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

TABLE TAB CONTENT


I. OVERVIEW.....................................................................................................1
1.1. Introduction..................................................................................................1

1.2. Purpose.........................................................................................................1

1.3. Related documents.......................................................................................1

1.4. Overview application:..................................................................................1

II. INTRODUCTION TO THE MONGODB DATABASE MANAGEMENT


SYSTEM................................................................................................................... 2
2.1. Introduction..................................................................................................2

Advantage..........................................................................................................2

Disadvantage.....................................................................................................3

2.2. Versioning....................................................................................................3

III. DESIGN DATABASE......................................................................................3


3.1. Assumption:.................................................................................................4

3.2. Rules for creating tables:..............................................................................4

IV. DATABASE SPECIFICATION.......................................................................4


4.1. Users table....................................................................................................4

4.2. Courses table................................................................................................5

4.3. CourseCategories table.................................................................................5

4.4. Streams table................................................................................................5

4.5. Feedbacks table............................................................................................6

4.6. Chapters table...............................................................................................6

4.7. CourseDetail table........................................................................................6

4.8. Notifications table........................................................................................7

4.9. Chatbot table................................................................................................7

V. DIAGRAMS.....................................................................................................7

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

I. OVERVIEW.

I.1. Introduction.

This database design provides the basis for designing an online teaching and
learning website database that integrates AI chatbot. It defines the database that will
support the online teaching and learning website data model integrated with the AI
chatbot. It describes both logical and physical definitions, non-functional problems,
and database interfaces. The storage aspects are defined in the physical database
designs.

- The following topics are covered in this document:


• Assumptions and decisions about database design.
• Create entity mapping.
• Define schema, database field.
• Define primary key, special type.
• Column and row validation rules (check constraints).
• Interfaces and dependencies with other components.
• Description of data access.
I.2. Purpose.

Database design for online teaching and learning website integrated with AI
chatbot including definitions for database objects obtained by entity-based input
into tables, attributes for columns, unique identifiers for unique keys and
relationships with foreign keys.
I.3. Related documents.

Document requirements project to build an online teaching and learning


website that integrates AI chatbot.
I.4. Overview application:

Online teaching and learning website integrated with AI chatbot is an


application for users to teach and learn online conveniently, meeting their own
needs.

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

Besides, integrated facial recognition helps to take attendance when studying


online.
II. INTRODUCTION TO THE MONGODB DATABASE
MANAGEMENT SYSTEM.

II.1. Introduction.

- MongoDB is an open-source database management system, a database


belonging to NoSql (non-relational database) and used by millions of people.
- MongoDB is a document-oriented database, the data is stored in a JSON
document instead of a table like a relational database, so the query will be
very fast.
- With relational databases we have the concept of tables, relational databases
(like MySQL or SQL Server...) use tables to store data, then with MongoDB
we will use the concept of collection instead of tables.
- Compared to RDBMS, in MongoDB collection corresponds to table, and
document corresponds to row, MongoDB will use documents instead of rows
in RDBMS (Relational Database Management System means relational
database management system).
- Collections in MongoDB are structured very flexibly, allowing data to be
stored without having to follow a certain structure.
- Related information is stored together for quick query access through the
MongoDB query language.

Advantage

- Because MongoDB uses data storage in the form of Document JSON, each
collection will have different sizes and documents, flexible in data storage,
so developer can insert whatever they want.
- Data in MongoDB has no mutual constraints, there is no join like in
RDBMS, so when inserting, deleting or updating it does not need to take
time to check if it satisfies the data constraints like in RDBMS.
- MongoDB is very scalable (Horizontal Scalability). In MongoDB, there is a
cluster concept that is a cluster of nodes containing data that communicate

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

with each other, when we want to expand the system, we just need to add a
node to the cluster.
- The data field "_id" is always automatically indexed (indexed) for the
highest performance information query speed.
- When there is a data query, the record is cached to Ram memory, to serve the
following query faster without having to read from the hard drive.
- High performance: The query speed (find, update, insert, delete) of
MongoDB is much faster than that of relational database management
systems (RDBMS). With a large enough amount of data, the test shows that
the insert speed of MongoDB can be up to 100 times faster than MySQL.

Disadvantage

- An advantage of MongoDB is also its disadvantage. MongoDB does not


have binding properties like in RDBMS, so when working with MongoDB,
developer have to be very careful.
- Memory consuming because the data is stored as key-value, collections only
differ in value so the key will be repeated. Does not support join, so it is easy
to data redundancy.
- When insert/update/remove a record, MongoDB will not immediately update
to the hard drive, but after 60 seconds MongoDB will write all the changed
data from RAM to this hard drive, which will be a disadvantage because
there will be a risk. data loss when situations such as power failure occur.

- data loss when situations such as power failure occur.

II.2. Versioning.

It has many versions for different operating systems: is an open-source


database management system that runs on most operating systems such as
Windows, Linux, Mac OS X, Unix, etc.

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

III. DESIGN DATABASE.

This section covers the decisions that were made when designing the database
for the application Building an online teaching website with an AI chatbot.
Problems, alternatives and motivational choices are listed below.
III.1. Assumption:

Some assumptions were made due to lack of information, which will be


updated in the next version of the database design document.
III.2. Rules for creating tables:

When entities entered the tables, the following rules were applied:

• Entities are entered into tables (collections) in a unique way.


• Attributes are passed to columns in such a way that one constitutes a
document.
• Entities with a one-to-one relationship embedded in a primary entity.
• Entities with a one-to-many relationship are embedded in a primary entity or
separated into two separate collections with reference, similar to foreign keys
in RDBMS.
• Many-to-many relationships are implemented using a join table.

IV. DATABASE SPECIFICATION.

IV.1. Users table.

Database field Datatypes description


_id ObjectId Primary-key
email String Email
password String Password
firstName String Forename
lastName String Surname
dateOfBirth Datetime Date of birth
address String Address
role String Role
status String Status

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

IV.2. Courses table.

Database field Datatypes Description


_id ObjectId Primary-key
name String Course name
description String Description
userId ObjectId User Id of teacher (foreign-key)
createdDate datetime Create day
price number Course’s price
discount number Discount
status string Status
categoryId ObjectId Id course type (foreign-key)

IV.3. CourseCategories table.

Database field Datatypes Description


_id ObjectId Primary-key
categoryName String Course category name
status String Status
discount number Discount

IV.4. Streams table.

Database field Datatypes Description


_id ObjectId Primary-key
courseId ObjectId Id Course (Foreign-key)
title string Stream title
date datetime Stream time
participateNumber number Stream members

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

IV.5. Feedbacks table.

Database field Datatypes Description


_id ObjectId Primary-key
userId ObjectId Id user (foreign-key)
rating number Rating stars
content string Feedback details
date datetime Feedback time
courseId ObjectId Id course(foreign-key)

IV.6. Chapters table.

Database field Datatypes Description


_id ObjectId Primary-key
courseId ObjectId Id Course (foreign-key)
number number Chapter orders
title string Title
description string Description
tests array Chapter's tests
attachments array Chapter’s attachments
videos array List teaching video

IV.7. CourseDetail table.

Database field Datatypes Description


courseId ObjectId Id course (Primary-key)
userId ObjectId Id user (Primary-key)
certificate boolean course certificate
dateOfEnroll datetime Day of enroll
testResults array Test result

GURUACADEMY
DESIGN DATABASE GURUACADEMY - WEBSITE FOR ONLINE STUDYING -
2022

IV.8. Notifications table.

Data field Datatypes Description


_id ObjectId Primary-key
date datetime notification time
title string Title
content string Notification content
userId ObjectId Id user (foreign-key)

IV.9. Chatbot table.

Data field Datatypes Description


_id ObjectId Primary-key
answers array Chatbot answers
type string Answer's types

V. DIAGRAMS.

Diagram.

GURUACADEMY

You might also like