You are on page 1of 33

1

Table of Contents
1. Introduction.................................................................................................................................4
2. STUDY ON FUNCTIONALITY OF CURRENT SYSTEM....................................................5
3. BUSINESS RULES......................................................................................................................6
4. DESIGN........................................................................................................................................7
4.1. Conceptual Database Design.................................................................................................7
Entity Relationship Diagram (ERD)..............................................................................................7
4.2- Logical Database Design............................................................................................................8
Enhanced Entity Relationship Diagram (EERD)...........................................................................8
4.3. NORMALIZATION...................................................................................................................9
4.3.1. The normalised database tables’ structure is shown in the table below................................9
4.4- Database Schema ( Data Dictionary ).......................................................................................13
4.5- Physical Database Designs.......................................................................................................15
4.5.1- .SQL-DDL [MEMBER_T] – NG KAH JUN....................................................................15
4.5.2- .SQL-DDL [PUBLISHER_T] – NG KAH JUN................................................................16
4.5.3- .SQL-DDL [ORDER_T] – GO THEE CHUEN................................................................17
4.5.4- .SQL-DDL [BOOK_T] – GO THEE CHUEN...................................................................18
4.5.5- .SQL-DDL [MEMBER_BOOK_T] – LAI CALVIN........................................................19
4.5.6- .SQL-DDL [MEMBER_ORDER_T] – LAI CALVIN......................................................20
4.5.7- .SQL-DDL [MEMBER_PHONE_T] – TAN JIAN SHIUN..............................................21
4.5.8- .SQL-DDL [STORE_MANAGER_ORDER_T] – TAN JIAN SHIUN.............................22
5. IMPLEMENTATION...............................................................................................................23
5.1 SQL DML statements used.......................................................................................................23
5.1.1 - Question 1 (LAI CALVIN).............................................................................................23
5.1.2 – Question 2 (LAI CALVIN)..............................................................................................23
5.1.3 – Question 3 (LAI CALVIN)..............................................................................................24
5.1.4 – Question 4 (GO THEE CHUEN).....................................................................................25
5.1.5 – Question 5 (GO THEE CHUEN).....................................................................................25
5.1.6 – Question 6 (GO THEE CHUEN).....................................................................................26
5.1.7 – Question 7 (TAN JIAN SHIUN)......................................................................................27
5.1.8 – Question 8 (TAN JIAN SHIUN)......................................................................................27
5.1.9 – Question 9 (TAN JIAN SHIUN)......................................................................................28
5.1.10 – Question 10 (NG KAH JUN).........................................................................................28
5.1.11 – Question 11 (NG KAH JUN).........................................................................................29
5.1.12 – Question 12 (NG KAH JUN).........................................................................................30
6. CONCLUSION..........................................................................................................................31

2
7. WORKLOAD MATRIX...........................................................................................................32
8. References..................................................................................................................................33

3
1. Introduction
The assignment teams for the new introduction to Database course examine the
organisational details of establishing databases, managing them, and transforming data and
information into relational diagrams of extraordinary complexity and structure. Converting
simple ERD diagrams into more intricate EERD diagrams.

The scenario includes an online bookshop system, notably a database system for keeping
track of orders, members, publishers, and book details. The assignment team, which was
made up of Ng Kah Jun, Lai Calvin, Tan Jian Shiun, and leader Go Thee Chuen, first
allocated tasks to each member. As an assignment group, the team plans to tackle any
problems head-on, assume responsibility, and do tasks successfully and on time.

4
2. STUDY ON FUNCTIONALITY OF CURRENT SYSTEM

In Kuala Lumpur, Malaysia, a bookstore is going fully digital, marketing books online in
addition to their traditional brick-and-mortar presence. As a result, this is being done to
broaden their customer base and appeal to the millennial and Gen Z audiences, who, unlike
their parents and grandparents, enjoy shopping and doing research online. A streamlined
online bookstore system would make life much easier and more efficient.

In addition, e-commerce platforms for bookselling can be useful since they let stores remain
open around the clock rather than simply during normal business hours. Moreover, the
technique for online bookshops will make upselling relatively simple for them in the future.
In today's world, it's essential for a company to have a web presence. To expand their
customer base beyond their local area, bookstores are increasingly turning to e-commerce
platforms.

By becoming members, customers will have access to a catalogue of books, the ability to
compare prices, the ability to read and evaluate titles, and the ability to provide feedback on
these features after completing purchases. So that we can avoid duplicate reviews, we ask that
each member only write one review for each book they have bought. Since both the
publishers and the management of the online bookstore can monitor sales, human error is
reduced to a minimum. Once a member has made their selections according to their
preferences, a shopping cart list will be generated that details the books they have selected
and the total price due from each member. The online bookstore's database will also retain
customers' order histories, payment details, and the books they've purchased.

5
3. BUSINESS RULES
Business rules are statements that impose restrictions on specific aspects of the database, such
as field specifications for fields or characteristics of relationships.

Publisher

Each publisher can have multiple books.

Each publisher can publish multiple books.

Each publisher can receive many orders.

Book

Each book can only have one publisher.

Each bookstore can have many books.

Each book can be reviewed by many members.

Each book can only have one order delivery status.

Each book can only have one order payment status.

Each book can have one or many order address.

Each book can be purchased by one or many members.

Member

Each member can purchase one or many books.

Each member can have many reviews.

Order

Each order can have one or many books.

Each order only has one member.

6
4. DESIGN
4.1. Conceptual Database Design
Entity Relationship Diagram (ERD)

7
4.2- Logical Database Design
Enhanced Entity Relationship Diagram (EERD)

8
4.3. NORMALIZATION
Normalization is a technique for designing databases that eliminates data duplication and
unwanted characteristics like IUDAs (Insert, Update, Delete Anomalies). Normalization rules
partition large tables into several smaller ones based on their relationships. (“What Is
Normalization in DBMS (SQL)? 1NF, 2NF, 3NF Example,” 2020)

4.3.1. The normalised database tables’ structure is shown in the table below.

9
10
11
12
4.4- Database Schema ( Data Dictionary )

13
14
4.5- Physical Database Designs
4.5.1- .SQL-DDL [MEMBER_T] – NG KAH JUN

15
4.5.2- .SQL-DDL [PUBLISHER_T] – NG KAH JUN

16
4.5.3- .SQL-DDL [ORDER_T] – GO THEE CHUEN

17
4.5.4- .SQL-DDL [BOOK_T] – GO THEE CHUEN

18
4.5.5- .SQL-DDL [MEMBER_BOOK_T] – LAI CALVIN

19
4.5.6- .SQL-DDL [MEMBER_ORDER_T] – LAI CALVIN

20
4.5.7- .SQL-DDL [MEMBER_PHONE_T] – TAN JIAN SHIUN

21
4.5.8- .SQL-DDL [STORE_MANAGER_ORDER_T] – TAN JIAN SHIUN

22
5. IMPLEMENTATION

5.1 SQL DML statements used


5.1.1 - Question 1 (LAI CALVIN)

SQL DML CODE

SQL SERVER RESULT

5.1.2 – Question 2 (LAI CALVIN)

SQL DML CODE

SQL SERVER RESULT

23
5.1.3 – Question 3 (LAI CALVIN)

SQL DML CODE

SQL SERVER RESULT

24
5.1.4 – Question 4 (GO THEE CHUEN)

SQL DML CODE

SQL SERVER RESULT

5.1.5 – Question 5 (GO THEE CHUEN)

SQL DML CODE

SQL SERVER RESULT

25
5.1.6 – Question 6 (GO THEE CHUEN)

SQL DML CODE

SQL SERVER RESULT

26
5.1.7 – Question 7 (TAN JIAN SHIUN)

SQL DML CODE

SQL SERVER RESULT

5.1.8 – Question 8 (TAN JIAN SHIUN)

SQL DML CODE

SQL SERVER RESULT

27
5.1.9 – Question 9 (TAN JIAN SHIUN)

SQL DML CODE

SQL SERVER RESULT

5.1.10 – Question 10 (NG KAH JUN)


SQL DML CODE

SQL SERVER RESULT

28
5.1.11 – Question 11 (NG KAH JUN)
SQL DML CODE

SQL SERVER RESULT

29
5.1.12 – Question 12 (NG KAH JUN)
SQL DML CODE

SQL SERVER RESULT

30
6. CONCLUSION
In conclusion, our group's success depends on effective teamwork. As the leader, it is
important to follow basic principles such as open communication, a shared vision, and clearly
defined roles to achieve synergy. Creating a cohesive team that includes naturally cohesive
units can promote staff members' ability to work together effectively. We should also
maintain open communication and promote an environment where everyone can share their
ideas to achieve team success. Moreover, understanding SQL can provide several benefits to
our group's project, including improved data security, more efficient data retrieval, and
analysis. Finally, we should learn the differences between ERD and EERD and their benefits
to improve diagramming skills and enhance database design processes. Together, we can
ensure the success of our group project through effective teamwork and utilizing our
knowledge and skills in SQL and ERD/EERD.

31
7. WORKLOAD MATRIX
No Component Student 1 Student 2 Student 3 Student 4 Total
Name: Name: Name: Name:
Go Thee Lai Ng Kah Tan Jian
Chuen Calvin Jun Shiun

1 INTRODUCTION 40% 10% 10% 40% 100%


2 STUDY ON 10% 40% 40% 10% 100%
FUNCTIONALITY
OF CURRENT
SYSTEM
3 BUSINESS RULES 25% 25% 25% 25% 100%
4 DESIGN 25% 25% 25% 25% 100%
4.1 CONCEPTUAL 50% 0% 0% 50% 100%
DESIGN
4.2 LOGICAL DESIGN 0% 50% 50% 0% 100%
4.3 NORMALIZATION 30% 20% 30% 20% 100%
4.4 DATABASE 25% 25% 25% 25% 100%
SCHEMA
4.5 PHYSICAL 25% 25% 25% 25% 100%
DATABASE
DESIGN
5 IMPLEMENTATION 25% 25% 25% 25% 100%

5.1 SQL DML 25% 25% 25% 25% 100%


STATEMENTS
USED
6 CONCLUSION 25% 25% 25% 25% 100%
7 WORKLOAD 25% 25% 25% 25% 100%
MATRIX
8 REFERENCES 100% 0% 0% 0% 100%

32
8. References
1. What is Normalization in DBMS (SQL)? 1NF, 2NF, 3NF Example. (2020, January

25). Retrieved March 9, 2023, from Guru99 website:

https://www.guru99.com/database-normalization.html

33

You might also like