Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Database Information: airbnb.accdb two tables: Listings Table contains information of some listings (i.e., properties) listed on airbnb.com website; (Fields: listing_id, listing_url, name (i.e., names of

Database Information:

airbnb.accdb

two tables:

  1. Listings Table contains information of some listings (i.e., properties) listed on airbnb.com website; (Fields: listing_id, listing_url, name (i.e., names of listings), host_id, host_name, host_response_time, neighbourhood, neighbourhood_group, city, state, property_type, accommodates, beds (i.e., the number of beds), price, number_of_reviews, review_scores_rating, cancellation_policy),

  1. Reviews Table contains the reviews given to different listings listed in the Listing Table. (Fields: listing_id, id, date, reviewer_id, reviewer_name, comments)

Q1: Data Type and Entity-Relationship

1 Mark

  1. What is the data type for listing_URL? (Hint: Check column details on the ribbon of MS access db)
  1. Describe how data in tables are related. Justify your answer using an example from the data provided in the tables. (Hint: use connectivity and cardinality to explain your answer)

Q2: SQL

4 Marks

  1. Write a SQL statement to display listing names and property types of all the listings.

  1. Write a SQL statement to display the property types of all the listings.

  1. Write a SQL statement to display the name, price, and city for Apartment type of listings.

  1. Write a SQL statement to display the name, price, city, and neighbourhood for Apartment, House and Cabin type of listings.

  1. Write a SQL statement to display the name, price, and property_type of listings that offer accommodation in a range of 2 to 5

  1. Write a SQL statement to display the reviewer names who made comments on listings with strict cancellation policy.

  1. Write a SQL statement to display the host name, listing name, price, and price per beds of listings with cozy anywhere in the name field.

  1. Write a SQL statement to display neighborhood and number of listings for each neighborhood to show the neighborhood popularity based on the number of listings? Rename the frequency column as neighborhood_popularity in the above SQL. (Hint: Use COUNT and GROUP BY. Use the COUNT function to get the listing count.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions