Get the latest tech news

Database Design for Google Calendar: A Tutorial


Author: Alexey Makhotkin squadette@gmail.com. Introduction In this database design tutorial (~9000 words) I’m going to show how to design the database tables for a real-world project of substantial complexity. We’ll design a clone of Google Calendar. We will model as much as possible of the functionality that is directly related to the calendar. This series illustrates an approach explained in the book called “Database Design using Minimal Modeling”, scheduled to be released in Summer 2024.

AnchorQuestionLogical typeExample valuePhysical columnPhysical type DayEventFor repeated events: what is the repetition step?integer 2 (every two days/weeks/etc) This is our first example of tangled attributes. AnchorPhysical tableID example UserTimezoneDayEventTimeEventDayOfTheWeek “Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, “Sun” DaySlotTimeSlot Second, list of attributes (ordered by anchor): Add a few rows to the catalog tables, fill in the contents of each cell, and then edit the schema definition above to include the missing pieces of data.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Google Calendar

Google Calendar

Photo of Tutorial

Tutorial

Photo of database design

database design

Related news:

News photo

PyTorch Lightning: A Comprehensive Hands-On Tutorial

News photo

Extracting Words from Scanned Books: A Step-by-Step Tutorial with Python, OpenCV

News photo

Memory Consistency Models: A Tutorial