Chapter 0: Introduction to Databases and SQL (Pop Culture Overview)#
SQL and Database Management Through Pop Culture | Brendan Shea, PhD#
Welcome to SQL and Database Management Through Pop Culture — an open, hands-on textbook for learning database design, SQL, security, performance, and PostgreSQL. The book is built around twelve notebook-driven chapters that read cleanly on the web and run live in Google Colab, with no local install required.
What this book covers#
The twelve chapters move from foundations through applied database work:
Starship SQL — data, information, knowledge, and the major data models.
Intro to SQL: SELECT — filtering, sorting, and aggregate functions.
JOINs and Sets — combining tables across joins and set operations.
Advanced SELECT —
GROUP BY,HAVING, subqueries, and JSON inside SQL.Database Design — ER modeling, normalization, keys, and constraints.
Writing Data —
INSERT,UPDATE,DELETE, soft deletes, and triggers.Views and CTEs — reusable queries, data governance, and GDPR.
Indexes and Transactions — performance and ACID integrity.
Pokémon and PostgreSQL — moving from SQLite to a professional DBMS.
Database Security — encryption, access control, and network protection.
Architecture and Testing — design patterns, deployment models, and testing strategies.
Final Project — a capstone that pulls everything together.
Each chapter is followed by a matching review set in the Loop of the Recursive Dragon, an adaptive review game with multiple question types and RPG-style mechanics.
Aligned to the CompTIA DataSys+ exam#
The chapter sequence is aligned to the CompTIA DataSys+ (DS0-001) certification exam. The exam’s domains map to the book as follows:
Database Fundamentals — Chapters 1–4 cover relational concepts, SQL queries, joins, and aggregation.
Database Deployment — Chapters 5, 9, and 11 cover schema design, PostgreSQL deployment, and deployment models.
Database Management and Maintenance — Chapters 6–8 cover writing data, views and governance, and performance tuning.
Data and Database Security — Chapters 7 and 10 cover access control, encryption, masking, and network protection.
Business Continuity — Chapter 4 covers disaster recovery; Chapter 8 covers transactions; Chapter 11 covers testing and deployment patterns.
Working through every chapter, the chapter summaries, and the Loop of the Recursive Dragon review sets gives broad coverage of the DataSys+ objectives.
How this book was developed#
This textbook was developed in a hybrid process that combined significant human authorship and editing with help from generative AI tools across multiple model generations. The case studies, chapter structure, pedagogical decisions, technical accuracy, and final voice are the work of the author. AI tools were used as drafting and editing partners — to brainstorm pop-culture framings, draft initial passes of explanations, and suggest tightenings during copyediting. Every chapter has been read, revised, and signed off on by a human author.
License#
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build on the material.
Under the following terms:
Attribution — give appropriate credit, link to the license, and indicate if changes were made.
NonCommercial — do not use the material for commercial purposes.
The full legal text is at https://creativecommons.org/licenses/by-nc/4.0/legalcode.
How to use this book#
There are two ways to work through the material:
Read on the web. The published Jupyter Book at https://brendanpshea.github.io/database_sql/ works as a regular online textbook.
Run in Colab. Every chapter has an Open in Colab badge at the top. Clicking it launches the notebook in your browser, where you can run all the code and edit it freely.
Each chapter ends with the same closing scaffolding:
A Chapter Summary that lists what you should be able to do after working through the chapter.
A Practice with the Loop of the Recursive Dragon link for the chapter’s adaptive review set.
A Glossary of key terms.
Acknowledgments#
Development of this textbook was supported by grant funding from Minnesota State and Rochester Community and Technical College as part of their commitment to high-quality open educational resources.