0% found this document useful (0 votes)
40 views

Dbms Demo

Uploaded by

Manish Sah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Dbms Demo

Uploaded by

Manish Sah
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 80

Database | 2020

Purpose of this assignment

Database is a crucial part of most of the organizations. Database is defined as the skeleton of any
application. An understanding of database tools and technologies is an essential skill for
designing and developing systems to support them. The assignment provides opportunities to the
students to develop an understanding of the concepts and issues relating to database design and
development and to extend the practical skills to translate that understanding into the design and
creation of complex databases. The completion of the assignment will make sure that the
students have been able to use appropriate tools to design and develop a relational database
system for the substantial problem. The students will have an opportunity to test the system
ensuring that user and the system requirements are met. And also, fully document that system by
providing the technical and user documentation.

The completion of the assignment will demonstrate that that the student has been able to:

• Use an appropriate design tool to design a relational database system for a substantial
problem.
• Develop a fully functional relational database system, based on an existing system
design.
• Test the system against the user and system requirements.
• Produce technical and user documentation.

Each student has to submit their assignment as guided in the assignment brief. The students are
guided what sort of information is to be produced to meet the targeted criteria. All the tasks need
to be done individually and the student has to produce an individual assignment.

Unit Learning Outcomes targeted in this assignment

LO1: Use an appropriate design tool to design a relational database system for a substantial
problem.

LO2: Develop a fully functional relational database system, based on an existing system design.

LO3: Test the system against user and system requirements.

LO4: Produce technical and user documentation.

Scenario I

Universal Café want to design a food ordering system. You are one of the employee hired by this
café to design a database system. The details provided by the system are as follows:

I|Page
Database | 2020
There are three main component of the system: the dining area, the Kitchen, and Admin desk
(cash counter). Customers table with table name, table id and location as well as order details
like table name, order date, order id, delivery date, order status, comments are kept by waiter and
entered into system.

The server on the restaurant admin’s desk is used in updating and keep track of customer table
records. The central database for restaurant-admin to store updated menu information like item
id, item name, category, price and picture file name and order details.

At first the admin with attribute admin id, admin name, password, address, and phone will log
into the system and update the menu. The waiter has to login the system so that the system can
assign identification number to the ordered menu according to table.

The order details from customer’s Table are updated in sever database and then sent to kitchen
and cashier respectively. The restaurant admin can manage the menu updates easily.

The customer order information and menu choices are sent to the server over network. The
admin and the kitchen cook will receive the ordered lists from the system. The admin can update
the order status into the system. The waiter can thus view his customer order status. After having
the food customer with reference to table can make payment with payment details like total
amount, payment id, discount, status, method of payment for the order that has made in admin
desk.

Based on the context above, complete the followings.

Part 1

Produce a Report:

1. The design of the relational database system using appropriate design tools and
techniques. It should contain at least four interrelated tables.
2. Clear statements of user and system requirements.

Produce a more detailed document, so you will produce a comprehensive design for a fully
functional system which will include interface and output designs, data validations and cover
data normalization and assess the effectiveness of design in relation to user and system
requirements.

Part 2

Once the designs accepted, you have to develop the database system using evidence of user
interface, output and data validations and querying across multiple tables.

II | P a g e
Database | 2020
You want to include more than just the basics so you will implement a fully functional database
system which will include system security and database maintenance features.

• You have decided to implement a query language into the relational database system.
1. Assessing whether meaningful data has been extracted through the use of query tools to
produce appropriate management information.
2. Evaluating the effectiveness of the database solution in relation to user and system
requirements, and suggest improvements.
3. Once the system has been developed, you will test the system
4. You will produce a brief report assessing the effectiveness of the testing, including an
explanation of the choice of test data used.

Part 3

Lastly you will produce technical and user documentation.

You want to provide some graphical representations for ease of reference in the technical
guide, so you have decided to produce a technical and user documentation for a fully
functional system, including diagrams showing movement of data through the system,
and flowcharts describing how the system works.

Pass Merit Distinction


LO1 Use an appropriate design tool to design a relational database system for a substantial problem
P1 Design a relational database M1 Produce a comprehensive LO1 D1 Assess the effectiveness
system using appropriate design design for a fully functional of the design in relation to user
tools and techniques, containing system which includes interface and system requirements.
at least four interrelated tables, and output designs, data
with clear statements of user and validations and data
system requirements. normalization.
LO2 Develop a fully functional relational database system, based on an existing system design.
P2 Develop the database system M2 Implement a fully functional LO2 & LO3 D2 Evaluate the
with evidence of user interface, database system which includes effectiveness of the database
output and data validations, and system security and database solution in relation to user and
querying across multiple tables. maintenance. M3 Assess whether system requirements, and suggest
P3 Implement a query language meaningful data has been

III | P a g e
Database | 2020
into the relational database extracted through the use of improvements.
system. query tools to produce
appropriate management
information.
LO3: Test the system against user and system requirements
P4 Test the system against user M4 Assess the effectiveness of
and system requirements. the testing, including an
explanation of the choice of test
data used.
LO4: Produce technical and user documentation.
P5 Produce technical and user M5 Produce technical and user D3 Assess any future
documentation. documentation for a fully improvements that may be
functional system, including required to ensure the continued
diagrams showing movement of effectiveness of the database
data through the system, and system.
flowcharts describing how the
system works.

Mention all the grades awarded in this assignments:

Note: Please access HN Global for additional resources support and reading for this unit. For
further guidance and support on report writing please refer to the Study Skills Unit on HN
Global. Link to www.highernationals.com

Other Recommendations:

 It should be the student’s own work – plagiarism is unacceptable.


 Clarity of expression and structure are important features.
 Your work should be submitted as a well presented, word-processed document with
headers and footers, and headings and subheadings, both in hard and soft copies.

IV | P a g e
Database | 2020
 You are expected to undertake research on this subject using books from the Library, and
resources available on the Internet.
 Any sources of information should be listed as references at the end of your document
and these sources should be referenced within the text of your document using APA
referencing style ✓ Your report should be illustrated with screen-prints, images, tables,
charts and/or graphics.
 All assignments must be typed in Times New Roman, size 12, 1½ spacing.

I declare that all the work submitted for this assignment is my own work or, in the case of group
work, the work of myself and the other members of the group in which I worked, and that no part
of it has been copied from any source. I understand that if any part of the work submitted for this
assignment is found to be plagiarized, none of the work submitted will be allowed to count
towards the assessment of the assignment.

Assignment Prepared By: Signature: Date: 15 Jan, 2020

Marut Dhungana

Brief Checked By: Signature: Date: 17 Jan, 2020

Dhruba Babu Joshi

Table of Contents

Introduction......................................................................................................................................1

Database...........................................................................................................................................1

Application of Database..................................................................................................................1

Bank.............................................................................................................................................1

Airlines........................................................................................................................................2

Education Sector..........................................................................................................................2

DBMS..............................................................................................................................................2

V|Page
Database | 2020
Relational database..........................................................................................................................2

Object-Oriented Database................................................................................................................3

Centralized database........................................................................................................................3

Entity Relationship..........................................................................................................................3

Entity Relational Diagram:..............................................................................................................4

Entity................................................................................................................................................5

Strong Entity:...............................................................................................................................5

Weak Entity:................................................................................................................................6

Attribute...........................................................................................................................................6

Simple attributes..........................................................................................................................6

Multi-valued attributes.................................................................................................................6

Single valued attributes................................................................................................................7

Composite attribute......................................................................................................................7

Key attribute................................................................................................................................7

Derived attribute:.........................................................................................................................7

Relationship.....................................................................................................................................7

One-To-One:................................................................................................................................8

One-To-Many:.............................................................................................................................8

Many-To-Many:..........................................................................................................................8

VI | P a g e
Database | 2020
Data types........................................................................................................................................8

Primary key......................................................................................................................................8

Foreign key......................................................................................................................................9

Normalization..................................................................................................................................9

Types of Normalization...............................................................................................................9

First Normal Form (1NF)........................................................................................................9

Second Normal Form (2NF)..................................................................................................10

Third Normal Form (3NF).....................................................................................................10

Data Dictionary..............................................................................................................................10

Conclusion.....................................................................................................................................13

Part 2..............................................................................................................................................13

Introduction....................................................................................................................................14

Database design tools....................................................................................................................14

Draw.io......................................................................................................................................14

Microsoft Visio..........................................................................................................................15

Visual Studio.............................................................................................................................16

Microsoft SQL Server................................................................................................................17

Relationship of IDE and DBMS....................................................................................................19

User Interface.................................................................................................................................19

VII | P a g e
Database | 2020
SQL Query.....................................................................................................................................27

DQL...........................................................................................................................................27

DDL...........................................................................................................................................29

DML..........................................................................................................................................33

DCL...........................................................................................................................................43

Join.................................................................................................................................................44

Inner join....................................................................................................................................44

Left join.....................................................................................................................................45

Right join...................................................................................................................................46

Full outer join............................................................................................................................47

Testing...........................................................................................................................................48

UI testing...................................................................................................................................48

Compatibility testing.................................................................................................................48

Stress testing..............................................................................................................................48

Database security...........................................................................................................................54

Database backup............................................................................................................................54

Conclusion.....................................................................................................................................55

Part 3..............................................................................................................................................56

Introduction....................................................................................................................................57

VIII | P a g e
Database | 2020
User Manual...................................................................................................................................57

Technical Overview.......................................................................................................................57

Constraints.....................................................................................................................................57

Manual Guide................................................................................................................................58

User Manual Guidance..................................................................................................................58

Physical system requirements........................................................................................................66

Visual Studio.............................................................................................................................66

Microsoft SQL server................................................................................................................66

Programming Language.................................................................................................................66

Flow chart......................................................................................................................................67

Recommendation for future...........................................................................................................69

Conclusion.....................................................................................................................................69

Bibliography..................................................................................................................................70

IX | P a g e
Database | 2020
Introduction

Universal café hired me for design a food ordering system to the café. We have to design a
develop a database solution system for the cafe beside that we required to produce a report or
manual that is intended to be used by Software Developers and Managers. In this part we will
discuss the database, relation database, entity, relation which we use in our database.
Normalization, data dictionary will show in the database. Not only that we will draw the sketch
which we can implement in IDE.

There are various types if database some of them are Oracle, Microsoft SQL Server, Informix
MySQL, etc. In this project I used Microsoft SQL Server because it was to operate. So, at first,
we am designing a functional system which will include a valid interface and output design with
data normalization.

Database

A database is a collection of related data to manage the organization. By data we mean know
facts that can be recorded and that have understood meaning. A file composed of records, each
containing fields together with a set of operation for searching, sorting, recombining and other
function. database help in share a data, efficient in data access.

Application of Database

A database application is a computer program that can enter, update, read and delete data from a
database. Most end user database applications know that they have a graphical user interface to
interact. There are many areas in which database management systems are used. Below are some
of the applications that take advantage of database management systems.

Bank

Storing customer information, tracking daily credit and debit transactions, and creating bank
statements, all these tasks are performed with the help of database management system The
database management system is used to store customer information in a database.

1|Page
Database | 2020
Airlines

Book a flight in advance, this reservation information is stored in a database along with the flight
schedule. A database is needed to store data regarding ticket reservations, status records, or
arrivals and departures. The system also uses a database management system to keep track of
departures, arrivals and delays and other related to plane.

Education Sector

Schools and universities often use database systems to store and retrieve data about student
details, faculty and staff details, course details, exam details, payroll data, attendance details, cost
details, and more. Store and retrieve in an efficient manner when needed. All data is stored in the
database regardless of delegate participation, grades, courses, fees, participation, results, etc.

Not only these we can use the database in various sector such as Credit card transactions,
Telecommunications, Online Shopping, Human Resource Management, Social Media Sites
and other sector.

DBMS

Every database needs a system to manage and manipulate the data in the database and this
system is known as Database Management System. The database means specifying the data
types, structures and rule for the data to be stored in the database. Constructing the database is
the process of storing the data on some storage medium. Manipulating the database means
adding, retrieving, deleting and modifying the records in the database.

Relational database

In a relational database, data elements are organized in the form of multiple tables with rows and
columns. Each table of the database is stored as a separate file. Each table column represents a
data field and row represents a data record. The data in one table is related to a data in another
table with a common field. Structural Query Language (SQL) is a standard user and Application

2|Page
Database | 2020
Programming interface (API) of a relational database. It allows us to identify and access data in
relation to another data in the database.

Object-Oriented Database

An object-oriented database (OODBMS) is an object-oriented programming (OOP) based


database. Data is a represented and stored in the form of objects. Object-oriented databases are
databases that share models with the information represented by objects. In an object-oriented
database, every real entity is represented as an object, things have states and actions. The current
set of object properties determines the state of the object. The set of methods that affect the state
of an object determines the behavior of the object.

Centralized database

A centralized database is a collection of information in a single location that can be accessed


from multiple points. Unlike distributed databases, in distributed databases, information is
disseminated across multiple sites. It can only be maintained and modified from this website, and
it can usually be accessed using an internet connection such as a LAN or WAN. Centralized
databases are used by organizations such as universities, companies, and banks. Users can access
stored data from different locations through multiple applications. These apps include an
authentication process that allows users to securely access their data.

Entity Relationship

Entity Relationship Model is a graphical representation of an information system that describes


the relationships between kitchen, waiter, admin, order in the system. An ER diagram helps
explain the logical structure of a database. ERD is a data modeling technology that defines
business processes and serves as the basis for relational databases. The ER model represents real
entities and the relationships between them. It is a best practice to create an ER model in a
DBMS before implementing the database.

3|Page
Database | 2020
Entity Relational Diagram:

An entity relational diagram is a diagrammatic way of representing the relationship between the
entities in a database. To show the relationship between the entities, both the degree and name if
the relationship need to be specified. ER diagram not only contain different symbol and
connector it also visualizes two different important information about the major entities within
the system scope and the inter-relation between their entities. According to our scenario we made
this ER diagram which was shown below:

Figure 1 ER Diagram

4|Page
Database | 2020
The above entity relation diagram, we can see different types of relationship between different
entities which is find or predicate out using ER diagram. If we design ER diagram for Universal
Café it can be represented like the above one. The relationship between table and the waiter is
one-to-one because while the waiter takes the order there will be one waiter for one table and the
primary key are Table_ID and Waiter_ID which are unique data for Table and waiter
respectively. And the Bill and the Order Details are one-to-one relationship in a sense that the
table in a customer will take one bill that they order. According to the number of customers in
table, the relation between the Waiter and Menu is one-to-many and the primary key are
Waiter_ID and Food_ID. In this ER diagram, one-to-many relation more such as, waiter can take
many orders from customer and the Order_ID is a primary key and to identify the table in order
details there will be foreign key which is Table_ID, the kitchen will recived many orders, the
admin will conform many bills, the admin can track many orders details which was passed by
waiter. There is many-to-many relation for Menu and Order Details because to provide
individual menu to customer, they can order more food item in café which makes easier to
customer. From the above ER diagram and explanation, we can assure user site will get all
information of the contents of Universal Café.

Entity

Entity means things or object which has a physical existence such as particular item or name
employee name in a company and employee is entity. The entity is represented by rectangle. i.e.

Strong Entity:

Strong entity contains a primary key in the set of attributes that describe strong entity and as well
as it does not depend upon any other entity. Strong entity is denoted by single rectangle.
Although strong entity may or may not have total participation in the relationship but throughout
its relation between two strong entities is represented by single diamond simply called
relationship. Set of similar strong entities forms the strong entity set. The Admin, Waiter, Menu,
etc. are the example of strong entity.

Strong Entity
5|Page
Database | 2020

Weak Entity:

Strong entity contains a primary key in the set of attributes that describe strong entity and as well
as it does not depend upon any other entity. Strong entity is denoted by single rectangle.
Although strong entity may or may not have total participation in the relationship but throughout
it relation between two strong entities is represented by single diamond simply called
relationship. Set of similar strong entities forms the strong entity set. A strong hold a relation
with the weak entity with an identifying relationship, which is indicated by double diamond in
the ER diagram. The kitchen is an example of weak entity because it does not have any primary
key and it was depended up on the order details.

Weak entity

The component of ER diagram are Entities, Attributes and relationship.

Attribute

Attributes are the properties which describes the entity. There are different attributes some of
them are as follow:

Simple attributes

The attributes that cannot be further divided into smaller parts and represents the basic meaning
is known as simple attributes. For example, Food_Name, User_Name, Password etc. are a simple
attribute.

Multi-valued attributes

Attributes that consist more than one values for a particular entity is called multi-valued
attributes. In other word, those attributes having more than two values with in a time is known as
multi-valued attribute. Categories, Order Type are the example of multiple values attributes.

6|Page
Database | 2020
Single valued attributes

The attributes having a single value for a particular entity is called single valued attributes. If
there is at most one value associate with it at any point of time. Quantity, Total, Discount are the
example of single valued attributes.

Composite attribute

The Attributes that can be further divided into smaller units and each individual consists a
specific meaning. Those attributes which are created from compromised of two attributes are
known as composite attribute. For example, ‘Name’ attribute of waiter entity can be further
divided into ‘First Name’ and ‘Last Name’.

Key attribute

Key attribute is a unique property of an entity which is applied to make key property and
corresponding column to a primary key in database. For example, in Order_Detail attribute there
are two key attribute one is Order_ID and Waiter_ID which are primary key and foreign key
respectively.

Derived attribute:

Those attribute whose value is calculated from other attributes. In other word, the attribute does
not exist in the physical database, but their values are derived from other attributes. For example,
Delivery is derived from Order_type in Order_Details.

Relationship

All the necessary data are not stored in a single entity or table. Rather data are stored in multiple
tables which are related with each other. A relationship is a link or association between two or
more entities in a database. There should be a common field between the two entities for
relationship and it is established by linking the foreign key in the child table with the primary
key in a master table. There are different types of relationship which can be over there to form
relation between two different entities and they are as follows:

7|Page
Database | 2020
One-To-One:

If one records of an entity is related with only one record of another entity, then it is known as
One-To-One relationship. The relationship which is created by using primary key-Unique
foreign key constraints. In this relationship both of the table should be associated with each other
by only one matching row. For example, Table and Waiter and Bill and Order_Details are one-
to-one relation.

One-To-Many:

If one instance of one entity is reflated with many instances of other entity, then it is known as
One-To-Many relationship. The relationship in which one row of a one table can be matched
with multiple rows of another table. Relationship is created using primary key-foreign key. For
example, Waiter and Order_Details, Admin and Order_Details, Kitchen and Order_Details are
the one-to-many relationship.

Many-To-Many:

If many instances of the one entity are related with many instances of another entity, then it is
known as Many-To-Many relationship. Those type of relationship in which multiple rows of a
one table can be matched with another table. The number of customers have individual menu and
they give more order. That why the Menu and the order_Details have many-to-many relation.

Data types

A database data type is a type of data store that can store values of different types or ranges.
When a computer program stores data in variables, each variable must be assigned a separate
data type. Common data types include integers, characters, strings, floating point numbers, and
arrays.

Primary key

The primary key is the only link to related information in other tables that use the primary key. It
must enter it when creating the record, and it was never change. The primary key is a column or

8|Page
Database | 2020
group of columns in a table, and its value uniquely identifies a row in the table. Relational
databases are designed to enforce primary key uniqueness by allowing only one row in a table to
have a specified primary key value.

Foreign key

A foreign key consists of a column that points to another column in another table. Usually this
referenced column is the primary key of the reference table. A foreign key is a column or group
of columns in a table whose values correspond to the values of the primary key in another table.
To add a row with a specified foreign key value, the linked table must contain a row with the
same primary key value. The purpose of foreign keys is to ensure the referential integrity of the
data. In other words, it only accepts values that should appear in the database.

Normalization

Normalization is the process of organizing data in a database to reduce the redundancy and
inconsistency. The data is said to be redundant if the same data is found in more than one place
in a table. In normalization, there should be more tables with fewer fields in a database. The
process of breaking down a single big table into many smaller tables with fewer fields. It also
reduces the inconsistent dependencies between the various fields in a tables.it is used to promote
efficient maintenance, storing and updating of data tables.

Types of Normalization

Normalization is the process of decomposing a big table into many smaller tables to minimize
data redundancy and make data model more flexible and easier to maintain. Many normal forms
are defined; the 1NF, 2NF, 3NF, Boyce-Codd Normal Form (BCNF), 4NF, 5NF, Domain Key
Normal Form (DKNF), and 6NF. If a database is in 6NF, then the database is called fully
normalized. Among the several normal forms, the most used three are as follows:

9|Page
Database | 2020
First Normal Form (1NF)

The first form of naming allows only one value at the intersection of each row and column. So,
there are no more than one data in a group. To settle a relationship containing a duplicate set,
delete the duplicate set to form two new relationships. The new relationship PK combines the
characteristics of the newly created relationship with the original relationship PK for a unique
definition. Normalization forms a table that satisfies certain constraints and represents a certain
standard form. The standard format is used to prevent various kinds of exceptions and
inconsistencies from being introduced into the database.

Second Normal Form (2NF)


For the second normal form, the relationship must first be 1NF. 2NF relationships are
automatically only if the PK contains one property. The second paradigm applies to relationships
with compound keys, i.e., relationships with primary keys consisting of two or more attributes.
The relationship of a single attribute to its primary key is automatically at least 2NF.
Relationships that are not in 2NF may be affected by update exceptions. Partial dependency is
that the primary key consists of several properties (such as a compound primary key), and some
properties (the properties of a non-primary key) are partially dependent on its functions.

Third Normal Form (3NF)


To be in the third primary form, the relationship must be in the second primary form, and there
must be no non-primary key attributes that are transitionally dependent on the primary key. It
should also remove all transitive dependencies. A functionally unimportant property may not
depend on another unimportant property. If it have a transitive dependency, it should be delete
the dependency's transitive property using the selector, not the specified key and instance
entering the new relationship.

Data Dictionary

A data dictionary stores information about the structure of the database. The data dictionary
defines each term encountered during the analysis and design of a new system. A good data
dictionary should have a good design and efficient implementation. It is seen that when a

10 | P a g e
Database | 2020
program become somewhat, keeping track of all the available names that are used and propose
for which they used, becomes more and more difficult. Data dictionary helps user by providing
all the details in it. It also improves the communication between counsel and the user. Now I am
going to show the data dictionary of the given database below

Tables

Attributes Data type Length Constraint Key Null


Table_ID int pk_Table_ID Primary key No
Location varchar 20 - - Yes
Customer_Number Int - - Yes

Waiter

Attributes Data type Length Constraint Key Null


Waiter_ID int pk_Waiter_ID Primary key No
Name Varchar 20 - - Yes
Password Varchar 20 - - Yes

Menu

Attributes Data type Length Constraint Key Null


Food_ID int pk_Food_ID Primary key No
Food_Name Varchar 20 - - Yes
categorizes Varchar 20 - - Yes
Price Money - - Yes

Order

Attributes Data type Length Constraint Key Null


Order_ID int pk_Food_ID Primary key No

11 | P a g e
Database | 2020
Table_ID Int Fk_Table_ID Foreign Key No
Waiter_ID Int Fk_Waiter_ID Foreign Key No
Order_Type Varchar 20 - - Yes
Order_date Date - - Yes

Kitchen

Attributes Data type Length Constraint Key Null


Food_ID Int Fk_Food_ID Foreign Key No
Waiter_ID Int Fk_Waiter_ID Foreign Key No
Quantity Int - - No

Bill

Attributes Data type Length Constraint Key Null


Bill_No Int Pk_Bill_No Primary key No
Food_ID Int Fk_Food_ID Foreign Key No
Quantity Int - - No
Total Money - - No
Payment_Method Varchar 20 - - Yes
Discount Varchar 20 - - -

Admin

Attributes Data type Length Constraint Key Null


Admin_ID Int Pk_Admin_ID Primary key No
User_NAme Varchar 20 - - Yes
Password Varchar 20 - - yes

12 | P a g e
Database | 2020

Conclusion

In this part we made a ER diagrams, relationship diagrams, and database dictionaries to provide
and validate database design clearly. We have discussed about entity, attribute, key which are
used in ER diagram and different types of data server.

Part 2

Once the designs accepted, you have to develop the database system using evidence of user
interface, output and data validations and querying across multiple tables.

You want to include more than just the basics so you will implement a fully functional database
system which will include system security and database maintenance features.

• You have decided to implement a query language into the relational database system.

1. Assessing whether meaningful data has been extracted through the use of query tools to
produce appropriate management information.

2. Evaluating the effectiveness of the database solution in relation to user and system
requirements, and suggest improvements.

3. Once the system has been developed, you will test the system

4. You will produce a brief report assessing the effectiveness of the testing, including an
explanation of the choice of test data used.

13 | P a g e
Database | 2020

Introduction

In this part we will discuss the IDE which we have used to build the food ordering system. JOIN
is a clause in SQL statement that is used to link two tables together and is usually based on a key
that defines a relationship between two tables. We use different types of joins to connect the
different tables. We use the different SQL query such as create, insert, delete, update and other
more.

Database design tools

To create a Universal Café database system, we used different software and tools. Database
design is the process of designing a database with different models. These operations are often
performed in the database and run before the data is entered. Database designers typically
interact with each group of potential users to develop a database view that meets the processing
and data needs of those groups. Standardization provides flexibility to the data model and makes
data processing easier. Database design tools and techniques are well-designed databases that
provide access to up-to-date and accurate information. It is worth taking the time to learn the
principles of good design because good design is important to achieving your database usage
goals. After all, we are more likely to have a database that meets our needs and can easily adapt
to changes.

There are various types of databases designing tools. The y are as follows:

Draw.io

14 | P a g e
Database | 2020
Draw.io is the world's most popular open-source browser-based suite of technologies for creating
end-user charts and graphs. We can use this program to select the automatic layout functionality
or create a custom layout. Use a variety of shapes and hundreds of visual elements to make our
UI. The drag and drop functionality make it easy to create UI.

Microsoft Visio

We can use Microsoft Visio to create simple or complex diagrams. Microsoft Visio is a program
for drawing various diagrams. It includes flowcharts, organizational charts, architecture plans,
floor plans, data flow diagrams, process flow diagrams, business process modeling, 3D maps,
and more. A variety of built-in shapes, objects, and templates are available. We can also create
and import our own forms when we're ready to do anything else. The main idea behind Visio is
to make it as easy as possible for users to create diagrams.

15 | P a g e
Database | 2020

Visual Studio

Visual Studio is an integrated development environment (IDE) developed by Microsoft that


allows to develop graphical user interfaces (GUIs), consoles, web applications, web applications,
mobile and cloud applications, web services, and more. Visual Studio includes a code editor with
IntelliSense written in C++ and C#, and provides an integrated debugger that can be used as a
source-level debugger or as a computer-level debugger.

16 | P a g e
Database | 2020

Microsoft SQL Server

Microsoft SQL Server is a software product primarily used to store and retrieve data required by
other applications. These applications can be run on the same computer or on different
computers. Data is stored in tables the same way rows and columns are stored in a spreadsheet.
SQL Server efficiently caches databases so that data can be retrieved or retrieved as quickly as
possible. Store and retrieve data as requested by other applications. When software developers
create new business applications that store information in a database, they use the power of SQL
Server to do the same rather than writing their own code to manage many tasks.

17 | P a g e
Database | 2020

18 | P a g e
Database | 2020
Relationship of IDE and DBMS

We have used the Visual Studio IDE in the .net framework to create a desktop application using
C#. we used MySQL for backend development where all customer data and transactions are
stored in the database. For SQL queries, we used SQL Server, the program that manages the
database. Visual Studio is the IDE that allows us to write code accurately and efficiently without
losing the current file context.

In our project, we used a programming language called C# (C Sharp) which is a high-level


language. We used C# programming language in our project. This is because it is a modern
language that is easy to learn and well documented. This includes many features such as code
reuse, recycling, inheritance, and polymorphism. My SQL is used to communicate with the
database. It is an open-source Relational Database Management System (RDBMS) powered by
Oracle based on SQL (Structured Query Language).

User Interface

User Interface, also known as UI. A broad term for physical or software-based systems that
allow users to communicate with a particular technology. Different types of user interfaces can
be used for different hardware and software. User interface design involves in creating an
interface with software or computer peripherals with an emphasis on form and style. The goal is
to create a design that is easy to use and enjoyable. User interface designs usually refer to
graphical user interfaces, but also include other interfaces, such as voice control interfaces. The
UI was the frontline or frontend. The UI was easily understood by everyone. The sketch which
we had made in draw.io was implemented into visual studio.

19 | P a g e
Database | 2020
Welcome Page

Main Login

20 | P a g e
Database | 2020
Admin Login

Admin Dashboard

21 | P a g e
Database | 2020
Track Order Details

Menu Update

22 | P a g e
Database | 2020
Bill Prepare

Waiter Login

23 | P a g e
Database | 2020
Waiter dashboard

Customer Information

24 | P a g e
Database | 2020
Menu

Order

25 | P a g e
Database | 2020
Kitchen Login

Kitchen Dashboard

26 | P a g e
Database | 2020
SQL Query

SQL stand foe Structured Querry Language. It is the comprehensive database language which
allows the user to query a database without getting depth knowledge of the design of the
underlying tables. SQL has statement for data definition, data manipulation and data control, A
query is a request to the DBMS for the retrieval, modification, insertion and deletion of the data
from the database.

DQL

DQL stands for Data Query Language. SQL commands used to retrieve data from a database are
collectively called DQL. There is only one command, the SELECT command. It is used to select
the attribute based on the condition described by WHERE clause. The example was shown
below:

For Admin,

For Bill

27 | P a g e
Database | 2020

For Kitchen

For Menu

For Order Details

28 | P a g e
Database | 2020

For Table

For Waiter

29 | P a g e
Database | 2020
DDL

DDL stand for Data Definition Language. It is used to create, modify and drop database and
database object such as table, user-defined data type, index, views, etc. CREATE, DROP and
ALERT are DDL statement. CREATE is used to make a new database object, DROP is used to
remove the unnecessary database objects and ALERT is used to modify the database objects
from the database. The example was shown below:

For creating database

For creating R_Admin table

30 | P a g e
Database | 2020

Creating R_Waiter Table

Creating R_Bill Table

31 | P a g e
Database | 2020

Creating R_Kitchen table

Creating R_Menu table

Creating R_Table table

32 | P a g e
Database | 2020

Creating R_Order_Deatails table

DML

DML stand for Data Manipulation Language. It is used to work with data in the database. DML
statements are INSERT, UPDATE and DELETE. These are used to retrieve required data from
database, to insert a new data into database, modify existing data and delete the unnecessary data
from database. The example was shown below of DML:

R_Admin table

Insert data into R_Admin table

33 | P a g e
Database | 2020

Before Update

After update with query

R_Kitchen table

34 | P a g e
Database | 2020
Insert data into R_Kitchen table

After Insert data R_Kitchen table

Update R_Kitchen table data

Delete the data in R_Kitchen table

35 | P a g e
Database | 2020

R_Bill table

Insert data into R_Bill table

After insert data in R_Bill table

Update R_Bill table

36 | P a g e
Database | 2020

Delete R_Bill table

R_Order_Details table

Insert data into R_Order_Details table

37 | P a g e
Database | 2020

After insert data in R_Order_Details table

Update R_Order_Details tabl

Delete R_Order_Details tabl

38 | P a g e
Database | 2020

R_Waiter table

Insert data into R_Waiter table

After insert data in R_Waiter table

Update R_Waiter table

39 | P a g e
Database | 2020

Delete R_Waiter table

R_Table table

Insert data into R_Table table

40 | P a g e
Database | 2020

After insert data in R_Table table

Update R_Table table

41 | P a g e
Database | 2020

Delete R_Table table

R_Menu table

42 | P a g e
Database | 2020
Insert data into R_Menu table

After insert data into R_Menu table

Update R_Menu table

43 | P a g e
Database | 2020

Delete R_Menu table

DCL

DCL stand for Data Control Language. It is used to change the permission associated with a
database user or role. DCL contains the commands that allows system and data privileges to be
passed to various users. The commands are normally available to database administrator. The
DCL statement are GRANT, DENY and REVOKE.

44 | P a g e
Database | 2020
Join

JOIN is a clause in SQL statement that is used to link two tables together and is usually based on
a key that defines a relationship between two tables. Arrays are linked through primary and
foreign keys.

Inner join

It contains the data which match column from both sides.

45 | P a g e
Database | 2020
Left join

The join will display the value in the left column and the value that matches the value in the right
join. This is used to retrieve the most frequently used data from a table.

46 | P a g e
Database | 2020
Right join

The values in the right column and the corresponding values in the left column are displayed in
the join. Used to select general data. We can also include a query in the SQL field to select
anomalous data from the table on the right.

47 | P a g e
Database | 2020
Full outer join

Table of both values associated with one another are shown in this join. The Full outer join is
used to prepare the result set of the left outer and right outer joins. The result set will contain all
rows of both tables. If the result does not match the content described as null value.

48 | P a g e
Database | 2020
Testing

A database contains organizations various data and files. It stores the information in tables which
may not be of same type from other data. Database testing is one of the major testing which uses
tester to check tables, writing queries and procedures. The testing was done after we complete
the application of the food ordering system.

UI testing

The testing where individual components or units are tested is unit testing. It is done during the
coding of an application where its main objection is to select a code and verify the error on
database. A testing is a single item or module is a unit test. This is done when you write your
application code. The main warnings are code selection and database validation errors.

Compatibility testing

A compatibility test is a non-functional test that an application performs to assess its


compatibility in different environments. Compatibility testing is an evaluation used to verify that
a software application works correctly on a variety of browsers, databases, operating systems
(OS), mobile devices, networks, and devices. This is basically a test of an application or product
embedded in a computing environment. Tests the embedded application or software product for
compatibility with other hardware, operating systems, databases, or system software.

Stress testing

Stress testing is an important factor in developing new database applications. There are many
tools and services available for stress testing, but those with all the known features are relatively
expensive. This test tests units of pressure, compatibility, and data. It was tested that the datatype
was stress-activated to exclude data lengths beyond those required to allow data entry error
messages. It worked because we got an error message on a larger input. The number of allowed
messages has been exceeded. Stress test tests the length of the database.

49 | P a g e
Database | 2020

The following are the testing which we test in the database and the UI.

What was tested Result of expected Result of actual


Main Login The password which we put The Password was hide.
must be hidden.

What was tested Result of expected Result of actual

50 | P a g e
Database | 2020

Search item When we search the food The detail which we enter was
item all, the details must be shown the information of it.
shown.

What was tested Result of expected Result of actual


Primary Key When we enter same primary The error was shown when
key, it must show the error we enter a same primary key.

51 | P a g e
Database | 2020

What was tested Result of expected Result of actual


Length of the character Error must be shown when We see the error message.
we enter more character than
we enter.

52 | P a g e
Database | 2020

What was tested Result of expected Result of actual


Enter number While we enter a number we Error was displayed.
enter a character, an error must
be shown

53 | P a g e
Database | 2020

What was tested Result of expected Result of actual


Null While we give any column null It will show the error when we
it will show the error. blank the column.

54 | P a g e
Database | 2020

Database security

Database security refers to the process of collecting data and information, much of which is
secured using various hacking tools. We use a variety of tools and software to enhance security
when applying the ordering system. We use some database security to implement robust multi-
level access and data management controls to limit unauthorized access and use. Load/stress
testing and database capacity testing to ensure they are not down due to Distributed Denial of
Service (DDoS) attacks or user overload.

Database backup

Database backup is the process of creating lost or compromised data that can be restored. The
database is supported by RDBMS or similar database management software. Database

55 | P a g e
Database | 2020
administrators can use database backups to restore the database to a running state with data and
records. Database backups can be stored locally or on a backup server. When the data was loss
we can restore the data from the database backup server.

Conclusion

In this part we have discuss the different software which we can used as IDE and the relation
between the Microsoft SQL server and the Microsoft Visual Studio. We have the test the
database server and UI and the error which was occur during the testing the solution was also
given in evaluation section.

56 | P a g e
Database | 2020
Part 3

Lastly you will produce technical and user documentation.

You want to provide some graphical representations for ease of reference in the technical guide,
so you have decided to produce a technical and user documentation for a fully functional system,
including diagrams showing movement of data through the system, and flowcharts describing
how the system works

57 | P a g e
Database | 2020
Introduction

This is the part; we will provide the complete documentation on using the database which we
designed. This guide helps users to work more easily and comfortably. We have created the
R_Cafe database name for Universal Cafe. This document contains an introduction, overview,
limitations and prerequisites. Create user guides to help end users interact with our application.

User Manual

User Manual is a guidance to helps users troubleshoot problems with the application. It describes
the structure, functionality, and handling of the application. The user guidance we are using is
the user guide for directing the application. In the documentation, we can find everyone and
everything we include

Technical Overview

In the database Universal Cafe Management System there are seven tables created named Table,
Waiter, Menu, Order_Details, Admin, Bill, and Kitchen. Different tables contain different
information for the Cafe. All the informations are saved in database named R_Cafe and get
linked with visual studio to modify the data and get access from the frontend of the whole
project. This application is designed on a GUI based system. The main function of a developed
application is to run a program which may contain a record of the program's functions displayed
in a database. It provides conceptual knowledge and detailed information about applications,
application development methods, coding standards, and more.

Constraints

SQL uses various constraints to make tables more efficient and feature-rich. These constraints
help maintain the accuracy and reliability of the data in the table. We used constraints like
primary key, foreign key and null. These constraints have their own features, such as non-empty
primary key combinations and uniquely identifying each row in the table. A foreign key uniquely
identifies a row or record in another table. Non-null ensures that the column cannot contain null

58 | P a g e
Database | 2020
values. Application development should be limited. There are many issues/risks when
developing applications, such as:

• Use of unknown programs and applications

• Maintain high security in the application.

• Find a new coding for new features.

• Lack of high coding level.

Manual Guide

A manual guide is a type of note that contains the complete description of the application and its
details Such as login, dashboard because it is the first page of my software. We can also say this
page as the home page. As in this case, it contains all the information and connection details,
dashboard, admin, waiter, kitchen. Where admin have all the access right but the waiter and the
kitchen haven’t all the right.

User Manual Guidance

A user manual is a technical contact document designed to help people understand how to use
our application. A good instruction manual can help users to use the application in better way
and effectively.

59 | P a g e
Database | 2020
When we open our application at first we see the welcome page which was shown below:

After a second we see the main login page, where we have to enter a username and password
along with selection of the login as. The login as for to go the login page of that particular entity.
In our case was Admin, Kitchen and Waiter. In this login page the username and password was
same for all. The screenshot was shown below for main login.

60 | P a g e
Database | 2020
When we login into main login form by selection as waiter in login as. We see again as
secondary login page. Here, the username and password was different for each waiter which was
shown in below:

While to have login into waiter, we have seen the waiter dashboard. The dashboard contains two
section one was selection and next was image which was shown in below. In customer
information, Menu, Order and logout was to carry the information of customer and what they
want to order the food.

61 | P a g e
Database | 2020
When customer enter into a café at first they have to record the information of customer. In
which table they sit, how many customer was there in that table, in which direction does the table
lies was records first. And they save the data and click next for the Menu section. The example
was shown below:

After click next then we are ready to show the menu which they want to eat. Firstly, we have to
enter the name what they want and the details was shown to the customer of its information and
click next for the order. The example was shown below:

62 | P a g e
Database | 2020
After click on Next we are ready to take the order. In this page, they have to give the table ID,
Order ID, Order Status and comments which was shown as below figure. And last they have to
press order now. Then the ordered item was passed to the Kitchen and the admin.

In main login form when we select as kitchen in login as, then we see this page which was shown
below. Here we have to give the username and password which was given to the chef and the
username and password was unique for all.

63 | P a g e
Database | 2020
After login to the chef they enter into chef dashboard. The chef dashboard was shown below.
When the waiter press order now then in a chef dashboard we can see the notification. The order
which chef prepared they give their ID and name.

Like was for admin. When admin enter into this page s/he must enter the username and password
to enter into the dashboard for admin.

64 | P a g e
Database | 2020
When we login into admin, we see this screen where there was two section one was display
board and another was menu section. The admin has all the access right were as the kitchen and
the waiter have not all the right. Only admin can edit and update the menu.

The information which was passed by waiter can view. Only admin have the right to view the
information until and unless when the data was not deleted. The example of the order details
tracking was shown below:

65 | P a g e
Database | 2020
After that when admin back and select for the update menu. Then admin can do anything such as
edit the data, delete the data, and can add the new data also. For new add the data they firstly
they have to select the reset button where the data was clear at once. After the add data or edit
the data until and unless admin click the save. The data was change into waiter table also.

Only admin can prepare the bill. They prepared the bill by tracking the order details. In bill they
put the information and click on save, the data was saved and click on print the save data was
ready to print. The example was shown below:

66 | P a g e
Database | 2020
Physical system requirements

To develop the Universal Café Management System, we have needed the one laptop which have
8GB RAM, 4 GB graphic card, the processor must be i5. In a laptop, the operating system must
be Microsoft Windows 10. In the Laptop we have used the two software for the frontend and the
backend. For the frontend we have use the Visual Studio as an IDE and for the Backend we have
used the Microsoft SQL server.

Visual Studio

We use Microsoft Visual Studio 2019 as an IDE to develop an Inventory Management System.
Visual Studio uses Microsoft software development platforms, such as Windows Form,
Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can generate
native code and managed code. Visual Studio supports 36 different programming languages and
allows code editors and debuggers to support almost any programming language, as long as there
are language-specific services. Several tools are present in the Visual Studio toolbox, and even a
beginner can code there with some basic knowledge. So, we use Visual Studio as an IDE to
develop an inventory management system.

Microsoft SQL server

SQL Server is a relational database management system (RDBMS) from Microsoft. It is a full-
featured database primarily designed to compete with its competitors Oracle Database (DB) and
MySQL. An integrated development environment that provides a graphical interface for
connecting and using MS SQL Server. The SQL Server database engine provides access to
essential services for data storage, processing, and protection, including database engines,
replication, full-text search, relational data management tools, XML, database analytics
integration, and Hadoop. This was easy to use as compare to another SQL server.

Programming Language

Programming languages are used to make all the computer programs and computer software.
Usually, the programming language uses real words for some of the commands, so that

67 | P a g e
Database | 2020
the language is easier for a human to read. Basically, there are two kinds of language i.e., High-
level language and Low-level language where the language used by the programmer to compose
cods in High level language meanwhile, compilation of code in the low-level language that
denote by the computer hardware. The example of programming languages is C, C#, C++,
python, basic etc. We have used C# instead than other because it is easy to use. C#
programming language is very easy to use and it is very best for beginner learner. It is object-
oriented programming language so it is easy to write code. And C# can be used in many different
platforms like desktop, mobile, web application etc. Object and class can be defining in a simple
way from the programming language.

Flow chart

A flowchart is a picture of the separate steps of a process in sequential order. It is a generic tool
that can be adapted for a wide variety of purposes, and can be used to describe various processes,
such as a manufacturing process, an administrative or service process, or a project plan.

For the Food ordering system, the flowchart was shown below.

68 | P a g e
Database | 2020

Figure 2 Flow Chart

69 | P a g e
Database | 2020
Recommendation for future

In Universal Café Food Ordering System, we can make our system online in future. In our
application we have used the C# programming language, it can be change to Python or Java. For
the sore the data we have use the Microsoft SQL server because it firstly to develop the
application it was easy to use. At the present we have to twice login to enter into the dashboard
for different user i.e., waiter, kitchen and admin. In next version of update instead of twice login
it can be reduced into one. The system was applicable for the android platform for mobile user.
We cannot run the system into IOS platform for that we can coding to using both android as well
as IOS devices.

Conclusion

In this part we have discussed about the Food Ordering System. We have discussed about the
user manual, technical overview, constraints and manual guide. We have created the user guide
for Universal Café application to help the end user to operate these application. We have used
the system architecture, flowchart and the data flow chart which make more easy to understand
the application of food ordering system.

70 | P a g e
Database | 2020
Bibliography

Oracle. (2020). What is a relational database?. Oracle.com. Retrieved 26 June 2021, from
https://www.oracle.com/database/what-is-a-relational-database/.

Tutorialspoint. (2020). SQL Tutorial - Tutorialspoint. Tutorialspoint.com. Retrieved 26 June


2021, from https://www.tutorialspoint.com/sql/index.htm.

Fandom. (2020). Normalization. Database Management. Retrieved 26 June 2021, from


https://databasemanagement.fandom.com/wiki/Normalization.

IBM. (2019). IBM Docs. Ibm.com. Retrieved 26 June 2021, from


https://www.ibm.com/docs/en/imdm/11.6?topic=concepts-key-entity-attribute-entity-type.

Christensson, P. (2009, October 27). Database Definition. Retrieved 2021, Jun 25, from
https://techterms.com.

Ahmed, F. (2017, August 31). Concepts of Database Architecture. Medium. Retrieved 26 June
2021, from https://medium.com/oceanize-geeks/concepts-of-database-architecture-
dfdc558a93e4.

visual-paradigm. (2012, January 27). What is Data Flow Diagram (DFD)? How to Draw DFD?.
Visual-paradigm.com. Retrieved 26 June 2021, from
https://www.visual-paradigm.com/tutorials/data-flow-diagram-dfd.jsp.

geeksforgeeks. (2020). Differences between Black Box Testing vs White Box Testing -
GeeksforGeeks. GeeksforGeeks. Retrieved 26 June 2021, from
https://www.geeksforgeeks.org/differences-between-black-box-testing-vs-white-box-testing/.

71 | P a g e

You might also like