liveBook · Manning

Schema

As explained in Learn Docker in a Month of Lunches, Second Edition

A database schema is the formal definition of a database's tables, relationships, constraints, indexes, and other structural objects.

A database schema formally defines tables, relationships, constraints, indexes, and other structural objects. Treating that definition as a versioned artifact makes database changes repeatable. section 13.4

A practical schema workflow uses the following steps:

  • Build a DACPAC from SQL scripts or a database project. section 13.4
  • Deploy the DACPAC to an empty SQL Server instance to create the database. section 13.4
  • Deploy it to an existing server to upgrade the current schema. section 13.4
  • Run the same tested artifact in disposable development containers and production deployment workflows. section 13.4

Containerized schema deployment

A multi-stage Docker build compiles a database project into NerdDinner.dacpac, copies it into a SQL Server image, and runs initialize.ps1 to install or update the database. section 13.4

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Defines schema deployment through DACPAC creation and application, but does not detail individual database objects or migration internals.
Examples
Uses a multi-stage Dockerfile, a NerdDinner DACPAC, initialize.ps1, and SQL Server containers.
What it assumes
Assumes familiarity with SQL Server, Docker images, database projects, and deployment commands.
What you can do after
Apply it via DACPAC and Docker to create or upgrade SQL Server databases consistently.
How it connects
Connects database schema with DACPAC, SQL Server, Docker, database containers, and CI/CD.

Also explained in

Compare how 44 books explain schema →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.