Professional Documents
Culture Documents
DOC-20240616-WA0000
DOC-20240616-WA0000
DOC-20240616-WA0000
PREPARED BY:
AIS275
DATA MANAGEMENT
PREPARED FOR
DR MARJAN MOHD NOOR
SUBMISSION DATE:
15 JULY 2022
TABLE OF CONTENT
1.0 INTRODUCTION......................................................................................................................................3
2.0 CASE STUDY...........................................................................................................................................4
3.0 ERD NARRATIVE.....................................................................................................................................6
4.0 DATABASE CONCEPTUAL DESIGN...........................................................................................................9
4.1 ENTITY RELATIONSHIP DIAGRAM.....................................................................................................10
4.3 3NF Table Structure.........................................................................................................................11
5.0 DATABASE SYSTEM IMPLEMENTATION.................................................................................................11
5.1 Data Definition Language (DDL).......................................................................................................12
5.1.1 Create table statement.............................................................................................................12
5.1.2 CREATE A SINGLE VIEW TABLE...................................................................................................14
5.1.3. CREATE VIEW MULTIPLE TABLE................................................................................................14
5.1.4. Create view single table (updatable)........................................................................................15
5.1.5. Create view multiple table (updatable)....................................................................................15
5.1.6. Drop table statement...............................................................................................................15
5.1.7. Alter table statement...............................................................................................................15
5.2 Data Manipulation Language (DML)................................................................................................17
5.2.1 Insert Into Table Statement.......................................................................................................17
5.2.2 Insert Into View (updatable).....................................................................................................20
5.2.3 Update Table Statement...........................................................................................................20
5.2.4 Update view (updatable)...........................................................................................................21
5.2.5 Delete table Statement.............................................................................................................21
5.2.6 Select statement with minimum 20 records for all tables.........................................................22
5.2.6.1 Comparison operator.........................................................................................................22
5.2.6.2 Logical operator (AND, OR, NOT)........................................................................................22
5.2.6.3 Special operator (LIKE, BETWEEN, DISTINCT).....................................................................23
5.2.6.4 Arithmetic function (*, /, +, -).............................................................................................23
5.2.6.5 Column function and grouping...........................................................................................24
5.2.6.6 Type 1 Nested queries (IN, NOT, IN)...................................................................................24
5.2.6.7 Type II Nested queries (EXIST, NOT EXIST)..........................................................................25
5.2.6.8 RETRIEVE DATA FROM MULTIPLE TABLE.............................................................................25
5.2.7 SELECT statement for all views..................................................................................................28
6.0 SYSTEM IMPLEMENTATION..................................................................................................................28
6.1 The form and sub form are shown...................................................................................................29
7.0 CONCLUSION.......................................................................................................................................33
8.0 REFERENCES.........................................................................................................................................34
9.0 APPENDICES.........................................................................................................................................35
1.0 INTRODUCTION
Primrose Enterprise is about a system that can allow customers to check the availability
of the cars for rent and make a purchase through the system. Our system is designed to
prevent customers from double booked the same car on the same date and making it
easier for customers to make payments without having to consult with staff.
2.0 CASE STUDY
1. BACKGROUND
The online ordering system is one of the newest services that majority of
businesses in Malaysia have adopted since the Covid-19 outbreak has
significantly impacted them. This new way of buying not only offers a vast
selection of items, but it also provides a big market and a variety of economic
prospects. The project we are working on is creating a website to be used by
“Primrose Enterprise”, a car rental agency. By reducing labour costs, this strategy
will allow the manager to increase the size of their business. Using a few clicks,
clients may browse and use an online ordering system that is managed quickly
and easily thanks to technology. We provide a various brand of car to be rented
out with a reasonable price.
The approach of going to the branch to book the car manually by visiting
storefront businesses is getting outdated and time-consuming, especially since
Malaysia is still on recovery phase of COVID-19. Hence, by contacting via phone
calls, it could lead to miscommunication between staffs as they might mistook
cars that are available on the required date, especially during a public holiday
where demand for car rental is high.
4. SUGGESTED SOLUTION
To solve the problems, we planned to use the same system as before but with a
better level overview of the system. To make the system run smoothly, we will
modify our system we will also hand out our feedback review to all the customer
to fill in so we can find a solution on what to improve through the research. We
will also hire the best designer to design our project and will do a major
maintenance from time to time to improve our weakness.
5. SYSTEM OBJECTIVE
- Honing staff talent in handling with the new system
- Make it easier for customer to book their selected car wherever they are at
any time
3.0 ERD NARRATIVE
Create a view multiple table where table booking and vehicle in one table
SELECT *
FROM BOOKING INNER JOIN VEHICLE
ON BOOKING.CUST_ID = VEHICLE.CUST_ID;
5.1.4. Create view single table (updatable)
SELECT *
FROM CUSTOMER
WHERE CUST_ID LIKE (‘1004’);
- DROP Column
- ALTER Column
1) Custome
Code:
INSERT INTO CUSTOMER
VALUES ('1005', 'ZAYN', ‘015236987’);
Results:
2) Booking
Code:
INSERT INTO BOOKING
VALUES (2001, '2/1/22', '1001', '5001', 'PENANG', 'RM80');
Results:
3) Vehicle
Code:
INSERT INTO VEHICLE
VALUES (5013, '2004', '5012', 'RM100');
Results:
4) Honda
Code:
INSERT INTO HONDA
VALUES ('5012', 'RM70');
Results:
5) Lagenda
Code:
INSERT INTO LAGENDA
VALUES ('5010', 'RM80');
Results:
6) Yamaha
Code:
INSERT INTO YAMAHA
VALUES (5013, 'RM100');
Results:
7) Staff
Code:
INSERT INTO STAFF
VALUES (3005, 'ZAINAL', '1005');
Results:
8) Location
Code:
INSERT INTO LOCATION
VALUES ('JOHOR', '1005');
Results:
9) Amount
Code:
INSERT INTO AMOUNT
VALUES (2004, 'RM100');
Results:
Results:
5.2.6.7 Type II Nested queries (EXIST, NOT EXIST)
Using Type II nested queries to list customer who booked vehicle ID 5012.
SELECT *
FROM CUSTOMER
WHERE EXISTS (
SELECT *
FROM BOOKING
WHERE CUSTOMER.CUST_ID = BOOKING.CUST_ID AND VEHICLE_ID = '5012');
Results:
1. List the details of customers who booked the vehicle for less than RM100.
SELECT CUSTOMER.CUST_ID, CUSTOMER.CUST_NAME,
BOOKING.BOOKING_ID, BOOKING.TOTAL_AMOUNT
FROM (CUSTOMER INNER JOIN BOOKING ON CUSTOMER.CUST_ID =
BOOKING.CUST_ID)
WHERE (((BOOKING.TOTAL_AMOUNT)<RM100));
2. List the details of booking that have been paid between 27 March 2022 and 1
April 2022.
Code:
SELECT CUSTOMER.CUST_ID, CUSTOMER.CUST_NAME,
BOOKING.BOOKING_DATE
FROM (CUSTOMER INNER JOIN BOOKING ON CUSTOMER.CUST_ID =
BOOKING.CUST_ID)
WHERE (((BOOKING.BOOKING_DATE) BETWEEN [27/3/2022] AND [1/4/2022]));
Results:
4. Find a customer whose phone number starts with the number ‘01’.
Code:
SELECT BOOKING.CUST_ID, CUSTOMER.CUST_NAME,
BOOKING.VEHICLE_ID, CUSTOMER.CUST_NO
FROM (CUSTOMER INNER JOIN BOOKING ON CUSTOMER.CUST_ID =
BOOKING.CUST_ID)
WHERE CUST_NO LIKE '1*';
b) Booking Form
c) Availability form
d) Customer form
e) Exit Form
6.2. The report which include the calculation part are shown.
7.0 CONCLUSION
To summaries everything the business is still operating as normal as the company still
wants to maximize the profit. By enhancing the system, it is very convenient for people
to do their business using the current system. Besides, the current system that we are
using is a conventional method where a lot of misunderstandings can happen. Thus,
with the new system that the company implements, it will make it easier for people to
book their cars without any mistakes and misunderstandings.
Lastly, we strongly think that every service that we offer adds greatly to the smooth
operation of our project and the avoidance of any problems that might damage the
reputation of our company as we work hard to succeed. Moreover, we emphasize our
objective was already stated. It is because we include a platform that our company may
employ in every stage of the business for the purpose of our future operations. In
addition, this project contributes in giving the decision-maker the information they need
to determine any improvements or maintenance that are necessary to achieve the
desired results.
8.0 REFERENCES
How to use Microsoft Sway - tutorial for beginners. (n.d.). Error! Hyperlink reference not
valid.
anandmeg. (n.d.). Tutorial: Get started with Visual Basic - Visual Studio (Windows).
Docs.microsoft.com. https://docs.microsoft.com/en-us/visualstudio/get-started/visual-
basic/tutorial-console?view=vs-2022
9.0 APPENDICES