Backend
A domain that collects notes on server-side development, including API design, authentication, and databases (SQL/NoSQL). A Practical Introduction to Laravel × DDD × Clean Architecture (20 chapters), Introduction to PayloadCMS (7 chapters), and Introduction to Database Design (19 chapters + glossary + design templates) are available.
Chapter 1: The Basic Concept of a Database — Why Keep Data Organized
This chapter frames a database as an organized collection of data and explains, for junior engineers, how that differs from managing data in files or spreadsheets, along with basic capabilities like uniqueness (IDs) and searchability.
Chapter 10: Database Key Concepts — Primary Keys, Foreign Keys, Composite Keys, Surrogate Keys
This chapter organizes the differences between primary keys, foreign keys, candidate keys, composite keys, and surrogate vs. natural keys, and explains the modern best practice of a hybrid approach (surrogate key = PK + natural key = a unique constraint), for junior engineers.
Chapter 11: Database Normalization — First Through Third Normal Form, and When to Denormalize
This chapter builds up, step by step for junior engineers, the idea of normalization for eliminating data duplication and contradictions (update, insertion, and deletion anomalies) — from functional dependency, through first to third normal form, a note on BCNF, and selective denormalization for performance.
Chapter 12: How to Create ER Diagrams — Visualizing Business Requirements
This chapter covers, for junior engineers, the basic notation of an ER diagram (Entity-Relationship Diagram) — entities, attributes, relationships, and cardinality — the steps for building an ER diagram from business requirements, and the major tools (mermaid / draw.io / PlantUML).
Chapter 13: Database Design in Practice — From Requirements to CREATE TABLE
This chapter shows junior engineers, through two examples — a restaurant order slip and an internal SNS — the end-to-end process of extracting entities from a form or business requirements, building an ER diagram, normalizing it, and reaching CREATE TABLE.
Chapter 14: Table Design for Many-to-Many Relationships — Junction Tables, Self-Reference, Tags, and RBAC
This chapter covers implementing a many-to-many relationship with a junction table, using many-to-many with attributes (products and suppliers), self-referencing many-to-many (follows), a tag system, and RBAC (role-based access control) as examples, along with modern alternatives to trigger-based aggregation (application layer / materialized views / Redis).
Chapter 15: Designing an Authentication and Authorization System — Passwords, Sessions, MFA, and Audit Logs
This chapter covers, for junior engineers and from a database-design angle, the difference between authentication and authorization, password hashing (bcrypt/argon2), session management, multi-factor authentication (MFA / TOTP), account lockout (OWASP/NIST compliant), and audit logs.
Chapter 16: OAuth and OpenID Connect — Authentication Integration With External Services
This chapter covers, for junior engineers, OAuth 2.0's four roles, Authorization Code Flow + PKCE, OpenID Connect's ID Token (JWT), the modern standard following Implicit Flow's deprecation under RFC 9700, and DB design for social login.
Chapter 17: Real-World Case Studies — Comprehensive Exercises in Product Delivery Management and Task Management
Through two comprehensive case studies — a "product delivery management system" and a "task management system" — this chapter practices the full flow of requirements → ER diagram → table definitions → expected queries, integrating the concepts learned across earlier chapters as the capstone of this guide.
Chapter 18: Database Normalization Exercises
A collection of exercises to deepen the understanding of normalization covered in Chapter 11. Practice decomposing an unnormalized table up through third normal form, repeatedly, using common business cases (children's information, multiple categories, derived values, employee information).
Chapter 19: Introduction to Index Design — How to Place Indexes That Speed Up Search, and the Pitfalls
This chapter covers, for junior engineers and focused narrowly on design-time decisions, how an index speeds up search (the intuition behind B-Trees), which columns to index (WHERE / JOIN / ORDER BY), composite-index column order, partial indexes, how to read EXPLAIN, the harm of over-indexing, and compatibility with UUID primary keys.
Chapter 2: The Relationship Between a System and Its Database — The DBMS as Interpreter
This chapter explains, for junior engineers, where a database sits within the three-tier structure of a web system (user / application / data) and the role of the DBMS that connects the application to the database.
Chapter 3: The Importance of Database Design — Why Build It Carefully From the Start
This chapter explains why database design plays a role like a building's foundation, the qualitative reasons it's hard to fix later (you can't stop a live service, data-migration costs, the breadth of impact), and why data-design skills remain valuable even in the AI era.
Chapter 4: CRUD and ACID — Mechanisms for Safely Getting Data In and Out
This chapter explains the four basic database operations (CRUD), and the transactions and ACID properties (atomicity, consistency, isolation, durability) that handle multiple operations as a unit, using examples like bank transfers.
Chapter 5: Introduction to Relational Databases — Why Handle Relationships With Tables
This chapter explains, for junior engineers, the basic concept of a relational database (RDB), the benefits and trade-offs of managing data as "multiple related tables" instead of "one giant table," and how to choose between RDB and NoSQL.
Chapter 6: DBMS and SQL — The Mechanism and Common Language for Operating Data
This chapter explains, for junior engineers, the role of a DBMS (SQL parsing, transaction management, permissions, optimization), the four categories of SQL (DDL/DML/DCL/TCL), and the characteristics and trade-offs of major RDBMS products (PostgreSQL / MySQL / SQLite / Oracle / SQL Server).
Chapter 7: Basic Terminology and Naming Conventions — Tables, Columns, Primary Keys, Foreign Keys
This chapter covers basic terms — table, column, record, primary key, foreign key, schema, index, view — and naming conventions that hold up as a global standard (plural table names, snake_case, Booleans prefixed with is_, and more), for junior engineers.
Chapter 8: Master Data and Transaction Data — Adapting Your Design to the Nature of the Data
This chapter explains, for junior engineers, the idea of classifying database data into "master data" (dictionary-like reference information) and "transaction data" (day-to-day history), and the design and operational differences between them.
Chapter 9: The Flow of System Design — Conceptual, Logical, and Physical Stages
This chapter explains, for junior engineers, where database design fits within the overall flow of system development, and how the conceptual, logical, and physical design stages move from abstract to concrete.
Design Template Collection — Introduction to Database Design
A collection of design templates and checklists that junior engineers can bring into real projects. It lists out naming conventions, normalization, key design, and review criteria, so you have something to check against right away on a new project.
Domain Model and Table Design — Mapping and Indexes
Covers why to design domain-model-first, mapping patterns under the premise that the domain model and tables are not 1:1 (embedding / one aggregate across multiple tables / technical splitting), how the repository absorbs the gap, and index design including the leftmost-prefix rule for composite indexes and its trade-offs.
Glossary — Introduction to Database Design
A quick-reference dictionary of the technical terms that appear throughout this guide. When you're reading a chapter and wondering "what was the definition of that term again?", check here for a quick answer.
Introduction to Database Design — Taking Junior Engineers to the Level Where They Can Design for Real Work
A practical guide for junior engineers just starting to design DB schemas for an API backend or a business application. Across 19 chapters plus a glossary and a design template collection — Part 1 Fundamentals → Part 2 Design → Part 3 Applied → Part 4 Practice — you'll learn to go from requirements through ER diagrams and table definitions to SQL, by reading straight through.
RDS: Design Decisions for Managed PostgreSQL and Completing the Security Group Chain
This chapter organizes the operational tasks RDS handles as a managed service versus the design decisions Tasuku owns, covering instance class, storage, and Multi-AZ selection, master password integration with Secrets Manager, and completing the security group chain. It closes with a connectivity check using run-task and psql.
Transaction Management — Where to Place the Consistency Boundary
Explains transaction management using Laravel's DB::transaction(). Covers the ACID properties, when to place transactions inside the Repository (single aggregate) versus the UseCase (multiple aggregates), nested transactions (savepoints), and the implementation and use cases of optimistic and pessimistic locking.