0% found this document useful (0 votes)
33 views

Assignment Database

The document provides an overview of database design and development. It defines key concepts such as what a database is, the purpose and importance of databases, different types of databases classified by use, relational databases and their components, and entity relationship diagrams. Relational databases are described as organized collections of data with references between sources. Entity relationship diagrams are used to represent relationships between entities stored in a database and assist with explaining the logical structure.

Uploaded by

Duy Nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Assignment Database

The document provides an overview of database design and development. It defines key concepts such as what a database is, the purpose and importance of databases, different types of databases classified by use, relational databases and their components, and entity relationship diagrams. Relational databases are described as organized collections of data with references between sources. Entity relationship diagrams are used to represent relationships between entities stored in a database and assist with explaining the logical structure.

Uploaded by

Duy Nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

PROGRAM TITLE: BTEC in Computing ( Software Engineering )

UNIT TITLE: Database Design & Development


ASSIGNMENT NUMBER: Assignment 1
ASSIGNMENT NAME: Phone Management System
SUBMISSION DATE: 25/10/2022
DATE RECEIVED: 19/09/2022
TUTORIAL LECTURER: Mr. PHAM SON TUNG
WORD COUNT: 6003

STUDENT NAME: NGUYEN HUU DUY


STUDENT ID: BKC13144
MOBILE NUMBER: 0918398233
Summative Feedback:

Internal verification:
I. INTRODUCTION
- A database, in the most general sense, is an organized collection of data. More
specifically, a database is an electronic system that allows data to be easily accessed,
manipulated, and updated.

In other words, an organization uses a database as an electronic way to store, manage and
retrieve information. The database is one of the cornerstones of enterprise IT, and its
ability to organize, process, and manage information in a structured and controlled
manner is the key to many aspects of modern business efficiency.

However, databases go way beyond simply storing data. As we’ll see later, the inherent
logic and efficiency in how the data is stored and retrieved can provide an incredibly
powerful business tool to an organization. This is especially true when databases are
properly exploited for their reporting and business intelligence capabilities.

II. THEORY
1. Database
1.1. A database:
- Is an organized collection of structured information, or data, typically stored
electronically in a computer system. A database is usually controlled by a database
management system (DBMS). Together, the data and the DBMS, along with the
associated applications, are referred to as a database system, often shortened to just a
database (Oracle, 2020).

1.2. Purpose of Database:


The main purpose of a database is to organize large amounts of information by collecting,
storing, and managing it (Oracle, 2020).

1.3. The role and importance of databases:


- The database has an important role in most areas of business and daily life. It provides
practical benefits such as the ability to store practical information like tax records and
business records:
+A good method of storing information is essential: A database is a collection of data
arranged systematically and consistently. It easily distinguishes between data, which
makes it easy to create, store, and search for information. This results in time and effort
being saved by users, as they no longer need to do that.
+ Data security is ensured: Data must be stored with high security in mind. A database
that's easy to use with convenient input and output makes this possible. When converting
text files to .xml and .csv files, it's possible to store data with utmost security.
+Quick retrieval of user data ensures a fast application: Users can open the database at the
same time by using different file formats. This makes it easy to manage and open data.
+This model is easily customizable for any user need: A database allows users to change
its size and complexity. Databases can store many file sizes from supermarket chain
management to student list management. Creating a database is easy; users can choose
from floppy disks, USBs, and hard drives.
+It is easy to manage Due to its ease of management, this project is typically considered a
success: Database technology offers a convenient way to input, store, process, and
exploits information. People can use a database to enter their product lists and files
systematically and professionally. There's no need to fear duplicating data because
databases automatically organize, create and exploit data. (Oracle, 2020)

1.4 Database classified by the purpose of use:


- MySQL Database System
- Oracle Database System
- Microsoft SQL Server Database System
- PostgreSQL
- MongoDB
- Microsoft Access database management system
- DB2
- Redis
- Elasticsearch
- Cassandra
(Oracle, 2020).

2. Relational database
2.1 What is a relational database?
The concept of a relational database was first mentioned in 1970 by British computer
scientist E. F. Codd. Accordingly, a relational database is a type of database in which data
is related to other information on the database. They are used to store and organize data
with references between two or more sources. Or more simply, a relational database will
consist of a collection of tables accessed and rebuilt in many ways without rearranging the
database tables (Oracle, 2021).
2.2. Components of a relational database:
- Table of data (Table)
 Column / Field (Field): represents the properties of the data table such as name,
address...
 Row (Row): a data line consisting of related data.
 Cell: the intersection between rows and columns, this is where data is stored.
 Primary Key: one or more aggregated fields used to define a record table. The
primary key has two attributes, which cannot be null and cannot be duplicated.
 Note: A table may or may not have a primary key. But for ease of management,
defining primary keys for tables is common.
- Relationship
 Foreign Key: is a field in this table but has a corresponding field as a primary key
in another table to create a relationship between two tables.
 Relationship: Creates a relationship between two tables to determine the
relationship between the data fields of the two tables.
 In a relational database, relationships usually appear in the following three forms:
 One-to-one relationship: each table has only one corresponding record. For
example, husband-wife relationship, basic information relationship - detailed
information...
 1-n relation: the most common relationship in the database. In this system, 1 table
in one table has many corresponding records in another table.
 n-n relationship: one record in one table corresponds to many records in the other
and vice versa. (Oracle, 2021).
3. Entity Relationship Diagram( ERD)
3.1. Entity Relationship Diagram:
Entity Relationship Diagram abbreviated as ERD represents the relationships of the set of
entities stored in the database. Diagrams assist in explaining the logical structure of the
database. ERD includes many specialized symbols, and its meaning makes this pattern
unique (Nishadha, 2019).

3.2. Purpose of Entity Relationship Diagram:


- Helps define terms related to entity-relationship modeling.
Give a demo to preview how all the tables in the DBMS will be connected, and what
fields or attributes will be on each table.+ Describe entities, attributes, and relationships.
Entity-relationship diagrams can be converted to relational tables, thus allowing for rapid
database construction.
Entity-relationship diagrams are used by database designers as a blueprint for
implementing data in applications and software.
- ERD allows for conveying the logical structure of the database to the user (Nishadha,
2019).

3.3. Components of the map execution system:


- What are Direct Visual Entities?
+ Directly Visual Entities are visible objects. For example Invoice, employee, car, dress,
shirt, etc.
Abstract but recognizable entities: Objects that cannot be seen, but only in our mind. For
example Supplier, product type, department, etc... (Nishadha, 2019).
- What are the entity's properties?
+ Each entity set has a set of characteristic properties, each of which is called an attribute
of the + entity set. There is a set of values for each attribute called the value domain for
each attribute.
 The attribute's value domain includes the following value types:
 String Type
 Integer type
 Real number type (real)
+ Attributes include the following types:
 Single attribute – cannot be subdivided
 Complex properties – can be broken down into smaller components
 Attribute value types:
 Monovalues: attributes with unique values for an entity (eg ID number, ...)
 Multivalued: attributes that have a set of values for the same entity (eg: degree, ...)
 Inference (year of birth <—-> age)
 Each entity is distinguished by the key attribute (Nishadha, 2019).

- What is an entity?
+ An entity in DBMS (Database Management System) is a real-world object that has
certain properties called attributes that define the nature of the entity. Entities are
distinguishable, i.e., each entity in a pair of entities has a property that differentiates one
entity from the other.
- What is an entity's attribute?
+ Each entity set has a set of characteristic properties, each of which is called an attribute
of the entity set. For each attribute, there is a set of values for that attribute called the
value domain.

- What are the relationships of entities?


+ A relationship is an association between two or more entities. Entities that participate in
one or more relationships. Relationships are often defined to include things or events with
verbs that affect each other (Nishadha, 2019).

+ 1 to 1: The 1-1 relationship creates two data files that describe two entities. Define a
primary key field, a description field for each file. The relation field can belong to one file
or the other. In both cases, the information obtained is the same
+ 1 to many: The 1 – many relationships is the relationship where one entity record for
the primary entity can be associated with many other related entity records because of the
lookup field on the related entity.
+ many to many: Many to many relationships the relationship depend on a special
Relationship Entity, sometimes called an Intersection entity, so that many records of one
entity can be related to many records of another entity.

- Symbols of components in an entity-relationship diagram:


Entity Symbol Name Description

These shapes are independent of other entities and


are often called parent entities since they will often
Strong
have weak entities that depend on them. They will
entity
also have a primary key, distinguishing each
occurrence of the entity.

Weak entities depend on some other entity type.


Weak entity They don't have primary keys and have no meaning
in the diagram without their parent entity.
Associative entities relate the instances of several
Associative
entity types. They also contain attributes specific to
entity
the relationship between those entity instances.

Name Description
Relationship Symbol

Relationship Relationships are associations between or among


entities.

Weak Weak Relationships are connections between a


Relationship weak entity and its owner.
Name Description
Attribute Symbol

Attribute Attributes are characteristics of an entity, a many-


to-many relationship, or a one-to-one relationship.

Multivalued Multivalued attributes are those that are can take


attribute on more than one value.

Derived attributes are attributes whose value can


be calculated from related attribute values.

Derived
attribute

Relationship Relationships are associations between or among


entities.
- Relational indices:

- Some tools used to draw ERD: Lucid chart, Visual Paradigm, SmartDraw, Creately,
EdrawMax, Dbdiagram, Miro, Datanamic – DeZign for Databases, SqlDBM, dBForge
Studio for SQL Server, Gliffy, Git Mind, Draw.io.
- Tools should be used to draw ERD: Draw.io
-> Reason: draw diagrams online, fast and powerful, free, unlimited quantity (Lucid,
2019).

4. Relational schema
4.1. What is relational schema?
- A relational schema is a blueprint used in database design to represent the data to be
entered into the database and describe how that data is structured in tables (called
relations in relational schemas). The schema describes how those tables relate to each
other.
+ In the relational schema, the table, or relation, consists of a set of named, but unsorted,
columns (called attributes in relational schemas) and an undefined number of unnamed
and unsorted rows (called tuples in relational schemas). Each row is unique, but the rows
can be moved around as needed and stored in any order, modified, or deleted without
impacting the efficient operation of the database (Gleek, 2020).
4.2. Purpose of relational schema
- A relational schema is a blueprint used in database design to represent the data to be
entered into the database and describe how that data is structured in tables (Gleek, 2020).
4.3. How to convert the model to a relational model
- Step 1: Each normal entity type (not a weak entity type) in the ER model becomes a
relation. That relationship includes all the simple and composite attributes of the entity.
The identity attribute of the entity is the primary key to the relationship.
- Step 2: For each Weak Entity in the ER model, forming a relation R, all the simple
attributes of the weak entity become properties of R. In addition, the identity attribute of
the master entity becomes a foreign key of R.
+ The primary key of R is a combination of the identity attribute of the master entity and
the identity attribute of the weak entity.
- Step 3: For each one-to-one relationship in the ER model:
+ Define a relation S_T. Entity type with full participation in the association becomes
relation S, the other entity type becomes relation T.
+Make T's primary key a foreign key of S.
The attribute of the relation S_T becomes an attribute of S.
- Step 4: For each 1_N association in the ER model. Convert the primary key of the 1 side
relation to the foreign key of the N side.
- Step 5: For each association MN, generate a new relation R, converting the primary key
of the two relations M and N into the foreign key of the relation R. The primary key of R
is the combination of the two foreign keys.
- Step 6: If there is a multivalued attribute
Convert multivalued attributes to a new relation.
+ The identity attribute (or part of the identity attribute) of the primary entity is converted
to the foreign key of the new relation.
+ The primary key of the new relationship is the primary key of the relation itself + the
foreign key passed by the primary entity.
- Step 7: For each association of degree (>2), create a new relation (R), the primary key of
the joining relations is given as the foreign key of the relation R, and these foreign keys
also play the role of is the primary key of R.
- Step 8: Dealing with parent/child relationships and specialization or generalization.
Different options for converting several subclasses from the same specialization (or
generalization to the superclass). In addition to the 7 steps described above step 8 below
gives the most common choice and the conditions under which each option can be used.
Use the notation Attr(R) to represent the attributes of R, and PK(R) is the primary key of
R. (MSc. Pham Hoang Nhung, 2017)
5. Relational database management system
5.1. What is RDBMS?
- A relational database management system (RDBMS) is a program used to create,
update, and manage relational databases. Some of the most well-known RDBMSs include
MySQL, PostgreSQL, MariaDB, Microsoft SQL Server, and Oracle Database. (Google
Cloud,2019)

5.2 . What is the role of the database management system?


DBMS manages the data, the database engine, and the database schema, allowing for data
to be manipulated or extracted by users and other programs. This helps provide data
security, data integrity, concurrency, and uniform data administration procedures.
DBMS optimizes the organization of data by following a database schema design
technique called normalization, which splits a large table into smaller tables when any of
its attributes have redundancy in values. DBMS offers many benefits over traditional file
systems, including flexibility and a more complex backup system.
Database management systems can be classified based on a variety of criteria such as the
data model, the database distribution, or user numbers. The most widely used types of
DBMS software are relational, distributed, hierarchical, object-oriented, and network.
(Appdynamics, 2020)

5.3. Some of the database management systems:


- MySQL
- MariaDB
-Oracle
- MongoDB
-SQLServer
=> I choose SQL Server because SQL provides rich scripts for data inquiry tasks such as:
Insert, delete, and update rows in a relation
+ Create, add, delete, and modify objects in the database.
Controls access to the database and its objects to ensure the database's security,
consistency, and binding.
+ IDEs
+ Support Community
+ Security
+ Cancel Query
+ Storage engines
+ Syntax
+ Environment (PACISOFT, 2020)

6. Standardized data
6.1. Database normalization
Normalization is the process of splitting a table (decaying) into smaller tables based on
functional dependencies. Standard forms are guidelines for designing tables in a database.
- The purpose of normalization is to eliminate data redundancy and redundancy
manipulation errors and data manipulation errors (Insert, Delete, Update). But
normalization increases the query time. (Richard Peterson, 2019)

6.2. Database normalization forms


Full Names Address Movies Salutation
Central Kien Doan 45 Nguyen Khang My love, On Your Mr.
Street Wedding Day
Nhu Son Quach Dai 20 Le Mat Clash of the Titans, Mr.
Harry Potter
Central Kien Doan 45 Nguyen Khang Sherlock Holmes Mr.
Street
Kieu Trang Tran 15/10 Tran Thai Minions Mrs.
Tong Street

- 1NF: First Normal Form

 Each table cell should contain a single value.


 Each record needs to be unique.

Full Names Address Movies Salutation


Central Kien Doan 45 Nguyen Khang My love Mr.
Street
Central Kien Doan 45 Nguyen Khang Sherlock Holmes Mr.
Street
Central Kien Doan 45 Nguyen Khang On Your Wedding Mr.
Street Day
Nhu Son Quach Dai 20 Le Mat Clash of the Titan Mr.
Nhu Son Quach Dai 20 Le Mat Harry Potter Mr.
Kieu Trang Tran 15/10 Tran Thai Minions Mrs.
Tong Street

- 2NF ((Second Normal Form) Rules:

Rule 1: Be in 1NF

Rule 2: Single Column Primary Key that does not functionally dependent on any subset of
candidate key relation

Membership ID Full Names Address Salutation


1 Central Kien Doan 45 Nguyen Khang Mr.
Street
1 Central Kien Doan 45 Nguyen Khang Mr.
Street
1 Central Kien Doan 45 Nguyen Khang Mr.
Street
2 Nhu Son Quach Dai 20 Le Mat Mr.
2 Nhu Son Quach Dai 20 Le Mat Mr.
3 Kieu Trang Tran 15/10 Tran Thai Mrs.
Tong Street

In the table, the Membership ID is the Foreign Key.

Membership ID Movies
1 My love
1 Sherlock Holmes
1 On Your Wedding Day
2 Clash of the Titans, Harry Potter
2 Harry Potter
3 Minions

- 3NF ( Third Normal Form) Rules:

+ Rule 1: Be in 2NF
Rule 2: Has no transitive functional dependencies

To move our 2NF table into 3NF, we again need to divide our table.

Membership ID Full Names Address Salutation ID


1 Central Kien Doan 45 Nguyen Khang 1
Street
1 Central Kien Doan 45 Nguyen Khang 1
Street
1 Central Kien Doan 45 Nguyen Khang 1
Street
2 Nhu Son Quach Dai 20 Le Mat 1
2 Nhu Son Quach Dai 20 Le Mat 1
3 Kieu Trang Tran 15/10 Tran Thai 2
Tong Street

Membership ID Movies
1 My love
1 Sherlock Holmes
1 On Your Wedding Day
2 Clash of the Titans, Harry Potter
2 Harry Potter
3 Minions

Salutation ID Salutation
1 Mr.
2 Mrs.
3 Ms.
4 Dr.

- BCNF (Boyce-Codd Normal Form):

+ Even when a database is in the 3rd Normal Form, there would still be anomalies if it has
+ more than one Candidate Key.

+ Sometimes BCNF is also referred to as 3.5 Normal Form.

- 4NF (Fourth Normal Form) Rules:

+ If no database table instance contains two or more, independent and multivalued data
describing the relevant entity, then it is in the 4th Normal Form.
- 5NF ( Fifth Normal Form) Rules: A table is in 5th Normal Form only if it is in 4NF and
cannot be decomposed into any number of smaller tables without data loss.

- 6NF (Sixth Normal Form) Proposed:

+ 6th Normal Form is not standardized, however, it is being discussed by database experts
for some time. Hopefully, we would have a clear & standardized definition for the 6th
Normal Form shortly... (Richard Peterson, 2019)

7. Structured Query Language (SQL)


7.1 What is Structured Query Language?
- Structured Query Language (SQL) is a standardized programming language that is used
to manage relational databases and perform various operations on the data in them.
Initially created in the 1970s, SQL is regularly used by database administrators and
developers writing data integration scripts and data analysts looking to set up and run
analytical queries.

- SQL is used for the following: modifying database table and index structures; adding,
updating, and deleting rows of data; and retrieving subsets of information from within
relational database management systems (RDBMSes) -- this information can be used for
transaction processing, analytics applications, and other applications that require
communicating with a relational database. (David, 2020)

7.2 . Statements in the query language

- CREATE
Syntax:" CREATE DATABASE database name;"

- USE
Syntax: " USE database name; "

- SELECT
Syntax: "SELECT * FROM table_name; Or SELECT column1, column2, ... FROM
table_name;"
- DROP
Syntax: " DROP database name; "

- WHERE
Syntax: "SELECT column1, column2, ... FROM table_name WHERE condition;"

- INSERT INTO
Syntax:" INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1,
value2, value3, ...);"

-UPDATE
Syntax: UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE
condition;

- DELETE
Syntax: DELETE FROM table_name WHERE condition;

- JOINS
Syntax: SELECT column_name(s) FROM table1
INNER/LEFT/RIGHT/FULL/CROSS JOIN table2 ON table1.column_name =
table2.column_name; (viblo, 2019)

- ALTER TABLE
Syntax: ALTER TABLE table_name ADD column_name datatype;

8. System Testing
8.1. What is System Testing?
- System Testing is a level of testing that validates the complete and fully integrated
software product. The purpose of a system test is to evaluate the end-to-end system
specifications. Usually, the software is only one element of a larger computer-based
system. Ultimately, the software is interfaced with other software/hardware systems.
System Testing is defined as a series of different tests whose sole purpose is to exercise
the full computer-based system. (Hamilton, 2019)

8.2. Purpose of system testing


- The purpose of system testing is to ensure that a system meets its specification and any
non-functional requirements (such as stability and throughput) agreed upon by its users.
In theory, RGMA could be system tested independently because both its specification and
requirements are public. In reality, only we have an in-depth understanding of the
specification required to do it properly. (Sharma, 2019)

III. PRACTICE
1. Analyze real problems, the database information needs to be stored
- Problem analysis:
- BKC is one of the IT companies in Vietnam that has been hired by HirePhone – a
mobile phone retail chain – to develop software called “HirePhone Store”, which helps
manage and sell phone products for their retail chain. Customers need to know the
basic information of each phone such as IMEI, name of the phone, release date,
capacity, phone size, manufacturer, etc
- You are an employee of BKC company assigned to be in charge of the “Hirephone
Store” software project. Your task is to design and develop the database using the right
design tools and techniques and must test the database according to user requirements.
Finally, you have to provide HirePhone’s owners with technical documentation so
users can see how your database works

2. List of entities
- Phone:
-Salesman:
- Customer:
- Manufacturer
- Comment:
- Shipping Method
- Color:
- Receipt Details:

3. Attributes of entities
- Phone: IMEI, manufacturer, color, price, release_date, chip, ram_capacity,
rom_capacity, length, width, thickness, phone_name.
- Salesman: name, salesman_ID, date_of_birth, address, gender, email, phone_number
- Customer: name, customer_ID, date_of_birth, address, gender, email, phone_number
- manufacturer_name, manufacturer_ID
- shipping_method, customer, salesman, receipt_details,
- Color: color_ID, color_name
- Receipt Details: receipt_ID, code_receit, receipt
- shipping_ID, shipper_name, shipping_brand, shipping_price

4. Relationship of entities
5. ERD
6. Relational schema

7+8. Detailed settings ( Constraints in the database)

Table 1: Color

Data field name Datatypes Constraints

color_ID Int PRIMARY KEY


IDENTITY
color_name NVARCHAR(100) NONE
Table 2: Manufacturer

Data field name Datatypes Constraints

manufacturer_ID Int PRIMARY KEY


IDENTITY
manufacturer_name NVARCHAR(100) NONE

Table 3: Phone

Data field name Datatypes Constraints


IMEI Int PRIMARY KEY
IDENTITY
phone_name NVARCHAR(100) NOT NULL
release_date Date NONE
Chip NVARCHAR(100) NONE
ram_capacity NVARCHAR(100) NONE
rom_capacity NVARCHAR(100) NONE
length NVARCHAR(100) NONE
width NVARCHAR(100) NONE
thickness NVARCHAR(100) NONE
price MONEY NONE
manufacturer_ID Int FOREIGN KEY
color_ID Int FOREIGN KEY

Table 4: Salesman

Data field name Datatypes Constraints


salesman_ID Int PRIMARY KEY
IDENTITY
name NVARCHAR(100) NOT NULL
date_of_birth DATE NOT NULL
address NVARCHAR(100) NONE
gender NVARCHAR(100) NONE
email NVARCHAR(100) NONE
phone_number NVARCHAR(100) NONE

Table 5: Customer

Data field name Datatypes Constraints


customer_ID Int PRIMARY KEY
IDENTITY
name NVARCHAR(100) NOT NULL
date_of_birth DATE NOT NULL
address NVARCHAR(100) NONE
gender NVARCHAR(100) NONE
email NVARCHAR(100) NONE
phone_number NVARCHAR(100) NONE

Table 6: Shipping Method

Data field name Datatypes Constraints


shipping_ID Int PRIMARY KEY
IDENTITY
shipping_brand NVARCHAR(100) NONE
shipping_price MONEY NONE
shipper_name NVARCHAR(100) NONE

Table 7: Receipt

Data field name Datatypes Constraints

code_receipt Int PRIMARY KEY


IDENTITY
purchase_date DATE NONE

total_price MONEY FOREIGN KEY

IMEI Int FOREIGN KEY

shipping_ID Int FOREIGN KEY

salesman_ID Int FOREIGN KEY

customer_ID Int FOREIGN KEY

Table 8: Receipt Details

Data field name Datatypes Constraints

IMEI Int FOREIGN KEY

code_receipt Int FOREIGN KEY

price MONEY NONE

IMEI, code_receipt Int PRIMARY KEY

total_phone int NONE

9. Database diagram
10. Query statements used in the generated database (including queries across multiple
tables)

-SELECT*:

-SELECT.. where:

-SELECT… ORDER BY:


- SELECT… WHERE … like:

- DELETE:

- SELECT… AVG… AS… FROM:

- SELECT … COUNT:

- ALTER TABLE:

- INNER JOIN:

- FULL JOIN:
11. Normalize created database

- All versions are 3NF because it is standard 2 NF and depends on the primary key of the
table
12. System security, database maintenance

- System security, and database maintenance:

+ Login and user

+ Server role

+ Authentication

+ Database role

- System security methods:

- Apply to the created database:

+ Select Security in the Database, right-click, and select New Login:


+ Select SQL Server authentication and manually create LoginName and Password then
Confirm Password

- Next, select User Mapping and select the Map you want to create Login, below we
select the role we want to log in and click OK to finish Login.
IV. APPLY THE TEST TO THE CREATED DATABASE

1. Test log

Set 1:

Set 2:
Set 3:

- Set 4:

- Set 5:

- Set 6:

- Set 7:

- Set 8:

- Set 9:

- Set 10:

- Set 11:
- Set 12:

- Set 13:

- Set 14:

- Set 15:

2. Test case

Test What is being How Test Expected Date Actua Action


tested data Result l Taken
Resul
t

TC1 Show a list of Select all users Set 1 Show all Octob OK None
ShippingMeth in the Shipping values er 25,
od Method table ShippingMet 2022
with the query hod
Select

TC2 Add new user Enter data from Set 2 The user was Octob OK None
the data capture stored in the er 25,
sheet into the database 2022
insert

TC3 Update user Update user has Set 3 The user has Octob OK None
a shipper name updated the er 25,
Nguyen Huu Shipper name 2022
Duy where a to Nguyen
shipper ID = 1 Huu Duy
where
shipper ID =1

TC4 Delete user Delete user has Set 4 The user was Octob OK None
shipping ID = 2 deleted where er 25,
shipper ID = 2022
2

TC5 Show a Select the user's Set 5 The user’s Octob OK None
property of the properties where property has er 25,
user in a table a shipping ID = showed 2022
3

TC6 Show all users Select all users Set 6 Show all Octob OK None
with any has shipping users with the er 25,
attribute in the brand = Tiki and given 2022
table shipping price = attribute in
18990000 the table

TC7 Show all Select the user’s Set 7 October 25, OK None None
attributes of properties has 2022
the user with shipping brand
the given = Lazada or
attribute in the shipping price =
table 78000

TC8 Show all users Select all users Set 8 Show all Octob OK None
with 1 pre- who have sorted users had er 25,
sorted properties sorted 2022
attribute

TC9 Show all users Select all users Set 9 Show all Octob OK None
have the with a given users had er 25,
characters in letter in their selected 2022
their properties
properties

TC1 Show all users Select all users Set 10 Show all Octob OK None
0 have with a given users had er 25,
properties condition filtered 2022
with a given
condition

TC1 Show a Select and Set 11 Show the Octob OK None


1 calculate an calculate result after er 25,
average value average the calculating 2022
from 1 properties of the the average
attribute in the user in the value number
value table table

TC1 Show the Select and count Set 12 Show the Octob OK None
2 number of all the number result after er 25,
users of an of users in an counting 2022
entity entity

TC1 Add an Add an attribute Set 13 Show the row Octob OK None
3 attribute to a to an entity has adding er 25,
pre-existing 2022
entity

TC1 create 1 big Select 2 or more Set 14 Show the Octob OK None
4 table with similar attributes total table er 25,
many from the tables after add 2022
attributes to combine to
form a large
table containing
all the selected
attributes.
TC1 create 1 big Select 2 or more Set 15 Show the Octob OK None
5 table with similar attributes total table er 25,
many from the tables after add 2022
attributes to combine to
form a large
table containing
all the selected
attributes.

V. Technical and user documentation

1. Used RDBMS installation instructions

Step 1: Visit the website: https://www.microsoft.com/en-us/sql-server/sql-server-downl

Step 2: Select Download at Developer


Step 3: The version ѕ after downloading ᴠѕ will be set as SQL2019-SSEI-Dev, extract this
file, and continue the installation will show the following:

Step 4: Select Basic


Step 5: Select accept and continue installing

Step 6: After installing, it will appear as follows, and select Install SSMS
Step 7: Install SSMS will be a downloaded 1 file and here we complete the installation
and can use SQL 2019.

2. RDBMS user manual

Step 1: Start SQL Server

Step 2: Select New Query on the toolbar to open a new page.

Step 3: Start coding and using SQL Server.


- Step 4: After coding, want to use the code, we select the command or commands to run
and highlight it. After highlighting, press F5 or Execute to use it

3. Describe how the database system works including data flow diagrams and
flowcharts

- Flow diagram: A data flow diagram (DFD) is a model of a system that


aligns both data and progress. It shows how information is transported
from one process or function in the system to another process or
function.
- The DFD is a tool used to support the following four main activities of
systems analysts in the information analysis process:
+ Analysis: DFD is used to determine user requirements
+Design: DFD is used to plan and illustrate options for system analysts
and users when designing new systems.
+ Expression: DFD is a simple tool that is easy to understand for system
analysts and users
+ Documentation: DFD allows documentation of the system analysis in
a complete, concise and concise manner. DFD provides users with an
overview of the system and the information flow mechanism in that
system.
- Flowcharts: Flowcharts are used in designing and documenting
complex programs and tasks. Like other types of diagrams, flowcharts
help visualize the problem and help the viewer understand what's going
on, and can then find weak points, bottlenecks, or other ambiguities in
the problem. there. There are many different kinds of flowcharts, each
with different representations of "boxes" and conceptual conventions.
The two most common types of boxes in a flowchart include:
+ Processing steps, often referred to as "actions" and represented by a
rectangular box.
+ The decision step is usually represented by a diamond.
VI. CONCLUSION

1. Evaluate the design performance of user and system requirements

- User and system requirements:

+ Design and manage a database to manage and sell phone products to the retail chain.
+ Customers can view basic information about each phone such as IMEI, model name,
release date, capacity, phone size, and manufacturer.

+ check and use the database as desired by the seller.

- Evaluate the effectiveness of the design against the stated requirements:

+ The work has completed most of the requested content: customers can view basic
information about each phone such as IMEI, model name, release date, capacity, phone
size, and manufacturer; the seller can manage the phone in a small store.

+ Worksheets can be used in some stores with limited products.

+ However, to be able to put it into use at a chain of phone stores, there are still many
shortcomings.

+ Unable to manage a large number of phones in a large chain of stores.

2. Evaluate the effectiveness of the database solution regarding user and system
requirements.

- Evaluate whether meaningful data has been extracted through the use of query tools to
generate appropriate management information.

+ Data has been extracted through the use of query tools to generate appropriate
management information

+ The extracted data is in line with the store's request

- Explain the selection of data to test into the DB, and evaluate the effectiveness of the
test:

+ Selected data has met the requirements of a strange customer, including IMEI, model
name, release date, capacity, phone size, and manufacturer.

+ The test has met the requirements and expectations of the problem.

- Evaluate the effectiveness of the database against stated requirements:

+ The database has met the above requirements.


+ However, there are still a few flaws, and cannot be used for sales.

+ If you want to use it, you have to improve more about storing customer data in the form
of files, so that you can help the store manage customers in an easier, more scientific, and
more convenient way.

+ The file creation will be clear and intuitive to non-IT professionals

3. Evaluate the database for necessary improvements to ensure the continued


effectiveness of the system.

- System Continuity:

+ The most common persistent in a database is a timestamp and the second most common
data types are REAL, FLOAT, and PRECISION DOUBLE. But we cannot represent
continuous values in a calculator. Do we have to approximate them and live with the
errors, model them in the structure of the language or use a programming language to
manipulate them symbolically

+ The other constant in SQL is the timestamp, which is DATETIME2(n) in SQL Server.
The nature of time is very different from real numbers. A dimensionless quantity is a
quantity that has no associated physical space. Time is a dimension to measure the
movement of objects. Time moves and moves in one direction.

+ In my database there is no continuity yet

- Make recommendations for necessary improvements: To implement database continuity,


I think it's better to do:

+ Finding The Culprits


+ Finding Problematic Queries
+ Fine Tuning Queries
+ Execution Plan Re-use
+ Removing Unnecessary Indexes
+ SQL Server Installation And Database Setup
+ Don’t Overload SQL Server
+ Transaction log, tempdb, and memory

- Evaluate the above improvements to help the database ensure continuity:


+ The improvement suggested above will create continuity for the database
VII. REFERENCES

Appdynamics (2020). What is Database Management System (DBMS)? [online]


AppDynamics. Available at: https://www.appdynamics.com/topics/database-
management-systems#~1-what-is-dbms.

David (2020). What is Structured Query Language (SQL)? [online]


SearchDataManagement. Available at:
https://www.techtarget.com/searchdatamanagement/definition/SQL#:~:text=Jessica
%20Sirkin- [Accessed 10 Oct. 2022].

Gleek (2020). Diagram maker for developers. [online] www.gleek.io. Available at:
https://www.gleek.io/blog/relational-schema.html.

Google Cloud (2019). What Is A Relational Database (RDBMS)? [online] Google Cloud.
Available at: https://cloud.google.com/learn/what-is-a-relational-database#:~:text=A
%20relational%20database%20management%20system [Accessed 10 Oct. 2022].

Hamilton, T. (2019). What is System Testing? Types & Definition with Example. [online]
Guru99.com. Available at: https://www.guru99.com/system-testing.html.

Henry (2019). Tìm hiểu về SQL ngôn ngữ truy vấn có cấu trúc. [online] viblo.asia.
Available at: https://viblo.asia/p/tim-hieu-ve-sql-ngon-ngu-truy-van-co-cau-truc-
bJzKmwr6l9N.

Lucid (2019). Entity-Relationship Diagram Symbols and Notation. [online] Lucidchart.


Available at: https://www.lucidchart.com/pages/ER-diagram-symbols-and-meaning.

Nishadha (2019). ER Diagram Tutorial | Complete Guide to Entity Relationship


Diagrams. [online] Creately Blog. Available at: https://creately.com/blog/diagrams/er-
diagrams-tutorial/.

Oracle (2021a). What is a database? [online] www.oracle.com. Available at:


https://www.oracle.com/database/what-is-database/.

Oracle (2021b). What is a relational database? [online] Oracle.com. Available at:


https://www.oracle.com/database/what-is-a-relational-database/.

PACISOFT (2020). 10 Lý do chọn Microsoft SQL Server 2019. [online] Trung tâm trợ
giúp - PACISOFT Help Center. Available at:
https://help.pacisoft.com/knowledgebase/10-ly-do-chon-sql-server-2019/#:~:text=SQL
%20l%C3%A0%20ng%C3%B4n%20ng%E1%BB%AF%20phi [Accessed 10 Oct. 2022].
Richard Peterson (2019). What is Normalization? 1NF, 2NF, 3NF & BCNF with
Examples. [online] Guru99.com. Available at: https://www.guru99.com/database-
normalization.html.

Sharma, L. (2019). What is System Testing? Its Objectives, Test Basics and Test Objects.
[online] TOOLSQA. Available at:
https://www.toolsqa.com/software-testing/istqb/system-testing/.

Ths. Phạm Hoàng Nhung) (2017). Cơ sở dữ liệu: Chuyển từ mô hình ER sang mô hình
quan hệ - VOER. [online] voer.edu.vn. Available at: https://voer.edu.vn/c/chuyen-tu-mo-
hinh-er-sang-mo-hinh-quan-he/d11e79e2/3a0b6c88 [Accessed 10 Oct. 2022].

You might also like