Subject: Database Management System Consider the following relations: PERSON(P_id,_F_name, L_name,Occupation, Salary, City) ORDER(O_id, P_id, Item, Quantity, Price, Order_date) The Primary Keys are P_id and O_id respectively. Express the following queries in SQL and Relational Algebra. a) Find the person's name and city

Database Systems: Design, Implementation, & Management
11th Edition
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Chapter7: Introduction To Structured Query Language (sql)
Section: Chapter Questions
Problem 65C: Write the SQL code to create the table structures for the entities shown in Figure P7.65. The...
icon
Related questions
Question
Subject: Database Management System Consider the following relations: PERSON(P_id,_F_name, L_name,Occupation, Salary, City) ORDER(O_id, P_id, Item, Quantity, Price, Order_date) The Primary Keys are P_id and O_id respectively. Express the following queries in SQL and Relational Algebra. a) Find the person's name and city whose name starts with S. b) Find the person with the highest salary. c) Find the average salary for each Occupation. d) Find the detail of the person who has ordered any item. e) Find the name of the person who has ordered in the same date. f) Find the game of the person who hasn't ordered any item. g) Find the highest ordered item. h) Find the detail of Item with lowest Price.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Transaction Processing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr