The following relational database schema stores information about a restaurant. The primary keys are underlined and field types are omitted. Study the schema and its corresponding description to answer the questions Customer (cid, cname, cage, caddress, cphone) Table (tno, capacity, availability) Item (iid, iname, price) Order ( oid, cid, iid, tno, quantity) Employee (eid, ename, eaddress, eage, salary) Reservation (rid, eid, cid,date, time) The customer is someone who eats in the restaurant. The Customer relation provides customer id, the name, age, address and phone number information. The Table relation gives the restaurant's occupancy information that includes the table number, the number of people who can sit on the table, and the table's availability information. The restaurant serves several items. Each of the Items has an identification number (e.g 82285), name (e.g, salad), and unit price (e.g.,$15). Soon after arrival in the restaurant a customer places an order. Order relation contains order id, customer id, ordered items id, each item's quantity. Each order contains one or more items, and the quantity of each item (e.g., order 10 contains one soup and two salads). Here we are assuming that a customer can visit the restaurant at most once in a day and can't place multiple orders at a time. Restaurant employees serve customers. The Employee relation contains employee id, name, address, age, and salary information. The customer can make a reservation in the restaurant beforehand. The Reservation relation records reservation, employee, and customer ids, and reservation date and time. In this question, you will only deal with querying part of SQL. You are NOT allowed to tamper with (change the contents of) the database, i.e., CREATE, INSERT, DELETE ALTER, UPDATE etc. i. Write a stored procedure to find the name of the employee which are highly paid and have age greater than 30? age greater
The following relational database schema stores information about a restaurant. The primary
keys are underlined and field types are omitted. Study the schema and its corresponding
description to answer the questions
Customer (cid, cname, cage, caddress, cphone)
Table (tno, capacity, availability)
Item (iid, iname, price)
Order ( oid, cid, iid, tno, quantity)
Employee (eid, ename, eaddress, eage, salary)
Reservation (rid, eid, cid,date, time)
The customer is someone who eats in the restaurant. The Customer relation provides customer id, the name, age, address and phone number information. The Table relation gives the restaurant's
occupancy information that includes the table number, the number of people who can sit on the
table, and the table's availability information. The restaurant serves several items. Each of the Items
has an identification number (e.g 82285), name (e.g, salad), and unit price (e.g.,$15). Soon after
arrival in the restaurant a customer places an order. Order relation contains order id, customer id, ordered items id, each item's quantity. Each order contains one or more items, and the quantity of
each item (e.g., order 10 contains one soup and two salads). Here we are assuming that a customer
can visit the restaurant at most once in a day and can't place multiple orders at a time. Restaurant
employees serve customers. The Employee relation contains employee id, name, address, age, and
salary information. The customer can make a reservation in the restaurant beforehand. The
Reservation relation records reservation, employee, and customer ids, and reservation date and
time. In this question, you will only deal with querying part of SQL. You are NOT allowed to
tamper with (change the contents of) the database, i.e., CREATE, INSERT, DELETE ALTER, UPDATE etc.
i. Write a stored procedure to find the name of the employee which are highly paid and have age greater than 30?
age greater
Trending now
This is a popular solution!
Step by step
Solved in 2 steps