What is Database Design?

Database design is the process of structuring a database schema to efficiently store, manage, and retrieve data while minimizing redundancy and ensuring relationships between entities are properly maintained.


Key Principles of Database Design

  1. Avoid Data Duplication (Normalization)
  2. Establish Clear Relationships Between Tables
  3. Design with Real-World Scenarios in Mind

Booking.com Example — Requirements

Requirement Analysis:

Database Entities and Relationships

Entities:

Entity Description
User Can book, review, and wishlist hotels
Hotel Listed by owners, has many rooms
Room Belongs to a hotel, multiple categories
Booking Represents a user booking a room
Review Represents a user’s review for a hotel
Wishlist Represents a user’s bookmarked hotels
Room Category Type of room (Standard, Deluxe, Suite, etc.)
City Represents all cities
State Represents all states

Entity-Relationship Mapping

Notation: