1 / 11
Learn to design relational databases from zero: tables and keys, ER diagrams, relationships, normalization (1NF to BCNF), constraints, joins, indexes, and security, with PostgreSQL examples throughout. 28 chapters, 4 appendices, 404 pages (PDF).
A Practical Guide to Modeling, Normalizing, and Building Relational Databases
Read before you buy: the PDF here is a free sample — the first 20 pages of the 404-page book (payments, sales and reviews on this demo site are sample data). Get the full e-book at thenexbooks on Gumroad.
Design databases that stay correct, fast, and easy to change — even if you have never written SQL.
Almost every app and business system keeps its information in a database. When the design is good, nobody notices. When it is poor, everyone feels it: duplicate customers, totals that disagree, impossible records, and changes that take weeks. Database design is a learnable skill, and this book teaches it from the very beginning, one clear step at a time.
What's inside
- What a relational database is, and how tables, rows, columns, and data types work
- Setting up PostgreSQL and a free database client, plus just enough SQL to build and query your design
- Primary keys, natural vs surrogate keys, and uniqueness
- Turning real requirements into entities and relationships, and drawing ER diagrams
- One-to-many, many-to-many, one-to-one, and self-referencing relationships with foreign keys
- Normalization explained simply: anomalies, 1NF, 2NF, 3NF, BCNF, and when to denormalize on purpose
- Constraints, ON DELETE rules, NULL handling, and everyday patterns for status, money, dates, addresses, and history
- Joins, reporting queries, indexes, views, transactions, and reading query plans
- Changing a live schema safely, roles and permissions, SQL injection, and protecting personal data
- Common anti-patterns and a design review checklist
One running example, start to finish. You design the database for Ovenly, a fictional three-shop bakery with online pre-orders, a loyalty program, suppliers, recipes, and staff shifts, replacing a messy spreadsheet with a clean relational design.
Written for beginners. No prior database or SQL knowledge needed. Every term is explained when it first appears, with sample-data tables, Tips, Notes, Warnings, practice exercises, and Key Takeaways in every chapter. Differences between PostgreSQL, MySQL, SQLite, and SQL Server are pointed out where they matter.
Format: PDF, 404 pages (A4), linked table of contents and bookmarks. English. First Edition, 2026. Published by thenexbooks.
Table of Contents
Part I — Database Foundations
- Ch 1 · What Is a Database? Data, Tables, and Why Design Matters
- Ch 2 · Setting Up: PostgreSQL, a Database Client, and Your First Database
- Ch 3 · Tables, Rows, Columns, and Choosing Data Types
- Ch 4 · SQL Basics for Designers: CREATE, INSERT, SELECT, UPDATE, and DELETE
- Ch 5 · Keys: Primary Keys, Natural and Surrogate Keys, and Uniqueness
Part II — Modeling Data
- Ch 6 · From Requirements to Data: Stories, Nouns, and Business Rules
- Ch 7 · Entity-Relationship Modeling: Entities, Attributes, and Relationships
- Ch 8 · One-to-Many Relationships and Foreign Keys
- Ch 9 · Many-to-Many Relationships and Junction Tables
- Ch 10 · One-to-One, Optional Relationships, and Self-References
Part III — Normalization
- Ch 11 · Why Normalize? Redundancy and Update Anomalies
- Ch 12 · First Normal Form: Atomic Values and No Repeating Groups
- Ch 13 · Second and Third Normal Form
- Ch 14 · Beyond Third Normal Form: BCNF and Knowing When to Stop
- Ch 15 · Denormalization: Deliberate Trade-offs
Part IV — Integrity and Patterns
- Ch 16 · Constraints: NOT NULL, UNIQUE, CHECK, and DEFAULT
- Ch 17 · Referential Integrity: ON DELETE, ON UPDATE, and Cascades
- Ch 18 · NULL, Missing Data, and Optional Values
- Ch 19 · Everyday Modeling Patterns: Lookup Tables, Status, Money, Dates, Addresses, and History
Part V — Querying and Performance
- Ch 20 · Joins: Reading Your Design Back
- Ch 21 · Aggregation and Reporting Queries
- Ch 22 · Indexes Explained
- Ch 23 · Views, Transactions, and Keeping Data Consistent
- Ch 24 · Designing for Performance: Query Plans and Common Mistakes
Part VI — Real-World Design
- Ch 25 · Changing a Schema Safely: Migrations and Versioning
- Ch 26 · Security Basics: Users, Roles, Permissions, and Sensitive Data
- Ch 27 · Design Review: Anti-Patterns and a Checklist
- Ch 28 · Case Study: Designing the Ovenly Database from Scratch
Appendices
A · SQL and Design Cheat Sheet
B · Templates and Data Type Reference
C · Design Review Checklist
D · Glossary
Book details
| Detail | |
|---|---|
| Pages | 404 |
| Format | PDF (A4) |
| Language | English |
| Level | Beginner |
| Edition | 1st Edition (2026) |
| Download on this site | Free sample, first 20 pages (PDF) |
| Publisher | thenexbooks |
Files you get
No reviews yet. Only buyers can review.
More from thenexbooks