Below are 10 statements describing the relational algebra query to be written using the pizza schema, which is reproduced (without the data) here for
Below are 10 statements describing the relational algebra query to be written using the pizza schema, which is reproduced (without the data) here for your reference. The pizza schema: Person( name, age, gender) Frequents( name, pizzeria) Eats( name, pizza ) Serves( pizzeria, pizza, price ) 1.) List all of the pizzas that Amy eats 2.) List the count of pizzas Amy eats 3.) List the count of pizzas all persons eat 4.) List the name and pizzas eaten by people less than 20 years old 5.) List the names of people who eat supreme or cheese pizza 6.) List the names of people who eat supreme and cheese pizza 7.) List the names of all people who eat at least one pizza served by Dominos but who do not frequent Dominos 8.) List all of the pizzerias and pizzas that have a price as much as the most expensive pizza served 9.) List all of the female persons along with the pizzas they eat and how much those pizzas cost at Chicago Pizza 10.) List all pizzas that are eaten only by people younger than 24, or that cost less than $10 everywhere they're served Part 2: Below are 10 statements describing the relational algebra query to be written using the company schema, which is reproduced (without the data) here for your reference. The company schema: EMPLOYEE( Fname, Minit, Lname, Ssn, Bdate, Address, Sex, Salary, Super_ssn, Dno ) DEPENDENT ( Essn, Dependent_name, Sex, Bdate, Relationship ) DEPARTMENT (Dname, Dnumber, Mger_ssn, Mger_start_date ) PROJECT( Pname, Pnumber, Plocation, Dnum ) DEPT LOCATIONS ( Dnumber, Dlocation ) WORKS ON Essn, Pno, Hours ) 11.) List the first and last names of all employees who work in a department that is located in Houston 12.) List the first and last names of all employees who have a dependent with the same first name as themselves 13.) List the first and last names of all employees who have a spouse dependent but not a son dependent 14.) List the first and last names, along with the department they manage and when they began managing that department for all employees who manage a department 15.) List the first and last names of all employees who either work 0 hours total on all projects or more than 40 hours total on all projects 16.) List the first and last names of all employees and include, if they have a spouse, the first name of their spouse 17.) List the first and last names of all employees who are department managers but have no dependents 18.) List the first and last names of all employees who work on at least one project located in Houston but whose department has no location in Houston 19.) List the first and last names of all employees who do not work on any project 20.) List the first and last names of all employees who work on every project
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
Step 11 choose a pizzeria from the chemicals that a person joins using name when age 18 b choose a d...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started