Ict501 Final Report
Ict501 Final Report
GROUP: CDCS2593A
PREPARED BY:
NAME STUDENT ID
PREPARED FOR:
DR NORISAN BT. ABD KARIM
ACKNOWLEDGEMENT
We would like to express our heartfelt gratitude to all group members and our
lecturer, Dr. Norisan bt Abd Karim for the contribution to our successful completion of our
Jianer Collection Database System project for the subject ICT501. The project was a
significant undertaking which required teamwork, dedication and understanding from many
individuals around our group members.
First of all, we would like to thank our lecturer for providing us huge opportunity to
work on this database system project and for her impeccable assistance throughout the
completion of our group project. Her feedback and support have been our pillar of
understandings in executing our system project.
Our upmost thanks go to each of our group members, Ikhfa Syafiqah, Nur Athirah,
Nurulain Nafisa, Siti Aida Syamimi and Nur Kautsar Kamilah for their full dedication in
bringing this project to fruition. The teamwork spirit, frequent communication and unwavering
commitment projected by all of them made this project an indeed a rewarding experience
and knowledge.
Not to forget the support and motivation from our friends and families who gave us
valuable feedback and continous support throughout the completion of our project. Their
encouragement pushed us in keeping focused and dedicated to our project.
To sum up, this project was made possible through mutual hard work and knowledge
of multiple individuals, and we are deeply grateful of all the motivation we received.
2
TABLE OF CONTENTS
ACKNOWLEDGEMENT ....................................................................................................... 2
TABLE OF CONTENTS ........................................................................................................ 3
1.0 INTRODUCTION ....................................................................................................... 4
1.1 COMPANY BACKGROUND.................................................................................. 4
1.2 PROBLEM STATEMENT ...................................................................................... 5
1.3 OBJECTIVE .......................................................................................................... 6
2.0 DATA REQUIREMENTS ........................................................................................... 7
2.1 BUSINESS RULES ............................................................................................... 7
2.2 ENTITY RELATIONSHIP DIAGRAM (ERD) .......................................................... 8
2.3 NORMALIZATION ................................................................................................. 9
3.0 SYSTEM DESIGN ................................................................................................... 15
3.1 DATA DICTIONARY ............................................................................................ 15
3.2 DATA DEFINITION LANGUAGE (DDL) .................................................................... 18
3.2.1 CREATING TABLES .............................................................................................. 18
3.3 DATA MANIPULATION LANGUAGE (DML) ............................................................. 21
3.4 SCREENSHOT OF DATABASE SYSTEM ................................................................ 24
3.5 CALCULATION ON DERIVED ATTRIBUTE ............................................................. 34
3.6 10 SQL QUERIES ..................................................................................................... 38
REFERENCES ................................................................................................................... 44
3
1.0 INTRODUCTION
Jianer Collection is a mall kiosk that sells merchandise mainly from Sanrio characters
like Kuromi, Pompompurin and Melody. The mall kiosk is located at Level 3 of Central i-City
Mall, Shah Alam Selangor which operates every day from 9 am to 10 pm. Jianer Collection
has another branch in Cheras, Kuala Lumpur that sells a variety of gummies.
According to Miss Snow who is the founder of Jianer Collection, this kiosk just started
about a month ago. Her focus on starting the business is to vary the options for gift children,
especially these Sanrio characters that have been so popular lately. Examples of
merchandise that she sells are plushies, tumblers, bags, small keychain and hair clips that
come in many colors. They also offer to pre-order the unavailable products at the kiosk
where the pre-order will only take about one to two weeks from China. They also have
prepared a catalog which displays the pictures, sizes and the prices for the pre-order
products.
Employees at Jianer Collection fall into two groups which are permanent and part-
time. Permanent staff receive fixed salaries, while part-timers are paid hourly based on their
work duration. Typically, permanent employees work 8 hours daily, while part-timers work for
4 hours or less. Part-time employees typically work during the night shift.
Currently, Jianer Collection does not have any database to record their stocks,
orders and sales. They use a ledger book to record their pre-order transactions manually
which sometimes can lead to mishandling information and lost paperwork.
Hence, this Jianer Collection Database Management System can be used to record
and sort the employee, product, supplier and sales data. In short, this system will ease them
in organizing their management at the kiosk more efficiently.
4
1.2 PROBLEM STATEMENT
One of the problems that have been detected is the current system that the company
is using is not structured properly. From the interview, the staff told us that all the orders are
recorded manually using a book. This thing will lead to staff making mistakes such as selling
the wrong item to the pre-order customers. Moreover, if the supplier tends to make mistakes
like sending the wrong items, the staff can easily check the orders back if the system is well
organized.
Apart from that, this kind of system means it lacks security. Since the staff will note
the customers and suppliers' information in the book, the data is not safe because it might
get leaked by an attacker. As the data is not kept safely, everyone can easily get access to
it. Therefore, it is important to protect data both from internal and external threats.
Furthermore, there is also poor data integrity as the duplication of data might exist.
This includes human error, for instance a staff can mistakenly write the quantity of the
ordered items to the supplier, or a staff might write the customer’s name twice in the book for
ordering. This is why it leads to duplicate data and inaccurate information. Besides, writing
manually cannot create any backup data and there is no way to prevent permanent data
loss. For example, if the book is lost, the data of the customers and suppliers cannot be
traced anymore.
5
1.3 OBJECTIVE
The purpose of developing the database for our client is to achieve the following objectives:
• To identify requirements to store all the orders from the customer.
• To design a database to store customer’s item orders using a practical and efficient
method.
• To develop a database in helping the company to keep track of exact records of all
customer and supplier orders.
6
2.0 DATA REQUIREMENTS
7
2.2 ENTITY RELATIONSHIP DIAGRAM (ERD)
8
2.3 NORMALIZATION
PARTIAL DEPENDENCIES:
(Cust_ID → Cust_Name, Cust_Phone)
(Emp_ID → Emp_Name, Emp_Phone, Emp_Birth_Date, Emp_Hire_Date,
Emp_Working_Hours, Emp_Salary, Emp_Rate)
(Sup_ID → Sup_Name, Sup_Phone, Supp_Address)
(Order_ID → Order_Date, Order_Depo, Order_Total, Order_Type, Order_Status)
(Product_ID → Product_Type, Product_Design, Product_Price, Product_Color,
Product_Stock)
(Pay_ID → Payment_Method, Payment_Date)
TRANSITIVE DEPENDENCY:
(Emp_ID → Emp_Salary)
9
(Emp_ID → Emp_Rate)
2NF
(EMP_ID → Emp_Rate)
10
Table Name: ORDERS
11
3NF
12
Table Name: PRODUCT
13
PRIMARY KEY FOREIGN KEY
CUSTOMER Cust_ID -
SUPPLIER Sup_ID -
EMPLOYEE Emp_ID -
PERMANENT_EMP Emp_ID Emp_ID, Emp_Salary
PARTTIME_EMP Emp_ID Emp_ID, Emp_Rate
PAYMENT Pay_ID Cust_ID, Order_ID
ORDERS Order_ID Emp_ID, Cust_ID
PRODUCT Product_ID Sup_ID
ORDER_DETAILS Product_ID, Order_ID Product_ID, Order_ID
14
3.0 SYSTEM DESIGN
15
SUP_ID Supplier VARCHAR xxxxxxxxx NA Y FK SUPPLI
ID 2(10) ER
EMPLOYEE EMP_ID Employee VARCHAR xxxxxxxxx NA Y PK
ID 2(10)
EMP_NAME Employee VARCHAR xxxxxxxxx NA Y
Name 2(50)
EMP_PHONE Employee VARCHAR xxxxxxxxx NA Y
Phone 2(15)
Number
EMP_BIRTH_D Employee DATE YYYY- NA Y
ATE Birth Date MM-DD
EMP_HIRE_DA Employee DATE YYYY- NA Y
TE Hire Date MM-DD
EMP_WORKIN Employee NUMERIC ######## NA Y
G_HOURS Working (10,0) ##
Hours
ORDERS ORDER_ID Order ID VARCHAR xxxxxxxxx NA Y PK
2(10)
ORDER_DATE Order DATE YYYY- NA Y
Date MM-DD
ORDER_DEPO Order NUMERIC ######## NA
Deposit (10,0) ##
ORDER_TOTAL Order NUMERIC ######## NA Y
Total (10,0) ##
ORDER_TYPE Order VARCHAR xxxxxxxxx NA Y
Type 2(50)
ORDER_STATU Order VARCHAR xxxxxxxxx NA Y
S Status 2(50)
EMP_ID Employee VARCHAR xxxxxxxxx NA Y FK EMPLOY
ID 2(10) EE
CUST_ID Customer VARCHAR xxxxxxxxx NA Y FK CUSTO
ID 2(10) MER
PAYMENT PAY_ID Payment VARCHAR xxxxxxxxx NA Y PK
ID 2(10)
PAYMENT_MET Payment VARCHAR xxxxxxxxx NA Y
HOD Method 2(50)
16
PAYMENT_DAT Payment DATE YYYY- NA Y
E Date MM-DD
ORDER_ID Order ID VARCHAR xxxxxxxxx NA Y FK ORDER
2(10) S
CUST_ID Customer VARCHAR xxxxxxxxx NA Y FK CUSTO
ID 2(10) MER
ORDER_DE ORDER_ID Order ID VARCHAR xxxxxxxxx NA Y PK/F ORDER
TAILS 2(10) K S
PRODUCT_ID Product ID VARCHAR xxxxxxxxx NA Y PK/F PRODU
2(10) K CT
QUANTITY Order NUMERIC ######## NA Y
Quantity (10,0) ##
PERMENAN EMP_ID Employee VARCHAR xxxxxxxxx NA Y PK/F EMPLOY
T_EMP ID 2(10) K EE
EMP_SALARY Employee NUMERIC ######## NA Y
Salary (10,0) ##
PARTTIME_ EMP_ID Employee VARCHAR xxxxxxxxx NA Y PK/F EMPLOY
EMP ID 2(10) K EE
EMP_RATE Employee NUMERIC ######## NA Y
Rate (10,0) ##
17
3.2 DATA DEFINITION LANGUAGE (DDL)
TABLE QUERY
CUSTOMER CREATE TABLE CUSTOMER (
CUST_ID VARCHAR(10)
CONSTRAINT CUST_ID_PK PRIMARY KEY,
CUST_NAME VARCHAR(50),
CUST_PHONE VARCHAR(15)
);
SUPPLIER CREATE TABLE SUPPLIER (
SUP_ID VARCHAR(10)
CONSTRAINT SUP_ID_PK PRIMARY KEY,
SUP_NAME VARCHAR(50),
SUP_PHONE VARCHAR(15),
SUP_ADDRESS VARCHAR(100)
);
PRODUCT CREATE TABLE PRODUCT (
PRODUCT_ID VARCHAR(10)
CONSTRAINT PRODUCT_ID_PK PRIMARY KEY,
PRODUCT_TYPE VARCHAR(50),
PRODUCT_DESIGN VARCHAR(50),
PRODUCT_PRICE NUMBER(10),
PRODUCT_COLOR VARCHAR(10),
PRODUCT_STOCK NUMBER(10),
SUP_ID VARCHAR(10),
CONSTRAINT PROD_SUP_FK FOREIGN KEY (SUP_ID)
REFERENCES SUPPLIER (SUP_ID)
);
EMPLOYEE CREATE TABLE EMPLOYEE (
EMP_ID VARCHAR(10)
CONSTRAINT EMPL_ID_PK PRIMARY KEY,
EMP_NAME VARCHAR(50),
EMP_PHONE VARCHAR(15),
EMP_BIRTH_DATE DATE,
EMP_HIRE_DATE DATE,
18
EMP_WORKING_HOURS NUMBER(10)
);
ORDERS CREATE TABLE ORDERS (
ORDER_ID VARCHAR(10) CONSTRAINT ORDER_ID_PK
PRIMARY KEY,
ORDER_DATE DATE,
ORDER_DEPO NUMBER(10),
ORDER_TYPE VARCHAR(50),
ORDER_STATUS VARCHAR(50),
EMP_ID VARCHAR(10),
CUST_ID VARCHAR(10),
CONSTRAINT ORDER_EMP_FK FOREIGN KEY (EMP_ID)
REFERENCES EMPLOYEE (EMP_ID),
CONSTRAINT ORDER_CUST_FK FOREIGN KEY
(CUST_ID) REFERENCES CUSTOMER (CUST_ID)
);
PAYMENT CREATE TABLE PAYMENT (
PAY_ID VARCHAR(10)
CONSTRAINT PAY_ID_PK PRIMARY KEY,
PAYMENT_METHOD VARCHAR(50),
PAYMENT_DATE DATE,
ORDER_ID VARCHAR(10),
CUST_ID VARCHAR(10),
CONSTRAINT PAY_ORDER_FK FOREIGN KEY
(ORDER_ID) REFERENCES ORDERS (ORDER_ID),
CONSTRAINT PAY_CUST_FK FOREIGN KEY (CUST_ID)
REFERENCES CUSTOMER (CUST_ID)
);
ORDER_DETAILS CREATE TABLE ORDER_DETAILS (
ORDER_ID VARCHAR(10),
PRODUCT_ID VARCHAR(10),
QUANTITY NUMBER(10),
CONSTRAINT ORDER_PRODUCT_PK PRIMARY KEY
(ORDER_ID, PRODUCT_ID),
CONSTRAINT ORDER_PRODUCT_ORDER_FK FOREIGN
KEY (ORDER_ID)
19
REFERENCES ORDERS (ORDER_ID),
CONSTRAINT ORDER_PRODUCT_PRODUCT_FK
FOREIGN KEY (PRODUCT_ID)
REFERENCES PRODUCT (PRODUCT_ID)
);
PERMANENT_EMP CREATE TABLE PERMANENT_EMP (
EMP_ID VARCHAR(10),
EMP_SALARY NUMBER(10),
CONSTRAINT PERM_EMP_ID_PK PRIMARY KEY
(EMP_ID),
CONSTRAINT PERM_EMP_ID_FK FOREIGN KEY (EMP_ID)
REFERENCES EMPLOYEE (EMP_ID)
);
PARTTIME_EMP CREATE TABLE PARTTIME_EMP (
EMP_ID VARCHAR(10),
EMP_RATE NUMBER(10),
CONSTRAINT PARTTIME_EMP_ID_PK PRIMARY KEY
(EMP_ID),
CONSTRAINT PARTTIME_EMP_ID_FK FOREIGN KEY
(EMP_ID)
REFERENCES EMPLOYEE (EMP_ID)
);
20
3.3 DATA MANIPULATION LANGUAGE (DML)
21
3.3.3 Update the Employee Table from employee working hours from 8 to 4
3.3.4 Delete from The Table Supplier who the Employee id is E07
22
3.3.5 Select all information from Table Customer
23
3.4 SCREENSHOT OF DATABASE SYSTEM
24
3. Data visualization of the business
4. Employee list
25
5. Permanent employee
6. Part-time employee
26
7. Employee in charge
Figure 3.7 - Displays the report of employee in charge based on each order id
8. Part-time Salary
Figure 3.8 - Displays the report of salary for part time employees
27
9. Product
Figure 3.10 - Displays the report of total quantity sold for each product
28
11. Customer
29
13. Payment
30
15. Supplier
31
17. Overseas supplier
18. Orders
32
19. Order details
33
3.5 CALCULATION ON DERIVED ATTRIBUTE
Figure 3.21 - Employee's age derived from the employee's birth date
Figure 3.21 shows the employee's age automatically displayed based on the birth date input.
This is due to the employee’s age which can be derived from the attribute of the employee’s
birth date.
Figure 3.22 shows the data has been successfully inserted including the derived attribute. To
develop this feature of deriving attributes, a few steps should be made within the Oracle
34
Apex database application to calculate the employee’s age automatically. Firstly, a process
branch needs to be created to calculate the employee's age automatically based on the birth
date input. Next, an action for the birth date attribute needs to be set as “Set Value” to
ensure the attribute receives the user input and calculates the age with the help of an SQL
query where the current date will be deducted from the birth date. The figures below show
the setting for the birth date attribute and the SQL query used.
After setting the birth date attribute, the age attribute needs to be set so it will receive the
input from the date birth attribute and display the age. There is also an SQL query to help in
displaying the age based on the birth date input.
35
Figure 3.25 - SQL query for employee's age attribute
2. Calculate the total order in orders table for each order product
Figure 3.27 - Display the result of total order for customer based on order ID
36
Figure 3.7 shows the report of the total order of the customer based on each order ID. The
total order is calculated based on the sum of each product with its respective prices and
making sure to consider the quantity of each product. Based on the report, the calculation of
the total order involves orders, customers, products and the order details table. With that, we
use SQL query regarding the display of the respective column.
As shown in Figure 3.28, this is the SQL query that has been used for the calculation. In
SQL, the calculation is a combination of two tables which are product and order details.
However, we must join both tables using the order ID which means another combination
happens with the order table throughout the process. Meanwhile, to display the customer’s
name, we should join the customer table to extract the name from the table using the
customer id as the indicator. With that, in every order detail with a new order ID, the total
order will automatically be inserted and displayed in the report all at once with the
customer's name and order id respectively. 
37
3.6 10 SQL QUERIES
1. Display the product ID, product type, product design, product price, product
color and product stock supplied by supplier ID SP01 and the product type is
Plushie in ascending numerical order by product price.
2. Display all customer information along with their payment ID and payment
method that used cash as their payment method.
3. Display all order information that the order status has been pending
38
4. Display total sales made by employee
39
5. Display amount of payment made based on payment date
6. Display the product type with its id and the number of customers who bought
them.
40
7. Display the payment id and total amount paid that is more than 150 in
descending order.
8. Display the product id with its type and quantity that is bought by the customer
where the customer id is C13.
41
9. Display supplier name, supplier phone and product type where the total product
stock is above 15.
10. Display the supplier's name, supplier number phone, product design and price
where the price for each product is more than RM40.
42
4.0 CONCLUSION
Finally, we would like to express our gratitude to everyone who helped, directly or
indirectly, with the system’s creation. We have also made every effort to ensure that our
application is user-friendly and adaptable. We are anticipant that the project will help Jianer
Collection employees operate their business more efficiently and fulfil its intended function of
implementing the computerization of customer, product, employee, supplier, and payment
data. 
43
REFERENCES
1. Senthil V. (2020, June 22). Oracle Apex | Create Web Apps with Oracle SQL database |
No Code [Video]. YouTube. https://www.youtube.com/watch?v=b0NRmWI8E7k
2. NihaSoft. (2023, May 11). Tutorial 2 - How to Create a web application in Oracle Apex.
[Video]. YouTube. https://www.youtube.com/watch?v=gJzcUzId-Zc
44