Professional Documents
Culture Documents
List of Tables
Table 1 - Customer attributes and data entry .................................................................. 4
Table 2 - Employee attributes and data entry.................................................................. 5
Table 3 - Order Food attributes and data entry ............................................................... 5
Table 4 - Bill attributes and data entry ............................................................................. 5
Table 5 - Table attributes and data entry......................................................................... 6
Table 6 - Data dictionary of Employee .......................................................................... 16
Table 7 - Data dictionary of Customer ........................................................................... 17
Table 8 - Data dictionary of Cabin ................................................................................. 18
Table 9 - Data dictionary of Order Food ........................................................................ 19
Table 10 - Data dictionary of Bill ................................................................................... 20
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
1. Introduction
As we are aware, a database is an electronic data set used by a corporation to store, maintain and retrieve
information. (Techopedia, 2016 ). Therefore, in our second course of research in the module information
system, we are attempting to incorporate database function methods. The database's key principle is the
use of entities and attributes in a scheme to demonstrate the relationship between the various database
data. A description of the definition and working structure of the database and the relational database is
shown below.
1
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Lastly, all the employees are given unique employee ID the moment they start working in this organization.
In our scenario, there is a total of ‘n’ number of employees that serve in the restaurant who have their own
first and last name along with the address and phone number.
1.3. Database
The database aims to store a set of data together to support as many users as possible. As a
consequence, a database is often viewed as a collection of knowledge required to perform certain tasks in
a business or organization. Such a database will allow not only the recovery of data but also the
continuous modification of data required for the management of operations. It may be possible to scan the
database for answers to questions or information for planning purposes. (w3schools, n.d.) The database is
implemented through three general levels. These levels are:
All three levels are combined to create a functioning database layout. Databases have a multitude of
applications that help us establish a consistent relationship between various data components.
The key properties that allow the database of any transaction to operate properly are as follows:
1. Atomicity – guarantees a complete transaction or none at all.
2. Consistency – consistency before and after the transaction
3. Isolation – guarantees the confidentiality of the transaction
4. Durability – ensures that effective transactions are reversed even though the system breaks down.
2
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Column / attribute
Degree
Cardinality
Data integrity
Constraints
The central principle of the relational database is that entities and attributes are constructed using specific
primary keys, foreign keys and information of various object types. Relational patterns created using rows
and columns. Columns are also known as attributes and rows are also known as a tuple. Data integrity is
the overall completeness, accuracy and consistency of data. It plays a huge role, while at the same time
involving the effects of a foreign key in a database. If we input data that is not present as a primary key in
another table as a foreign key, we only disobey the rules for data integrity.
Constraints are limitations created by users that impose additional conditions on them. Some of the basic
constraints are set out below.
PRIMARY KEY
FOREIGN KEY
NOT NULL
AUTO_INCREMENT
Primary keys are specific and special for each entry in a single table. Foreign keys are used to refer to
data from one table to another and to make a connection between them. NOT NULL is used if the entry
cannot be empty and must be filled with at least one data. AUTO INCREMENT increases a certain value
without the manual operation.
3
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
2. Database Model
For the creation of a database of the restaurant management system, five different entities are used along
with specific attributes to describe the table’s characteristics.
Entities used are mentioned below:
1. Customer
2. Employee
3. Order Food
4. Bill
5. Cabin
Note: All the primary keys are denoted by red colour and all the foreign keys are denoted by yellow.
Entities along with their attributes and test data are listed below:
Customer with the attributes Customer ID, FName, LName, Address, Mob No, Table No.
4
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Employee with an attributes Employee ID, FName, LName, Address, Mob No.
Employee ID FName LName Address Mob No
E01 Zenith Giri Mahendranagar 9858750541
E02 Jasmine Bam Baneshwor, KTM 9812565648
E03 Monaj Singh Pokhara 9858750123
E04 Aman Kunwar Kotheshwor 9844723113
E05 Deepika Badal Anamnagar, 9848752886
KTM
Table 2 - Employee attributes and data entry
Order Food with attributes Order ID, Food Name, Table No.
Order ID Food Name Cabin No
O11 Chicken MO: MO C01
O12 Black Coffee C02
O13 Veg Fried Rice C03
O14 Buff MO: MO C04
O15 Chicken Pizza C05
O16 Chicken Bugger C06
Table 3 - Order Food attributes and data entry
5
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Multivalued attributes
- Those kinds of attributes which can have more than one value are known as multivalued attributes.
Composite attributes
- Those kinds of an attribute which can be further divided into subparts are known as composite attributes.
6
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Figure 1 - ER Diagram
7
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
8
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
In OrderFood entity there are three attributes with one foreign key columns where CabinNo links to
Cabin entity. Here OrderID is a primary key. In both ER and relational diagram we can clearly see that
from one cabin there can be ‘n’ of orders can come.
In Bill entity there are three attributes with one foreign key columns where where CabinNo links to Cabin
entity. Here BillID is a primary key and price attribute gives the information about how much ordered
food is cost. In both ER and relational diagram we can clearly see that one customer can make payment
for many orders at once.
2.4. Screenshot
Creating Table
9
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
10
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
11
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
12
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
13
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
3. Data Dictionary
A Data Dictionary is a depiction of information likewise including data about the information, for example,
information types, subtleties of structure, and security limitations. (Knight, 2017)
14
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Entity Entity Column Column Data Leng Prima Foreign Nulla Uniq Not
Name Description Name Description Type th ry Key Key ble ue es
15
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
an
Employee
Table 6 - Data dictionary of Employee
Entity Entity Column Column Data Lengt Primar Foreig Nullabl Uniqu Notes
Name Descriptio Name Description Type h y Key n Key e e
n
Custome Customer CustomerID unique Varch 15 True False False True
r s are the identificatio ar
people n value
who come assigned to
to the a customer
restaurant by a
for eating restaurant,
food. which may
be
associated
with the
invoicing or
billing for a
transaction.
FName First Name Varch 20 False False False False
of a ar
customer
LName Last Name Varch 20 False False False False
of a ar
customer
Address The Varch 50 False False False False
particulars ar
16
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
of the place
where
Customer
lives
Mob No The contact Varch 15 False False True True
number of a ar
customer
Cabin No A number Varch 15 False True True True
assigned to ar
the cabin
where
customers
are eating
their food
Table 7 - Data dictionary of Customer
17
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Cabin The cabin Cabin No A unique Varchar 15 True False False True
is the identification
medium number
size room assigned to
where a the cabin
small where
number of customers
people can can eat their
sit and eat food
food while Employee A unique Varchar 10 False True False True
they are in ID identification
a number is
restaurant. given to
each
employee
by a
restaurant
for
managing a
shift of
employee.
Table 8 - Data dictionary of Cabin
18
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Order Where OrderID A unique Varchar 10 True False False True
Food employees identification
take orders number
from the uses
customer exclusively
what they to keep
like to eat track of the
while order
sitting in Food Name of the Varchar 30 False False False True
the Name cuisine
restaurant. order by a
customer to
eat
Cabin A number Varchar 15 False True False True
No assigned to
the cabin
where
customers
are eating
their food
Table 9 - Data dictionary of Order Food
19
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
Entity Entity Column Column Data Length Primary Foreign Nullabl Unique Not
Name Description Name Description Type Key Key e es
Bill Bill is a BillID A unique Varchar 10 True False False True
small identification
paper number
where all provided
the details automatically
are given by the
about the system for
product we keeping
have track of
orderd. payment
Price It the amount INT 10 False False False True
how much
does the
food cost
that
customer
had ordered
CabinNo A number Varchar 15 False True False True
assigned to
the cabin
where
customers
are eating
their food
Table 10 - Data dictionary of Bill
20
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
4. Queries
4.1. MAX
Syntax Select MAX (Price) From Bill
Query Name MAX
Description It gives the highest value of the selected column
4.2. LIKE
21
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
4.3. Between
Syntax select * from Bill WHERE Price BETWEEN
80 and 300;
4.4. LIMIT
SYNTAX select * from OrderFood ORDER BY
FoodName DESC LIMIT 2;
Query Name Limit
Description It specifies the number of records to be
returned
22
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
4.5. WHERE
Syntax select * from OrderFood WHERE FoodName
= "ChickenPizza" ;
4.6. AS
SYNTAX select Price, Price-(Price * 5) AS new_fare
from Bill;
Query Name AS
23
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
4.7. SET
Syntax update Customer set CabinNo="C06" where
CabinNo="C01";
Query Name Set
Description Specifies which value to be updated
4.8. DISTINCT
Syntax select DISTINCT(CabinNo) from Bill;
24
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
4.9. AVG
Syntax Select AVG(Price) From Bill;
Query Name AVG
Description returns the average value of a group
4.10. JOIN
Syntax Select * from cabin join customer on
cabin.cabinno=customer.cabinno;
Query Name Join
Description It joins tables
25
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
5. Conclusion
With the assistance of this coursework, I have accomplished another degree of trust in working with the
database framework. It additionally helped me comprehend the significance of XAMPP and MYSQL while
working in the database. The way toward making the tables and shaping relations between them are even
clearer with the model of our own. It has likewise helped by giving us immense information about
information control in a database. Through this coursework, I currently have a superior comprehension of
various kinds of keys, constraints, information types and different parts of the relational database. I
currently additionally have a more clear comprehension of how ER-Diagram and Relational Diagram
perceivably outlines the database with its function.
Consequently, in short, this course work has made me qualified to at any rate work with essential
functionalities of database system utilizing open source applications like MYSQL and XAMPP.
6. Bibliography
Knight, M. (2017) DATAVERSITY [Online]. Available from: https://www.dataversity.net/what-is-a-data-dictionary/
[Accessed 25 May 2020].
Per, C. (March 6, 2007) TechTerms [Online]. Available from: https://techterms.com/definition/mysql [Accessed 22
May 2020].
Sybase. (2000) Sybase, Inc [Online]. Available from: http://www.upi.pr.it/docs/easfg/easvrfgp7.htm [Accessed 10
April 2020].
Techopedia. (2016 ) Techopedia [Online]. Available from: https://www.techopedia.com/definition/1185/database-
db [Accessed 8 April 2020].
w3schools. (n.d.) w3schools [Online]. Available from: https://www.w3schools.in/sql/database-concepts/
[Accessed 10 April 2020].
26
Bishal Bharati
CC4057NI INTRODUCTION TO INFORMATION SYSTEMS
27
Bishal Bharati