(Contoh) KLEZCAR RENTAL MANAGEMENT SYSTEM
(Contoh) KLEZCAR RENTAL MANAGEMENT SYSTEM
NAME STUDENT ID
NUR FAZLINA BT PAUZI 2020961133
NUR AISYAH BT MOHD RAHIMAN 2020970763
NOR AIN SYAFIQAH BT REMALI 2020980343
MOHAMMAD MUAZ BIN ROSHIDI 2020973951
LECTURER’S NAME:
DR. NOR AZIAH BT DAUD
GROUP:
CS2593A
Table of Content
NO CONTENT PAGE
1. Introduction
1.1 Company Background 3
1.2 Problem Statement 3
1.3 Objective 3
2. Entity Relationship diagram 4
3. 3NF Relational Scheme 6
4. Entity Relationship Diagram narrative 6-9
5. SQL Commands
5.1 Data definition language 10 - 14
5.2 Data manipulation language 15 - 24
6. Screenshots of database systems (Menu, Reports, Forms)
6.1 Sign-in administration 25
6.2 Home 25
6.3 Dashboard 26 - 29
6.4 List table
6.4.1 Customer 30
6.4.2 Vehicle 30
6.4.3 Rental 31
6.4.4 Office 31
6.4.5 Employee 32
6.5 Administration page and control 32
6.6 Forms 33 - 36
7. Queries and outputs 37- 46
8. References 47
9. Stakeholder 48
2
1. INTRODUCTION
1.1. Company Background
Klezcar Car Rental is a car rental company and it is one of the companies with car rental service
in Malaysia. The company has been established in 2014 and it has been operating till today.
Klezcar is a trusted company which provides car rental services with variety of choices to choose
from, having a fleet of over 1800 of cars. The fleets consist of sedan cars, multi-purpose (MPV)
cars and 4X4 cars. Their fleet can cater for the need of any client, from the budget car seeker to
upscale business folk looking to propel around the area. The company have 134 branches
currently, covering most of the major city in Malaysia and still expanding day by day. It gains
customers satisfaction by providing excellent services to their customers. The company provides
services 24 hours a day and 7 days a week. Klezcar CEO, Ahmad Fuad Zainal Abidin places a
heavy emphasis on the performance of the company and has clear lines of communication
between management and support staff. Klezcar system consists of two options which is online
and walk-in. The vision of the company is to be the number one car rental company in Malaysia
and the mission of the company is to give customer satisfaction from their service. The
headquarter of the company is located at Kelana Jaya, Selangor.
Currently, Klezcar Car Rental keeping records of their customers, staffs and vehicles using
manual written method that can be problematic for now. They usually have data redundancy and
inconsistency by using that method. There is loss of data, same data written more than once and
hard to find the records back if they needed to read the records again.
1.3. Objective
With the help of technology, the database system can help Klezcar achieve these objectives:
To record the customers, staff, office, rental, vehicle, and vehicle classes data.
To eliminate data redundancy in the database
To easily find any record from the database
3
2. ENTITY RELATIONSHIP DIAGRAM
4
3. 3NF RELATIONAL SCHEME
OFFICE(OfficeID, OfficeLocations)
VEHICLECLASSES(VehicleClassID, VehicleClassName)
5
4. ENTITY RELATIONSHIP DIAGRAM NARRATIVE
DATA DICTIONARY
6
Entity’s Name : CUSTOMER
7
Entity’s Name : VEHICLE
for each
customer
8
Entity’s Name : RENTAL
Entity’s Description : Records data for type of each vehicle from Klezcar Rental
9
5. SQL COMMANDS
5.1. Data definition language
TABLE OFFICE
"OFFICELOCATIONS" VARCHAR2(30),
TABLE STAFF
"STAFFNAME" VARCHAR2(20),
"STAFFIC" VARCHAR2(25),
"STAFFEMAIL" VARCHAR2(25),
"STAFFPHONENO" VARCHAR2(20),
"STAFFSALARY" NUMBER(5,0),
10
/
TABLE CUSTOMER
( "CUSTIC" VARCHAR2(25),
"CUSTNAME" VARCHAR2(20),
"CUSTPHONENO" VARCHAR2(20),
"CUSTADDRESS" VARCHAR2(30),
"BOOKINGMODE" VARCHAR2(10),
11
TABLE RENTAL
"RENTALSTARTDATE" DATE,
"RENTALRETURNDATE" DATE,
"RENTALPRICE" VARCHAR2(5),
"CUSTIC" VARCHAR2(25),
12
TABLE VEHICLE
( "VEHICLEID" VARCHAR2(10),
"VEHICLEAVAILABILITY" VARCHAR2(10),
13
TABLE VEHICLECLASSES
"VEHICLECLASSNAME" VARCHAR2(15),
14
5.2. Data manipulation language
VALUES(110,'Saif','951006-03-5987','Saif@yahoo.com','016-5679867','2',1999);
VALUES(100,'Steven','980101-03-5001','steven98.gmail,com','019-2333582',1,3000);
VALUES(101,'David','960201-14-5211','david96.gmail,com','014-2788261',2,2500);
VALUES(102,'Amanda','930509-06-5004','amanda93.gmail,com','012-9870263',3,3600);
VALUES(103,'Rose','951112-03-5121','rose48.gmail,com','011-8762593',1,2500);
VALUES(104,'Jackie','870909-11-6782','Jackie87@gmail,com','019-9331954',2,3200);
VALUES(105,'Hafiz','850129-07-5012','Hafizsuip@gmail,com','011-4911234',3,3000);
VALUES(106,'Angela','890312-05-6002','angela89@gmail.com','014-7599791',1,3800);
VALUES(107,'Zaidin','941202-04-5108','ZaidinSain@gmail,com','011-8144367',2,1900);
VALUES(108,'Saif','951006-03-5987','Saif@yahoo.com','016-5679867',2,1999);
15
VALUES(109,'Aiman','980116-01-5458','Aiman@yahoo.com','012-2672867',1,1998);
VALUES(110,'Ain','970416-02-5454','Ain@yahoo.com','018-9072867',1,1997);
VALUES(111,'Lily','960106-01-5447','Lily@yahoo.com','010-5678867',2,1996);
VALUES(112,'Nini','990416-05-5675','Nini@yahoo.com','012-9072867',1,1999);
VALUES(113,'Haikal','940303-05-5275','Haikal@yahoo.com','019-9079867',3,1994);
VALUES(114,'Haziq','950303-05-5275','Haziq@yahoo.com','010-9079867',4,1995);
VALUES(115,'Hakimi','970703-03-5275','Hakimiq@yahoo.com','012-2672867',4,1997);
VALUES(116,'Amy','920703-03-5275','Amy@yahoo.com','012-2672867',4,1992);
VALUES(117,'Najihah','980602-07-5567','Najihah@yahoo.com','012-2672867',5,1998);
VALUES(118,'Nabihah','971602-02-5367','Nabihah@yahoo.com','012-9077767',5,1997);
16
2) POPULATE CUSTOMER TABLE
INSERT INTO customer(custic,custname,custphoneno,custaddress,officeid, staffid)
17
VALUES('950108-02-5252','Akim','010-2788267','lot 88 jalan titi kota bharu',2,104);
18
INSERT INTO customer(custic,custname,custphoneno,custaddress,officeid, staffid)
VALUES(1,'kota bharu');
VALUES(2,'pasir mas');
VALUES(3,'machang');
VALUES(4,'kuala krai');
VALUES(5,'gua musang');
19
4) POPULATE RENTAL TABLE
INSERT INTO rental
(rentalid,rentalstartdate,rentalreturndate,pickuptime,returntime,rentalprice,custic,officeid)
VALUES('A004',TO_DATE('2020-02-19','YYYY/MM/DD'),TO_DATE('2020-02-
20','YYYY/MM/DD'),'11:45','12:50','30','960512-04-8952','3');
VALUES('A005',TO_DATE('2020-02-20','YYYY/MM/DD'),TO_DATE('2020-02-
21','YYYY/MM/DD'),'16:45','09:50','30','960512-04-8952','2');
VALUES('A006',TO_DATE('2020-02-21','YYYY/MM/DD'),TO_DATE('2020-02-
22','YYYY/MM/DD'),'17:15','16:00','30','940412-03-5323','1');
VALUES('A007',TO_DATE('2020-02-22','YYYY/MM/DD'),TO_DATE('2020-02-
23','YYYY/MM/DD'),'15:15','19:19','20','9901306-03-5352','1');
VALUES('A008',TO_DATE('2020-02-22','YYYY/MM/DD'),TO_DATE('2020-02-
23','YYYY/MM/DD'),'18:10','11:19','15','960109-02-5452','2');
VALUES('A009',TO_DATE('2020-02-21','YYYY/MM/DD'),TO_DATE('2020-02-
22','YYYY/MM/DD'),'17:00','09:20','20','990318-06-5556','2');
20
VALUES('A010',TO_DATE('2020-02-23','YYYY/MM/DD'),TO_DATE('2020-02-
25','YYYY/MM/DD'),'12:00','19:00','30','990611-06-5253','3');
VALUES('A011',TO_DATE('2020-02-25','YYYY/MM/DD'),TO_DATE('2020-02-
26','YYYY/MM/DD'),'10:00','14:00','15','960508-01-5352','2');
VALUES('A012',TO_DATE('2020-02-24','YYYY/MM/DD'),TO_DATE('2020-02-
26','YYYY/MM/DD'),'09:00','20:20','20','950508-04-5352','3');
VALUES('A013',TO_DATE('2020-02-25','YYYY/MM/DD'),TO_DATE('2020-02-
26','YYYY/MM/DD'),'11:10','14:30','30','9901309-03-5352','1');
VALUES('A013',TO_DATE('2020-02-26','YYYY/MM/DD'),TO_DATE('2020-02-
27','YYYY/MM/DD'),'08:10','10:30','20','990108-03-5452','1');
VALUES('A014',TO_DATE('2020-02-28','YYYY/MM/DD'),TO_DATE('2020-03-
01','YYYY/MM/DD'),'14:10','18:30','30','990713-02-5882','5');
VALUES('A015',TO_DATE('2020-03-02','YYYY/MM/DD'),TO_DATE('2020-03-
04','YYYY/MM/DD'),'14:45','10:20','20','970316-02-5672','5');
21
INSERT INTO rental
(rentalid,rentalstartdate,rentalreturndate,pickuptime,returntime,rentalprice,custic,officeid)
VALUES('A016',TO_DATE('2020-03-04','YYYY/MM/DD'),TO_DATE('2020-03-
05','YYYY/MM/DD'),'11:20','18:30','30','990316-02-5672','5');
VALUES('A017',TO_DATE('2020-03-04','YYYY/MM/DD'),TO_DATE('2020-03-
05','YYYY/MM/DD'),'11:20','18:30','30','990316-02-5672','5');
VALUES('A018',TO_DATE('2020-03-05','YYYY/MM/DD'),TO_DATE('2020-03-
06','YYYY/MM/DD'),'08:10','16:00','15','960122-01-3022','1');
VALUES('A019',TO_DATE('2020-03-06','YYYY/MM/DD'),TO_DATE('2020-03-
07','YYYY/MM/DD'),'09:10','17:00','20','990516-03-5435','1');
VALUES('A020',TO_DATE('2020-03-07','YYYY/MM/DD'),TO_DATE('2020-03-
08','YYYY/MM/DD'),'10:10','21:00','30','9901306-01-5352','2');
VALUES('A021',TO_DATE('2020-03-08','YYYY/MM/DD'),TO_DATE('2020-03-
10','YYYY/MM/DD'),'14:10','11:00','15','9801306-02-5352','2');
VALUES('A022',TO_DATE('2020-03-10','YYYY/MM/DD'),TO_DATE('2020-03-
22
11','YYYY/MM/DD'),'09:00','22:00','30','9401309-03-5352','1');
VALUES('A023',TO_DATE('2020-03-10','YYYY/MM/DD'),TO_DATE('2020-03-
11','YYYY/MM/DD'),'09:00','22:00','30','990113-03-5452','3');
VALUES('A024',TO_DATE('2020-03-11','YYYY/MM/DD'),TO_DATE('2020-03-
12','YYYY/MM/DD'),'10:25','18:00','15','950108-02-5252','2');
VALUES('A024',TO_DATE('2020-03-11','YYYY/MM/DD'),TO_DATE('2020-03-
12','YYYY/MM/DD'),'10:25','18:00','15','950108-02-5252','2');
VALUES('A025',TO_DATE('2020-03-13','YYYY/MM/DD'),TO_DATE('2020-03-
14','YYYY/MM/DD'),'11:25','15:00','20','990118-02-5224','2');
VALUES('A026',TO_DATE('2020-03-15','YYYY/MM/DD'),TO_DATE('2020-03-
16','YYYY/MM/DD'),'10:15','17:40','15','970707-03-6078','1');
VALUES('A027',TO_DATE('2020-03-17','YYYY/MM/DD'),TO_DATE('2020-03-
18','YYYY/MM/DD'),'10:55','14:20','30','960913-03-5452','4');
VALUES('A028',TO_DATE('2020-03-18','YYYY/MM/DD'),TO_DATE('2020-03-
23
20','YYYY/MM/DD'),'13:15','17:10','20','960713-02-5882','4');
Values('WWW 10','yes','A',1);
Values('WAQ 20','no','A',2);
Values('DAD 1021','yes','B',3);
Values('KED 4021','no','C',4);
Values('TAT 6789','no','C',5);
Values('A','MPV');
Values('B','Sedan');
Values('C','4x4');
24
6. SCREENSHOTS OF DATABASE SYSTEMS (MENU, REPORTS, FORMS)
6.1. Sign-in administration
25
6.3. Dashboard
26
Office id = 1 which is located at Kota Bharu has maximum staff’s salary is RM3800 and
minimum is RM2000
Figure 6.3.3 Dashboard – Total Salary (MIN & MAX) for each employee based on office id
27
If we click at “walk-in” or “online” value will come out which is number of customer
based on their preference booking mode.
Value for customer who choose walk-in as their booking mode is 17 people
28
Calender above show all the booking made by customer in MARCH 2020 and based on
customer’s rental ID
29
6.4. List table
6.4.1. Customer
6.4.2. Vehicle
30
6.4.3. Rental
6.4.4. Office
31
6.4.5. Employee
32
6.6. Forms
6.6.1. To insert new data to table CUSTOMER
i) Click “Add Row”
33
iii) Click “Save” and the new data successfully inserted
iv) To edit data just click button “edit” or just click at the data you want to change and
then click button “save” data will successfully inserted.
34
v) Data was successfully edited
vi) To delete data just click line button next to Rental ID and then click “Delete Row”
35
vii) Click “Save”
36
7. QUERIES AND OUTPUTS
QUESTION 1
The HR department has requested a report of customer name and their phone number. Display the
customer name concatenated with the phone number (separated by a comma and space) and name
the column Customer name and phone.
37
QUESTION 2
Display the staff name,staff ic, phone number and office ID of all staff in office 1 or 2 in
ascending alphabetical order by name.
38
QUESTION 3
Write a query that displays the staff name (with the first letter in uppercase and all the other
letters in lowercase) and the length of the staff name for all staff whose name starts with the
letters “S,” “A,” or “R.” Give each column an appropriate label. Sort the results by the staff’
names.
39
QUESTION 4
Create a report that produces the following for each staff: <staff name> earns <salary> monthly
but wants <3 times salary.>. Label the column Dream Salaries.
SELECT StaffName || ' earns ' || TO_CHAR(STAFFSALARY, 'fm$99,999.00') || ' monthly but
wants ' || TO_CHAR(STAFFSALARY* 3, 'fm$99,999.00') || '.' "Dream Salaries"
FROM STAFF;
40
QUESTION 5
Find the highest, lowest, sum, and average salary of all employees. Label the columns Maximum,
Minimum, Sum, and Average, respectively. Round your results to the nearest whole number.
41
QUESTION 6
The HR department needs a report of Customer in Gua Musang. Display the staff name,
Customer name and Staff Salary.
ON (e.StaffID = d.StaffID)
JOIN OFFICE c
ON (e.officeID = c.officeID)
42
QUESTION 7
The HR department needs a report that displays the staff id, staff name and office id of all staffs
whose the user is prompted for a location ID.
43
QUESTION 8
Produce a list of office id is 1, 2, and 3, in that order. Display office id staff name by using the set
operators
44
QUESTION 9
Insert and display a new staff into the database
STAFFID: 190
OFFICEID: 1
STAFFNAME: zaileros
STAFFIC: 990108035555
STAFFEMAIL: nuraisyahcantik@gmail.com
STAFFPHONENO: 018999999
STAFFSALARY: 2000
45
QUESTION 10
Office 1 needs access to its employee data. Create a view named STAFF1 that contains the staff
id, staff names, and office numbers for all staff in office 1. They have requested that you label the
view columns staffno, staff, officeno. Then display all information in STAFF1
WHERE OFFICEID = 1 ;
SELECT *
FROM STAFF1
46
8. REFERENCES
1. Entrust Consulting Associates. (2018, October 18). APEX Sample Database Application [Video].
Youtube
https://youtu.be/f0ddvFcYqzQ
2. Oracle Apex. (2018, Apr 22). Oracle APEX –APEX 18.1 New Feature [Video].Youtube
https://youtu.be/XAO-B0JtxrA
3. https://klezcar.com/blog/about-us/
4. https://www.klezcar.com/partnership.php
5. https://klezcar.com/blog/contact-us/
47
9. STAKEHOLDER
48