Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
Person (SSNo, First-Name, Last-Name, Age) Manager SSNo, Manager-ID, Office) Chefs (SSWO, Chef-ID, Cooking-Degree, Ranking, Chef-Chef-ID) Customer (SSN. Customer-ID. Tastes, Payment-Method. Menu-ID) Menu (Menu-ID Category, Menu-Description)
Person (SSNo, First-Name, Last-Name, Age) Manager SSNo, Manager-ID, Office) Chefs (SSWO, Chef-ID, Cooking-Degree, Ranking, Chef-Chef-ID) Customer (SSN. Customer-ID. Tastes, Payment-Method. Menu-ID) Menu (Menu-ID Category, Menu-Description) Orders Order-ID O/der-Details Time/Date, Menu-ID) Meals (Meal-TD Ptice, Meal-Description. Menu-ID) Ingredient Ingredient-ID. Ingredient-Name. Quality, Quantity) Inventory Quantity, Capacity, Stock-Taking-Date, Manager-ID. Meal-ID) Cook(Chef-1D. Meal ID Give(Customer-ID, Order-ID) Use(Chef-ID, Ingredient-ID 1 Implement the following types of queries in SQL (at least 2 queries for each category); - (a) retrieve all the tuples of a relation. Display all the attribute values. (b) retrieve all the tuples of a relation. Display some but not all attribute values. (c) retrieve the tuples that satisfy some condition. (d) retrieve the tuples that satisfy some condition. Query should include the LIKE operator (e) retrieve the tuples that satisfy some condition. Output should be sorted - sorting on a single attribute. (f) retrieve the tuples that satisfy some condition. Output should be sorted sorting on more than one attribute. (g) implement a query that groups a relation on a specific attribute, and applies SUM, COUNT, MIN, MAX aggregate functions on each group
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
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