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.
Or read this on Hacker News