liveBook · Manning

Chapter 7: Schema: A fossilized argument

What you will learn in chapter 7 of Crack Any Codebase with AI

This introduction frames the schema as the most stable map of an application's business data and previews four AI-assisted ways to turn it into a usable mental model.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction frames the schema as the most stable map of an application's business data and previews four AI-assisted ways to turn it into a usable mental model.

Key terms: schema, tables, foreign keys, enums, constraints, business rules, relationship diagram, core tables, composite indexes, migration folder

7.1 A schema is a tidy stack of spreadsheets

This section explains how schemas represent a system’s stored data and expose the product decisions, relationships, state rules, and performance priorities embedded in it.

Key terms: table, column, row, booking, schema, contract, ORM, Prisma, typed client, schema mismatch

7.2 A schema's shape changes with the kind of codebase

This section defines schema as a system’s stable data promises and shows that its concrete form depends on the kind and visibility of the codebase.

Key terms: schema, core promises, names and types, web app, library, CLI, data pipeline, database tables, core types, open-source

7.3 Find the schema file before you can read it

This section explains how to locate a codebase’s schema, recognize its structural form, and identify the central table that makes a large data model navigable.

Key terms: schema file, data model, master blueprint, ORM, Prisma, ActiveRecord, schema.prisma, db/schema.rb, db/migrate, declarative file

7.4 Ask the LLM to draw the schema and tour it

This section shows how to use an LLM to turn a flat schema into a product-centered tour and ERD, then read its normalization and tenant-isolation choices as evidence of business and operational decisions.

Key terms: schema tour, central table, product story, models, tables, Entity-Relationship Diagram, ERD, Mermaid erDiagram, one-to-one, one-to-many

7.5 Trace one user action across the tables

This section shows how to use an LLM to trace a real user action through database tables and external services, exposing runtime order, failure boundaries, retry risks, and asynchronous work.

Key terms: runtime trace, flows prompt, core tables, reads, writes, external services, static schema, runtime flow, Booking, Payment

7.6 Open one table and read its columns and indexes

This section shows how to inspect one schema table for product decisions in its meaningful columns, query patterns in its indexes, and scaling risks hidden by the schema.

Key terms: boilerplate, idempotencyKey, status enum, metadata, responses, creationSource, crawled schema, one-liner, table list, bold-headlined card

7.7 Mine the migration folder for the roadmap

This section shows how to turn migration history into a trustworthy, dated product roadmap while detecting misleading or incomplete history.

Key terms: live schema, migration folder, timestamped migrations, migration names, maintenance migrations, historical acts, product eras, opener migration, squashed migrations, bootstrap script

7.8 Summary

This summary presents schema analysis as a way to recover a system’s data contract, product flows, design decisions, and historical evolution from its durable data structures.

Where this is used later

Concepts explained in this chapter

← Chapter 6: Git history: The product's memory Chapter 8: Interfaces: Where the product's verbs live →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.