Kelompok 9 ProjectSQL Wati's Fried Chicken
Kelompok 9 ProjectSQL Wati's Fried Chicken
Kelompok 9 ProjectSQL Wati's Fried Chicken
2. Rafif Nuraydin
Class : 1CC1
CEP CCIT
FAKULTAS TEKNIK UNIVERSITAS INDONESIA
2020
PROJECT ON
WATI’S FRIED CHICKEN
Developed by
1. Rayhan Alfarizi
2. Rafif Nuraydin
2
WATI’S FRIED CHICKEN
Names of Developer :
1. Rayhan Alfarizi
2. Rafif Nuraydin
3
CERTIFICATE
This is to certify that this report titled “WATI’S FRIED CHICKEN” embodies the original
work done by Rayhan Alfarizi, and Rafif Nuraydin. Project in partial fulfillment of their
course requirement at NIIT.
Coordinator:
Aisah Rini Susanti
4
ACKNOWLEDGEMENT
Alhamdulillah , praise and greatest delievered pray to the presence of Allah SWT.
Sholawat and greetings may always be devoted to the most human Rasulullah Muhammad
SAW. So the writer can complete this task just one weeks.
The project has a tittle Wati’s Fried Chicken and the author wants to explain about ERD
and query of create database, create table, constraint, rules trigger and strored procedure.
The author conclude this paper is far from perfect, because the author is expecting
criticism and suggestion, in order to refine this paper and useful especially for writers and
readers in general. Therefore, Author expect positive advice and criticism from the reader for
the perfection of this paper.
5
SYSTEM ANALYSIS
System Summary:
First, we will give the ERD look first. ERD itself is a description of the relationship
between the tables in this project itself. After that we made a design regarding database design,
this design itself contains about the relationship of equations in a table with the main display in
the form of things that can be entered in a table. After we finished the Database Design design,
we continued by making a Schematic Diagram. This schematic diagram itself is a display of
flow or sequence in grouping and sequencing a database. So that with this systematics we will
find it easier to tailor the work of a database. After that we shift to Validation Performed, which
will display a system to validate the data that will be entered into the database.
The database system at this Restaurant itself will classify data from various things
offered by a Foods, namely Foods product, Customers and Employees data, as well as various
kinds of data. Each of these features has the same data listing by including quantity, price, etc.
However, there are slight differences to the offering regarding Food services due to the specials
of this offer. We will list the name of the order and food names. So that the existing customers
are not confused and so on. Furthermore, after selecting the offer from the ordering foods, we
will provide a payment receipt by entering the existing code into the receipt details. In addition,
each receipt will be equipped with a customer ID, making it easier for the process of grouping,
payment, etc.
6
ERD
sssssssssss
7
DATABASE DESIGN
8
SCHEMATIC DIAGRAM
9
TABLE DESIGN
Employee
Field Name Data Type Widht Description
Employee_Id (PK) INT - Id of employee
Employee_Name VARCHAR 30 Name of employee
Employee_Email VARCHAR 50 Email address of
employee
Employee_Age INT - Age number of
Employee
Employee_LastEducation VARCHAR 50 Last Education of
Employee
Foods
Field Name Data Type Widht Description
Food_Id INT - Id of Food Product
Food_Name VARCHAR 50 Name of Food
Food_Price INT - Price of Food
Customer
Field Name Data Type Widht Description
Customer_Id (PK) INT - Id of Customer
Customer_Name VARCHAR 30 Name of Customer
Customer_Gender VARCHAR 30 Gender of Customer
Customer_MobileNumber VARCHAR 20 Phone’s Number of
Customer
Order_
Field Name Data Type Widht Description
Order_Id (PK) INT - Id of Orders
Customer_Id (FK) INT - Id of Customer
Food_Id (FK) INT - Id of Foods
Quantity INT - Quantity of Foods
Payment_Id VARCHAR 7 Id of Payment
10
TABLE DESIGN
Payment
Field Name Data Type Widht Description
Payment_Id (PK) VARCHAR 7 Id of Payment
Payment_Methods VARCHAR 50 Methods of Payment
Employee_Id (FK) INT - Id of Employee
11
VALIDATION PERFORMED
Employee
Validation Required Method(s) Used Validation
Employee_Id must be unique Primary key constraint
Foods
Validation Required Method(s) Used Validation
Food_Id must be unique Primary key constraint
Customer
Validation Required Method(s) Used Validation
Customer_Id must be unique Primary key constraint
Customer_Gender can only be filled with check (Customer_Gender LIKE 'male' or
‘male’ or ‘female’ Customer_Gender LIKE 'female')
Order_
Validation Required Method(s) Used Validation
Order_Id must be unique Primary key constraint
Payment
Validation Required Method(s) Used Validation
Payment_Id must be unique Primary key constraint
12
QUERY
13
STORED PROCEDURE
PInputOrder
CREATE PROCEDURE PInputOrder
@Customer_Name varchar(30) ,
@Customer_Gender varchar(30) ,
@Customer_MobileNumber varchar(20),
@Food_Id int,
@Food_Name varchar (50),
@Payment_Id varchar (7),
@Payment_Methods varchar (50)
AS
BEGIN
SET IDENTITY_INSERT Foods ON
INSERT INTO Customer(Customer_Name, Customer_Gender,
Customer_MobileNumber)
VALUES ( @Customer_Name,@Customer_Gender,@Customer_MobileNumber)
INSERT INTO Foods(Food_Id, Food_Name)
VALUES ( @Food_Id, @Food_Name)
INSERT INTO Payment (Payment_Id, Payment_Methods)
VALUES (@Payment_Id, @Payment_Methods)
END
14
TRIGGER
//Trigger INSERTCUSTOMER
15
CONFIGURATION
\
Software : Microsoft SQL Server 2019 Management Studio
Microsoft Office Word 2016
16