Project 1: Databases
Designing a Data Model for an Accommodation Booking Platform
The Problem/Opportunity:
Online accommodation platforms require a well-structured database to efficiently manage users, hosts, listings, bookings, and reviews. Poor data modeling can lead to inconsistent data, limited scalability, and inefficient querying.
This project focuses on designing both a logical and physical data model for an accommodation booking platform, with the goal of:
- Structuring complex relationships between users, hosts, properties, and bookings
- Ensuring data consistency and scalability
- Creating a solid foundation for future analytics and reporting
The key stakeholders include:
- Platform owners (business performance & scalability)
- Hosts (property management & visibility)
- Users (booking experience)
Key Insights:
Data Structure Analysis
Entity: Accommodation
- Each accommodation contains detailed attributes such as price per night, location (latitude/longitude), property type, and capacity (beds, bathrooms, max guests)
- A 1:N relationship exists between Host and Accommodation (one host can manage multiple listings)
- Structuring location as coordinates enables future geospatial analysis
Entity: Host
- Hosts include attributes like registration date, location, and response rate
- A 1:N relationship relationship exists between Hosts and Confirmation Types
- This requires an intermediate table in the physical model to ensure normalization
Relationship Modeling
Entity: Booking
- Bookings connect Users and Accommodations
- Includes key attributes such as booking date and duration
- This forms a bridge entity that resolves a many-to-many relationship:
- One user → many bookings
- One accommodation → many bookings
Entity: Review
- Reviews are linked only to accommodations (not users), simplifying the model
- This design reflects real-world scenarios where reviews may come from external or anonymous users
- Each review includes:
- Rating (0–5)
- Date
- Reviewer name and country
The Outcome:
This project resulted in the design of both a logical and physical database model for an accommodation booking platform.
- The logical model provided a clear representation of entities, attributes, and relationships without technical complexity.
- The physical model translated this into implementable database tables, including:
- Primary keys and foreign keys
- Data types
- Resolution of many-to-many relationships through intermediate tables
- The final schema ensures:
- Data integrity through proper relational structure
- Scalability for handling multiple users, hosts, and bookings
- Flexibility for future analytics use cases such as pricing optimization, user behavior analysis, and review insights
Overall, this project demonstrates the ability to design structured, scalable data models that support both operational systems and analytical workflows.