0% found this document useful (0 votes)
12 views21 pages

Canteen Management System

Uploaded by

kajalshinde4737
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views21 pages

Canteen Management System

Uploaded by

kajalshinde4737
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

CANTEEN

MANAGEMENT
SYSTEM
BY S N E H A S , S R I N I D H I A
INTRODUCTION

Canteen Management System is a


project which is based on a Canteen
that is operating on a College
Campus. The database contains
seven tables namely: Crew,
Customer, Food, Menu, Orders,
Payment and Bill.
D ATA B A S E D E S I G N

01 Customer Table 05 Orders Table

02 Crew Table 06 Payment Table

03 Menu Table 07 Bill Table

04 Food Table
TA B L E S ( M E N U , C R E W )
TA B L E S ( C U S T O M E R , F O O D ,
ORDERS)
TA B L E S ( PAY M E N T , B I L L )
TA B L E
CONTENTS
Customer Table

Crew Table
TA B L E
CONTENTS
Food Table

Menu Table
TA B L E
CONTENTS
Customer Table

Payment Table Bill Table


CONSTRAINTS
- D E F A U LT

The DEFAULT keyword provides a default


value to a column when the Oracle INSERT
INTO statement does not provide a specific
value. Here the Default Value is 101 for the
Crew_ID.

Syntax
ALTER TABLE crew
MODIFY crew_id DEFAULT 101 ;
CONSTRAINTS
- CHECK

A Check Constraint allows you to enforce


domain integrity by limiting the values
accepted by one or more columns.
Oracle uses this expression to validate
the data that is being inserted or
updated.
Syntax
ALTER TABLE payment
ADD CONSTRAINT amt CHECK (amount>0);
G R O U P BY ,
C O U N T , O R D E R BY

Syntax Syntax

SELECT COUNT(Profession) SELECT * FROM bill


FROM customer WHERE ORDER BY bill_date ;
Profession = 'Faculty'
GROUP BY Profession;
MIN, MAX
FUNCTIONS

01 MIN(): 02 MAX():
SELECT MIN(amount) SELECT MAX(amount)
AS Minimum_Amt AS Maximum_Amt
FROM payment; FROM payment;
LIKE
O P E RAT O R 02 LIKE (xx%):
SELECT * FROM customer
WHERE cust_id LIKE '22%' ;

01 LIKE (%xx%):
SELECT * FROM customer
WHERE cust_id LIKE '%ITS%' ;
IN, NOT IN
O P E RAT O R 02 NOT IN:
SELECT * FROM food
WHERE food_name NOT IN ('PlainDosa') ;

01 IN:
SELECT * FROM food
WHERE food_name IN ('Rava Upma',
'PlainDosa') ;
BETWEEN
Syntax

SELECT * FROM bill


WHERE bill_date BETWEEN '09-NOV-2022 AND '10-NOV-2022'
ORDER BY bill_id;
JOINS -
INNER, FULL

01 INNER JOIN: 02 FULL JOIN:


SELECT menu.food_id, orders.food_id SELECT menu.food_id, orders.food_id
FROM menu INNER JOIN orders FROM menu FULL JOIN orders
ON menu.food_id=orders.food_id; ON menu.food_id=orders.food_id;
JOINS - LEFT,
RIGHT
Syntax Syntax

SELECT menu.food_id, SELECT menu.food_id,


orders.food_id orders.food_id
FROM menu LEFT JOIN orders FROM menu RIGHT JOIN orders
ON ON
menu.food_id=orders.food_id; menu.food_id=orders.food_id;
V I O L AT I O N S
PRIMARY KEY VIOLATIONS

Customer Table:

Crew Table:

Food Table:
V I O L AT I O N S

FOREIGN KEY VIOLATIONS

Orders Table:

Menu Table:
T H A N KYO U
BY Sneha S, Srinidhi A

You might also like