Question: Students should be able to; 1 . USE a dataset in Access format 2 . EXPLAIN the relationship between entities 3 . APPLY SQL to

Students should be able to;
1. USE a dataset in Access format
2. EXPLAIN the relationship between entities
3. APPLY SQL to retrieve the required information from a database
Database Information:
airbnb.accdb contain 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),
2. 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. What is the data type for listing_URL?
2. 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)(Describe; Example)
Q2: SQL
1. Write a SQL statement to display listing names and property types of all the listings.
2. Write a SQL statement to display the distinct property types of all the listings.
3. Write a SQL statement to display the name, price, and city for Apartment type of listings.
4. Write a SQL statement to display the name, price, city, and neighbourhood for Apartment, House, and Cabin types of listings.
5. Write an SQL statement to display the name, price, and property_type of listings that offer accommodation in a range of 2 to 5.
6. Write an SQL statement to display the unique reviewer names who made comments on listings with a strict cancellation policy.
7. Write an SQL statement to display the host name, listing name, price, and price per beds of listings with Beautiful anywhere in the name field.
8. Write an SQL statement to display the neighborhood and number of listings for each neighborhood to show the total supply in the neighborhood based on the number of listings. Rename the frequency column as neighborhood_supply 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!