Airbnb database schema

How a short-term rental marketplace models its data: hosts and listings, a host-owned per-night calendar, request-to-book versus instant book, reservations, guest payments and host payouts, and two-way reviews that only reveal once both sides have written.

Airbnb ER diagram

Airbnb database schema 11 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 n1 users idBIGINT emailVARCHAR full_nameVARCHAR display_nameVARCHAR phoneVARCHAR avatar_urlVARCHAR aboutTEXT government_id_ver…BOOLEAN created_atTIMESTAMPTZ hosts user_idBIGINT became_host_atTIMESTAMPTZ is_superhostBOOLEAN response_rateSMALLINT response_time_min…INTEGER payout_methodVARCHAR payout_account_refVARCHAR payout_currencyCHAR default_cancellat…BIGINT cancellation_polici… idBIGINT codeVARCHAR nameVARCHAR full_refund_hoursINTEGER partial_refund_pe…SMALLINT cleaning_fee_refu…BOOLEAN service_fee_refun…BOOLEAN listings idBIGINT host_idBIGINT titleVARCHAR slugVARCHAR property_typeVARCHAR room_typeVARCHAR address_line1VARCHAR cityVARCHAR country_codeCHAR timezoneVARCHAR latitudeNUMERIC longitudeNUMERIC max_guestsSMALLINT bedroomsSMALLINT bedsSMALLINT bathroomsNUMERIC base_price_minorINTEGER currency_codeCHAR cleaning_fee_minorINTEGER default_min_nightsSMALLINT instant_bookBOOLEAN cancellation_poli…BIGINT statusVARCHAR created_atTIMESTAMPTZ amenities idBIGINT codeVARCHAR nameVARCHAR categoryVARCHAR is_safetyBOOLEAN listing_amenities listing_idBIGINT amenity_idBIGINT detailVARCHAR listing_calendar listing_idBIGINT stay_dateDATE price_minorINTEGER min_nightsSMALLINT is_blockedBOOLEAN reservation_idBIGINT updated_atTIMESTAMPTZ booking_requests idBIGINT listing_idBIGINT guest_idBIGINT check_in_dateDATE check_out_dateDATE guest_countSMALLINT message_to_hostTEXT statusVARCHAR expires_atTIMESTAMPTZ responded_atTIMESTAMPTZ decline_reasonVARCHAR reservation_idBIGINT created_atTIMESTAMPTZ reservations idBIGINT listing_idBIGINT guest_idBIGINT host_idBIGINT confirmation_codeVARCHAR statusVARCHAR check_in_dateDATE check_out_dateDATE guest_countSMALLINT nights_subtotal_m…INTEGER cleaning_fee_minorINTEGER guest_service_fee…INTEGER taxes_minorINTEGER total_minorINTEGER currency_codeCHAR booked_viaVARCHAR cancellation_poli…VARCHAR free_cancellation…TIMESTAMPTZ cancelled_atTIMESTAMPTZ created_atTIMESTAMPTZ payments idBIGINT reservation_idBIGINT kindVARCHAR providerVARCHAR provider_referenceVARCHAR amount_minorINTEGER currency_codeCHAR statusVARCHAR created_atTIMESTAMPTZ payouts idBIGINT reservation_idBIGINT host_idBIGINT gross_minorINTEGER host_service_fee_…INTEGER adjustment_minorINTEGER net_minorINTEGER currency_codeCHAR statusVARCHAR release_afterTIMESTAMPTZ paid_atTIMESTAMPTZ provider_referenceVARCHAR reviews idBIGINT reservation_idBIGINT author_idBIGINT directionVARCHAR subject_listing_idBIGINT overall_ratingSMALLINT cleanliness_ratingSMALLINT accuracy_ratingSMALLINT communication_rat…SMALLINT bodyTEXT private_feedbackTEXT submitted_atTIMESTAMPTZ published_atTIMESTAMPTZ response_bodyTEXT response_atTIMESTAMPTZ

Related database schemas