0% found this document useful (0 votes)
72 views

AirBnB Presentation

Uploaded by

Marco Amaral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views

AirBnB Presentation

Uploaded by

Marco Amaral
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Relational Database

Management System
for AirBnB Inc.

Group Members
Divya Rahunathan
Sai Punith Godasi
Soham Chaudhari
Syed Mohd.Asim
Swati Kohli
Contents
1.Introduction 2.Description 3.Objective & Area Focus

4.Entity & Attributes 5.Business Rules 6.EERD 7.Normalizations & ERD

8.Database 9.Queries 10.Benefits 11.Challenges


Introduction

This is John and his


family. They are
ready to go on a
vacation to San
Francisco
John opens the Airbnb John finds a beautiful 2 John and his family loved
website and creates an bedroom property in San the stay and left a great
account as a “Guest”. Francisco with a kitchen review and rating about the
and books the place for 3 experience!
*John is allotted a nights at economical
UserID and a GuestID* price. *A ReviewID is generated
corresponding to John’s
*John is given an review *
OrderID corresponding to
his guestID and the
property’s propertyID*
This is Cara. She owns
a beautiful home with 2
bedroom and a kitchen
in San Francisco that
she wants to rent out.
Cara opens the Airbnb Cara adds her property as Cara mentions the dates
website and creates an a listing. Enters all the she would like to rent her
account as a “Host”. property features. property

*Cara is allotted a *Cara’s property is given a *A SlotID is generated


UserID and a HostID* PropertyID * corresponding to each slot *
Organization
Description

Business Sector:
Hospitality/ Travel Lodging

Need:
● Huge data repository
● Requires DBMS
● effective running and
growth of the
company
Objective & Area Focus
OBJECTIVE
1. Management of Property listing, Guest
& Host

2. Illustrate utilization of RDBMS and


Database for the same

3. Through Airbnb’s perspective, enabling


data-backed decisions:
AirBnB presence in San
a. For Guests and Hosts to choose Francisco, California
interactions in both online and offline
world.

b. For organization internally to track


their periodic and annual performance.

4. Scalable Schema Design for a city - San


Francisco, California to allow
expansion across States and Countries
AREA FOCUS
Entities and Attributes
Entity- User A user is someone who creates an account on the Airbnb website.
Attributes- User ID,Name,Address,Date of Birth,Gender
The attributes are general information about the User.

Entity- Host Host is a type of User. A host is someone who can list their properties on the
Airbnb website for the guests to book.
Attributes- Response Rate- Rate at which the host responds to the property booking
Host Since - The date since the user has been a host.
Host Verification - If the host has been verified or not
Acceptance Rate - The rate of bookings the host accepts
Is Super host - If the host is a super host i.e a status earned by a host through time and good reviews

Entity- Guest Guest is a type of User. A guest is someone who can make a booking on the Airbnb website.
Attributes- Guest Rating- Rating received for each guest
Guest verification- If the guest has been verified or not

Entity - Review Review entity stores values specific to one guest and one property.
A guest leaves a review for a specific property.
Attributes- Review date - Date of review
Rating - Rating given by the guest - 1,2,3,4,5
Entities and Attributes

Entity- Property Each property is owned/managed by a single host. Properties are listings on the Airbnb
Attributes- website available for a guest to book.
Space - Summary of the type of property
Guests included- Number of guests in the published price
Extra people rate- Extra charge per person
Kitchen, pet friendly - If the property has a kitchen or is pet friendly respectively

Entity- Booking order Booking entity stores values specific to a single booking made by a guest. When a guest
Attributes- makes a booking for a property, he receives a booking order ID
Extra guests - Number of additional people that would be staying

Entity- Calendar Slot Calendar slot entity stores values specific to a property. Each property may have many
Attributes- slots available in a year. Each property available slot is identified in the calendar slot entity
by the Slot ID.
Available - “Y” for available, “N” for not available
Adj price - Price after discounts
Business Rules

● A User may be a Guest. ● A Guest can give a Review for the ● Each Guest must have at least one
● A Guest must be a registered User. stay experience with respect to Booking (or is only a User until
● A User may be a Host. every booking order he/she makes. then)
● A Host must be a User. ● Each Review is given by a single ● Each Booking must correspond to
Guest. only one Guest.
Business Rules
● A Property may have none or multiple ● A Host should have at least one ● A Property may or may not have a Booking. Also, a
Calendar_Slots of availability. Property listed (or is only a User property can be booked multiple times.
● A Calendar_Slot must correspond to one until then). ● Each Booking corresponds to one Property only.
Property only. ● Each Property is associated with ● A Property can have one or more Reviews.
only one Host. ● Each Review associates only with a single Property.
Data Table (Source) from AirBnB
Data Source: http://insideairbnb.com/get-the-data.html
Data Table for Host, Property, Bed

Data Table for Review

Data Table for Calendar Slot


Enhanced Entity Relation Diagram

Through 2 steps:
1. Normalization to 1NF
2. Study research to add other
Entities and Data required
for the project
A complete 3NF relational model (Also as 2NF)
Steps Followed:
1. Make every attribute value atomic
2. Remove multivalued attributes to create entities
3. Remove full, partial and transitive dependencies
4. Reflect requirement of relation
Entity Relation Diagram (from 3NF)
Database Tables
Total of nine tables in the database - 7 main and 2 multivalued.
Screenshot of some records:

1. User

2. Host

3. Guest

4. Review
Database Tables
Total of nine tables in the database - 7 main and 2 multivalued.
Screenshot of some records:

5. Property

6. Bed (Multivalued)

7. Calender_Slot

8. Booking_Order

9. Credit_Coupon (Multivalued)
Queries

Sequel SELECT queries using various elements.


Specifically, the elements covered are:

1. Select Clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY

2. Functions - COUNT, ROUND, AVERAGE, SUM, DATE_FORMAT

3. Boolean Operators: AND , NOT, LIKE

4. Comparison Operators: =, >, <

5. Multiple Tables Queries: INNER JOIN, ON,

6. SubQuery : IN, NOT IN, NOT EXISTS, Derived table, UNION,

7. Conditional: CASE (WHEN,THEN) with Derived Table


Queries
#1
Purpose of Query: SQL Code:
Find the percentage availability of the properties
in 2019.

Commands Used:
COUNT, ROUND, DATE_FORMAT, GROUP
BY, SUB QUERY

Output:
Queries
#2
Purpose of Query: SQL Code:

List the available properties from cheapest


to most expensive in San Francisco

Commands Used:
● ORDER BY
● LIKE

Output:
Queries
#3
Purpose of Query: SQL Code:

Find the top hot properties (property IDs) in San


Francisco, their original price and associated Host ID
,name and IsSuperhost based on the average review rating
of that property to be greater than 3. Display their average
rating as well.

Commands Used:
Conditions, GROUP BY, AVERAGE, HAVING

Output:
Queries
#4
Purpose of Query: SQL Code:
List properties in an area of San Francisco that have at
least one King Bed, come with a kitchen and are Pet
friendly.

Commands Used:
INNER JOIN, LIKE

Output:
Queries
#5
Purpose of Query: SQL Code:

Display the properties in the area of San Francisco


that are 2 bedroom houses with a rating of 3 or
above.

Commands Used:
ON, INNER JOIN, LIKE

Output:
Queries
#6
SQL Code:
Purpose of Query:
Find the total value of credit and coupon owned by each
guest.
Commands Used:
NOT EXISTS, UNION, SUB QUERY, SUM

Output:
Queries
#7
SQL Code:
Purpose of Query:
Search based query to list properties that have never
been booked by a guest

Commands Used:
NOT IN, SUB QUERY

Output:
Queries
#8
Purpose of Query:
SQL Code:
List out the full name, Guest ID and total sum of
credit and coupon values of the guests that have
both credit and coupon values in their account.

Commands Used:
IN, SUB QUERY, GROUP BY, SUM, CASE
(When, Then), HAVING

Output:
Benefits

Self Describing nature of RDBMS provides data Prevention of data Capacity to be a scalable
RDBMS because metadata Security, Privacy, redundancy or database system design for
defines and describes the Consistency and Backup duplication. A change is a growing business
data and the relationships and recovery. reflected immediately. especially across
define between tables in countries.
the database. Maintain data integrity Data independence
by adding restriction or because metadata are
Map a business through rule to dictate information separated from the
this information and entered or edited in a table application programs
database. such as phone number is
10 digit long.
Challenges

Project Approach Data Integrity Finding Meaningful


Humongous AirBnB data Data entry is error prone Relationships
of myriad countries and incorporating Data Figure effective relations for
top down or bottom up Integrity to avoid conflict accurate data selection through
approach? or overlap was a queries which sets the foundation
challenge. for effective Data Analysis

Solution Solution Solution


EERD and a scalable Incorporated checks in Brainstorming for ideas,
approach metadata descriptions Initial EERD and in turn
normalization steps.
THANK YOU!

You might also like