chapt3

31
Chapter 3 Design Pattern 3.1 Architectural Design 3.1.1 Problem Specification This application is to automate the restaurant activities. It provides the facilities for reserving the seats at restaurant, ordering of food and payment through online.. Customers want better services in less cost and in easy way as well as the organizations also advertise and selling their products online and through social networks. So the websites are very simple and powerful way to achieve this goal for both parties. The Online Restaurant provides the advertisements on the websites, that attract the customers to know about the items and provides easy and secure mechanism to get items (foods), services or marketing online. This website provides facilities to the publisher to advertise their product/services and make deals with customers. To develop this idea, the architecture design of this system should be very strong. To store all the customer data, business listing detail and all the functionality, it is necessary to design a database that can handle all the

Upload: suraj-mysore

Post on 18-Apr-2017

216 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: chapt3

Chapter 3

Design Pattern

3.1 Architectural Design

3.1.1 Problem Specification

This application is to automate the restaurant activities. It provides the facilities

for reserving the seats at restaurant, ordering of food and payment through online..

Customers want better services in less cost and in easy way as well as the organizations

also advertise and selling their products online and through social networks. So the

websites are very simple and powerful way to achieve this goal for both parties. The

Online Restaurant provides the advertisements on the websites, that attract the customers

to know about the items and provides easy and secure mechanism to get items (foods),

services or marketing online. This website provides facilities to the publisher to advertise

their product/services and make deals with customers.

To develop this idea, the architecture design of this system should be very strong.

To store all the customer data, business listing detail and all the functionality, it is

necessary to design a database that can handle all the data and its operation. This can be

understood by the ER-diagram, DFD and Structure chart.

3.1.2 E-R diagram

ER diagram shows entity relation diagram for all entities present into the database

to perform different operations. The database of Online Restaurant application is

composed of many entities.

Customer

Table Reservation

Online order

Reviews/feedback

login

Page 2: chapt3

menus

Admin(restaurant)

3.1 ER Diagram for Delicatessen theme Development Application

Page 3: chapt3

3.1.3 Data Flow Diagram

A data flow diagram is a representation of the "flow" of data through an information system,

modeling its process aspects. Often they are a preliminary step used so as to create an overview of

the system which can later be elaborated. DFD's can also be used for the visualization of data

processing.

Level 0 DFD

Level 0 DFD is a context diagram of whole restaurant activities process. In this

customer and administrator are external entity. The process is to collect customer

data and process by the admin.

3.2 DFD for level 0 of Delicatessen theme Development

Admin

0

Delicatessen Development

Customer

Item, email idFeedback, report

Social media name, phone ,email

Page 4: chapt3

Level 1 DFD

The Level 1 DFD describes the modules. First the menu are displayed on the business

web page and it can be ordered by the customer booking is available for the customer .

And all the details transactions are managed by restaurant.

3.3 DFD for level 1 of Delicatessen theme Development

Level 2 DFD Customer Online Ordering and Reservation

Customer

1.0Online Ordering

3.0Customer Registration

2.0Reservation

Admin

itemid,namePhone no ,email id

nameTime ,

Name,Email id

phone

item, customer

4 .

report

Page 5: chapt3

Online Ordering

Initially the customers view the menu. The customer selectsome item from

menu,collect the customer requirement then verifies the customer details and store into

database. Later automatic confirmation mail is sent to the customers. Forprocessing of

ordersplaced by the customer.

3.4 DFD for level 2 Online Ordering part1

Page 6: chapt3

The Admin view selected item from menu by the customer, thenverify and store into

database. Later automatic confirmation mail is sent to the customers saying that

processing of order will take time and your order has been placed successfully

3.5 DFD for level 2 Online Ordering part2

Page 7: chapt3

DFD for Reservation

For reservation of table first customer has to reserve a table online before that he has

to check for a availability of seats if seats are available for reservation in the restaurant then

he has to input the number of seats and table required if the availability is satisfied then the

confirmation mail or message is sent to the customer for successful reservation.

3.6 DFD for Level 2 Reservation

Page 8: chapt3

Customer Registration Module

Customer registration module contains customer's information such as

customer personal information and other information related to that customer. Then,

all of this information recorded into database. Once all the information is recorded

next time whenever he orders the food no need of entering the address and rest all

information for delivery.

3.7 DFD for Level 2Customer Registration

Page 9: chapt3

Generate Report Module(Admin)

System provides an option for generate a report. The contents of the report as report of

customer ordering and reservation tablecustomer's information and their related order

information.suggestion or comment that customer insert at feedback form.

3.8 DFD for Level 2 Report Generation

Page 10: chapt3

3.1.4 Structure charts

 A structure chart is a graphical chart used for the purpose of describing and communicating a

model or process within an organization. This chart typically consists of shapes with descriptions

and connecting lines that show relationships to other shapes within the chart.

3.9 Structure Chart

Page 11: chapt3

3.1.5 Data definition / Dictionary

Table name:Customer_Details

Customer table stores the customer and the related subcategory for the product or

services.

This is used when the user register for products/services.

Primary key is email id .

This table contains the fields as email id, name, phone_number,password.

Field name Data type Field size Constraint Description

Name Varchar 50 Not null Customer name

Phone_number Int 10 Not null Customer ph.no

Email id Varchar 25 Primary key Customer Email

Password Varchar 15 Not null Email password

Table:3.1 Customer_details

Table name: login

o login table stores the login and the related subcategory.

o This is used when the user register for products/services.

o Foreign key is email id.

Page 12: chapt3

o This table contains the fields as email id, name, phone_number,password.

Field name Data type Field size Constraint Description

Email Id Varchar 50 Foreign key Customer name

Password Varchar 15 Not null Email password

Table:3.2 login

Table name:menu_details

o Menu table stores the menu of theRestaurant.

o This is used when the customer or Restaurant view all items .

o primary key item _id.

Field name Data type Field size Constraint Description

Item_id Int 5 primary key Item id

Item_name Varchar 40 Not null Item name

Price Int 4 Not null Item price

Table:3.3 menu_details

Table name:Reviews_Details

o Reviews table stores the reviews that made by customer.

o This is used when the customer want to know about the restaurant.

o Restaurant use for marketing reviews are made by social media .

o primary key review_id Foreign Key email_id.

Field name Data type Field size Constraint Description

Page 13: chapt3

Review_id Int 5 primary key Review id

Description Text 40 Not null Review

Reviewer_Emai

l

Varchar 4 Foreign Key Reviewer email

Posted_on Datetime 10 Not null Posted time and

date

Table:3.4 Review_details

Table name:table _booking

o Booking table stores the booking information made by customer.

o This is used by the customer.

o This related to booking module when booking is made then one notification send to

the customer email_id.

o Foreign Key email_id.

Page 14: chapt3

Field name Data type Field size Constraint Description

Booking_type Varchar 20 Not null Booking type

Number_guest Integer 4 Not null Guest number

Booking_time Varchar 9 Not null Booking time

Booking_date Date 10 Not null Booking date

Name Varchar 20 Not null Customer name

E-mail Varchar 35 Foreign Key Customer e-mail

Mobile_number Integer 10 Not null Phone number

Landline_numbe

r

Integer 10 Not null Landline

number

Instructions Varchar 50 Not null Institutions

Table:3.5 Table_Booking

Table name:Guest_shipping

o Guest shipping stores the information about customer.

o This is used by the customer and restaurants.

o This related to online ordering module when new customer order the food items

then guest shipping store the information of customer.

o Foreign Key email_id.

Page 15: chapt3

Field name Data type Field size Constraint Description

Name Varchar 30 Not null Customer name

Address Varchar 50 Not null Shipping address

Area Varchar 20 Not null Shipping area

Email Varchar 35 Foreign Key Customer email

Ph.no Int 10 Not null Customer ph.no

Table:3.6 Guest_shipping

3.1.6 Module Specification

Module 1: Customer Online Ordering and Reservation

Introduction

Customer online ordering and reservation module provides a form that needs to be fulfilling

in term of ordering food and reservation table via online. Reservation module contains the

booking of the table.

Input

Customers

For ordering food online a customers can select items provided in the menu.

Customer have to enter his/her address.

Customer have to enter his/her mobile number, name, land mark.

Customers can reserve a table online and make payment through card or net banking.

In this module the interested customers will register for getting services

Customers can reserve a table online and make payment through card or net banking.

Page 16: chapt3

In this module the interested customers will register for getting services

Organization

Organization will receive the input as customers will select an items from the menu

and place an order.

Reservation of a table is done in the restaurants as a notification is received from the

customer online.

Processing

Customers

After ordering a food online an id for particular customer has been generated

automatically.

Similarly for reserving a table online an session is generated for customer.

If the customer do not occupy the table in provided session the reservation of the table

for that customer is cancelled.

Organization

An id generated for customer who has ordered online the id is stored in the database.

Depending upon the id stored in the database restaurant prepares a food and deliveries

the food to the customer.

Output

Customers

Customer gets notification after booking a table and reserving a table online.

By this notification customer comes to know that a food order has been placed

successfully and table has been reserved.

Organization

Page 17: chapt3

Organization can keep a track of all the customers those who placed order for a food

online and have reserved a table.

Organization can also keep track of a food item that has been placed maximum

number of times by the customer.

Subordinates

It store all the information about the food items.

Send SMS/Email after booking is conferred.

Purpose

The main purpose is to automate the restaurant activities. It provides the

facilities for reserving the seats at restaurant, ordering of food and payment through

online

Module 2: Customer Registration Module

Introduction

Customer registration module contains customer's information such as customer

personal information and other information related to that customer. Then, all of this

information recorded into database. Once all the information is recorded next time whenever

he orders the food no need of entering the address and rest all information for delivery. So

that registration saves the time of customer.

Input.

In this module the interested customers will register for getting services

Customer have to enter his/her address.

Customer have to enter his/her mobile number,name.

Reservation of a table is done in the restaurants as a notification is received from the

customer online.

Page 18: chapt3

Processing

Its store into the data base.

If the customer do not occupy the table in provided session the reservation of the table

for that customer is cancelled.

An id generated for customer who has Book the table id is stored in the database.

Output

Customer Once all the information is recorded next time whenever he orders the food

no need of entering the address and rest all information for delivery.

By this notification customer comes to know that a food order has been placed

successfully and table has been reserved.

Sub ordinates

It store all the information about the customer.

Search services from category with auto suggest

Send SMS/Email after booking is conferred.

Purpose

The main purpose is to store the details about the customer for future reference

such as during login.

Module 3: Contact us

Introduction

This module contains the information about the organization . Based on food or

everything about the restaurant, customer can send any suggestion or comment to the

restaurant with feedback form. From this form, side of restaurant will know their weaknesses

and strengths. Even the people who are there in social network like facebook and twitter they

can give there feedback through that also.

Input

Page 19: chapt3

This module contains some details about the customer.

Customer have to enter his/her mobile number, name .

Customers can gives his/her feedback .

Output

Customer can see address in website .

Organization get marketing through social media like Facebook social media twitter .

Organization can also keep track of a customer.

Subordinates

It store all the information about the customer.

Through map it can gives the details about the route.

Send SMS/Email after booking is conferred.

Purpose

The main purpose is to store the details about the customer.Marketing of a

restaurant is done through social networks which helps to have feedback from the

customers regarding restaurant on Facebook, twitter

Module 4: Generate Report Module

Introduction

System provides an option for generate a report. The contents of the report as the following:

The report of customer ordering and reservation table.

Customer's information and their related order information.

Suggestion or comment that customer insert at feedback form.

Profit business for restaurant

Input

This module contains some details about the customer.

Page 20: chapt3

Reservation of a table is done in the restaurants as a notification is received from the

customer online.

Processing

Its store into the data base.

An id generated for customer who has Book the table id is stored in the database.

Output

For the organization it provide all the details about the foods and booking .

It gives all the records .

Subordinates

It store all the information about the customer and restaurant.

It keep all the data after booking is conferred or ordering.

Purpose

The main purpose is to store the details about the items and customer .it also provide

Profit or loss for restaurants.

3.2 Detailed design

3.2.1 Design Decisions

Page 21: chapt3

In the development of this project , the Procedure-Oriented Approach has been used to

assess the performances of various applications. As the procedural approached is followed

for the step by step execution of projects involving a series of steps to be performed to assess

the performances of a software product. Hence the procedural approach is a better model

their problem domains than similar systems produced by traditional techniques.

3.2.2 Logic Design

PDL for: Customer Online Ordering and Reservation

Online Ordering

inputitem name , number of item from customer

if(the entiredata form menu)

If not correct

Generate error message while submitting item from the user

End-if

Store items into the ordering table into database

Send notification code to the customer

If customer does not get the SMS /Email

Resend the SMS/Email

End-if

Reservation

Page 22: chapt3

Input the customer name, date, and time from customer

If (not enter correct data)

Generate error message while submitting item from the user

End-if

Store items into the booking_table into database

Send notification code to the customer

If customer does not get the SMS /Email

Resend the SMS/Email

End-if

PDL for Customer Registration Module:

input Customer name, email , phone number detail

if (all the data are in correct format)

send the data to admin

If not correct

Generate error message

End-if

Store data into customer_details table

If customer is not register

Register the customer, generate user-id and password

Page 23: chapt3

End-if

If password is not correct

Generate error message

End-if

If entered code submitted by the organization is correct

Update verify field into customer_ table as verified

Else listing is not verified.

End-if

Send welcome message after listing is verified

PDL for: Contact us

input Customer name, email , phone number

Check all the data are in correct format

If not correct

Generate error message

End-if

Store data into customer_details table

If customer is not register

Register the customer, generate user-id and password

End-if

If password is not correct

Page 24: chapt3

Generate error message

End-if

Send message to restaurants about activity verified

PDL for Generate Report Module

Login by admin, start session

Authenticate admin by username and password

If( user is not authenticated)

Display username or password is wrong

Redirect to the login page

End-if

If user is authenticated

Add, delete, search, edit customer details and food items

Manage booking transaction and generate report

Logout end session

End-if