Suppose you have the following relational database scheme for a real estate agency: Real Estate Office (officeID, street, city, postalCode) Employee (employee ID, name, surname, position, gender, salary, officeID) For rentMulk (estateD, street, city, postalCode, type, number of rooms, rent, estateOwnerID, employeeID, officeID) Customer (customerID, name, surname, tel, maxrent) estateOwner (estateHeaderID, name, surname, address, tel) estateshow (customerID, estateID, showTime, comment) Record (customerID, officeID, employeeID, recordDate)   Firstly, determine the appropriate primary key for each relationship. Then create the appropriate queries using relational algebra and SQL. List the ID, street, city and rent information of the properties managed by the employees in the office located on "Fifth Street" street. List all the cities with offices but no rental properties. List the names and comments of all customers who have viewed a rental property. List the first and last names of all customers viewing three-room properties. List customers who are registered customers who have never had a property display.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Suppose you have the following relational database scheme for a real estate agency:

  • Real Estate Office (officeID, street, city, postalCode)
  • Employee (employee ID, name, surname, position, gender, salary, officeID)
  • For rentMulk (estateD, street, city, postalCode, type, number of rooms, rent, estateOwnerID, employeeID, officeID)
  • Customer (customerID, name, surname, tel, maxrent)
  • estateOwner (estateHeaderID, name, surname, address, tel)
  • estateshow (customerID, estateID, showTime, comment)
  • Record (customerID, officeID, employeeID, recordDate)
  •  

Firstly, determine the appropriate primary key for each relationship. Then create the appropriate queries using relational algebra and SQL.

  1. List the ID, street, city and rent information of the properties managed by the employees in the office located on "Fifth Street" street.
  2. List all the cities with offices but no rental properties.
  3. List the names and comments of all customers who have viewed a rental property.
  4. List the first and last names of all customers viewing three-room properties.
  5. List customers who are registered customers who have never had a property display.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY