Bootcamp
Search…
3.ICE.13: DB Schema Design - Airbnb
Airbnb Listings Search Results Page

Base

Design a database schema for Airbnb.

DB Setup

Create a new local database called airbnb.

ERD

Create a DB schema for Airbnb by drawing an ERD for the DB, starting with only essentials involved with the above page.
The real Airbnb DB would have many tables, but we don't need to include everything for this exercise. In our ERD, name the tables and columns, identify data types, and define any relationships between the tables.
Try to move as quickly as possible onto the SELECT statements you need in order to render all the data on the page.

CREATE TABLE Statements

Write and execute CREATE TABLE statements to create all tables and relationships in the ERD. Record these statements in a file init_tables.sql.

INSERT Statements

Write and execute INSERT statements to insert dummy data into the tables. Record these statements in a file seed.sql.

SELECT Statements

Write and execute sample SELECT queries you might need to render the account page above.
Don't worry about INSERT or UPDATE queries, or queries for searches. Record the SELECT statements in a file queries.sql.

Comfortable

Add the DB tables, inserts and queries you would need for the functionality leading to and from this page.
Airbnb Listings Search Page

More Comfortable

Add the DB tables, inserts and queries you would need for the functionality leading to and from this page.
Airbnb Listing Page