DB design of “reservation system” – basic form

Design of database Database
Mainly articles about design of database

This article describes a proposed DB design for a “Reservation System”.

This article describes a suggested DB design.
This design is just an example.
Please use this as a template and adapt it to the system you wish to build.

Summary

There are no complicated functions.
All you have to do is decide on a range of dates and times and make a reservation.There is no user registration.
Think of it as a basic form of reservation system.

The use case is likely to be in a place where an individual is providing a service for a set amount of time.
If this is all there is to it, it is really basic, as it would be better to use Google Calendar, etc. to handle this.

Design Details

ERD

erDiagram RESERVATIONS { int id PK datetime reservation_start_datetime datetime reservation_end_datetime string customer_name string customer_email datetime created_at datetime updated_at }

Tables

reservations

物理名論理名Null備考
idIDintprimary
reservation_start_datetimeStart of reservation date timedatetime
reservation_end_datetimeEnd of reservation date timedatetime
customer_nameCustomer namevarchar(255)
customer_emailCustomer emailvarchar(255)
created_atRecord creation date timedatetime
updated_atRecord update date timedatetime
著者

30 years of experience as a web engineer, currently working as a freelance backend engineer.

PHP: ~30 years (Laravel 7 years / FuelPHP 5 years / CakePHP / custom frameworks)
JavaScript: ~20 years (React & Vue, 4 years each)
Cloud & Infrastructure: AWS (EC2, CloudFront, RDS, API Gateway, etc.) / GCP (BigQuery)

I have been writing PHP since version 4, back when the framework ecosystem was fragmented
and every team had their own approach. I've lived through the evolution firsthand —
from raw PHP and homegrown frameworks to the modern Laravel era —
which means I don't just know how to use a tool, but why it exists and what problem it replaced.

I work across system design, implementation, and operations, primarily on backend systems
for both product companies and contract-based projects.

On this blog, I write about the things I actually got stuck on, looked up, or figured out
in real-world projects. If something here unblocks even one person's day, that's enough for me.

千原 耕司をフォローする

役にたったと思ったら応援をお願いします m(._.)m

DatabaseExample
スポンサーリンク
シェアする
千原 耕司をフォローする
Copied title and URL