SOLID STATE PRESS
← Back to catalog
Relational Databases (SQL) cover
Coming soon
Coming soon to Amazon
This title is in our publishing queue.
Browse available titles
Computer Science

Relational Databases (SQL)

Primary Keys, Foreign Keys, Normalization, and SQL Joins — A TLDR Primer

Relational databases power nearly every app, website, and system you use — but when your computer science class or data course finally gets to SQL, the concepts can feel like they landed from another planet. Primary keys, foreign keys, normalization, joins: the terms pile up fast, and most textbooks bury the core ideas under pages of theory before you ever write a query.

This TLDR primer cuts straight to what you need. It covers how tables, rows, and columns organize real data; how primary and foreign keys link tables without duplicating information; and how normalization rules (1NF, 2NF, 3NF) keep a database clean and maintainable. From there it walks through SQL syntax — SELECT, WHERE, ORDER BY, and aggregate functions — and then shows how INNER JOIN and LEFT JOIN pull data from multiple tables together, with worked examples at every step.

Written for high school and early college students tackling a database unit, a CS elective, or an intro data course, the guide is short by design. No filler, no detours — just the relational database concepts for beginners that actually show up on tests and in real projects. Parents helping a student through an assignment and tutors prepping a session will find it equally useful.

If you want to walk into your next SQL quiz or database design project with a clear mental model and the vocabulary to match, this guide gets you there. Grab it and get oriented today.

What you'll learn
  • Explain what a relational database is and how it differs from a spreadsheet
  • Design simple tables with appropriate primary and foreign keys
  • Read and write basic SQL queries using SELECT, WHERE, JOIN, GROUP BY, and ORDER BY
  • Recognize when data should be split across multiple tables (normalization basics)
  • Understand how relational databases are used in real applications and why they remain dominant
What's inside
  1. 1. What Is a Relational Database?
    Defines relational databases, contrasts them with spreadsheets and flat files, and introduces the core vocabulary of tables, rows, and columns.
  2. 2. Tables, Keys, and Relationships
    Explains how primary and foreign keys link tables together to model real-world relationships without duplicating data.
  3. 3. Designing Good Tables: Normalization Basics
    Walks through why we split data across tables, using first, second, and third normal form as practical design rules.
  4. 4. SQL Basics: Asking Questions of Your Data
    Introduces SQL syntax for querying single tables with SELECT, WHERE, ORDER BY, and basic aggregate functions.
  5. 5. Joining Tables: Putting It All Together
    Shows how INNER JOIN and LEFT JOIN combine data across tables, with worked examples and common pitfalls.
  6. 6. Where Relational Databases Live in the Real World
    Surveys how relational databases power web apps, finance, and science, and briefly contrasts them with NoSQL alternatives.
Published by Solid State Press
Relational Databases (SQL) cover
TLDR STUDY GUIDES

Relational Databases (SQL)

Primary Keys, Foreign Keys, Normalization, and SQL Joins — A TLDR Primer
Solid State Press

Contents

  1. 1 What Is a Relational Database?
  2. 2 Tables, Keys, and Relationships
  3. 3 Designing Good Tables: Normalization Basics
  4. 4 SQL Basics: Asking Questions of Your Data
  5. 5 Joining Tables: Putting It All Together
  6. 6 Where Relational Databases Live in the Real World
Chapter 1

What Is a Relational Database?

Imagine you need to keep track of every student at a school — their names, grades, which classes they're enrolled in, and which teachers run those classes. You could open a spreadsheet and start typing. That works for a weekend project. It breaks down fast when 3,000 students enroll, two teachers share a classroom, and someone needs to ask "which students in 10th grade are failing a class taught by a teacher hired after 2018?" A database is a structured collection of data designed so that questions like that one are fast, reliable, and repeatable.

More specifically, a relational database organizes data into a set of linked tables — and it enforces rules about how those tables relate to each other. "Relational" does not mean the tables are friendly with each other. It comes from mathematics: in 1970, a computer scientist at IBM named Edgar Codd published a landmark paper proposing that data should be stored in mathematical structures called relations — what we now call tables. Codd's insight was that if you store data in a disciplined, tabular form and give users a precise language to query it, you get flexibility and correctness that ad hoc file storage can never match. Nearly every major database system in use today — MySQL, PostgreSQL, SQLite, Oracle, Microsoft SQL Server — descends from Codd's model.

The software that sits between you and the raw data is called a database management system, or DBMS. The DBMS handles storing data on disk, enforcing rules, handling multiple users at the same time, and recovering from crashes. When people say "I set up a MySQL database," they usually mean they installed a DBMS (MySQL) and created a database inside it.

Tables, rows, and columns

A table is the fundamental building block. Think of it like a spreadsheet tab, but with stricter rules. Each table represents one kind of thing — students, teachers, courses, orders, products. A table is made up of columns (also called fields), which define what kind of data you're storing, and rows (also called records), which are the actual data entries.

About This Book

If you're looking for an intro to relational databases for beginners — whether you're a high school student in an AP Computer Science Principles course, a college freshman in CS101, or someone self-studying before a coding bootcamp — this book is for you. It's also useful for tutors prepping a session or parents helping a student through a database design unit.

This is a database design primer for college freshmen and advanced high school students who need to understand tables and keys in databases, write basic SQL queries for a computer science class, and grasp normalization without wading through a textbook. It covers primary keys, foreign keys, table relationships, normal forms, and SQL joins — the core vocabulary any beginner SQL study guide should hit. Short by design, no filler.

Read straight through once to get the lay of the land. Then work through the worked examples as you go. When you finish, attempt the practice problems at the end to make sure the concepts actually stuck.

Keep reading

You've read the first half of Chapter 1. The complete book covers 6 chapters in roughly fifteen pages — readable in one sitting.

Coming soon to Amazon