Your Cart
Loading

SQL & Databases — Complete A-to-Z, Taught End to End

On Sale
$12.99
$12.99
Added to cart

SQL & Databases — Complete A-to-Z, Taught End to End

What this book teaches. The whole craft of SQL and relational databases — taught A to Z in one volume, from the first query to professional practice, on one small corner-store dataset you can hold in mind and check by hand. The foundations come first: what databases are and why they exist, the relational model, setting up SQLite and making first contact with a real database file, and tables, rows, columns, data types, type affinity, and NULL. Then real questioning: reading data with SELECT, FROM, and WHERE; sorting, limiting, distinct results, aliases, and computed columns; summaries with aggregation, GROUP BY, HAVING, scalar functions, and CASE; joining tables, including the LEFT JOIN rows that have no match; subqueries and set operations with common table expressions; and changing data safely with INSERT, UPDATE, DELETE, transactions, and RETURNING. The middle of the book builds structures worth querying: primary and foreign keys, constraints, and referential integrity; normalization and schema design, with a full walkthrough that decomposes a flat table into the four canonical tables; indexes and how queries find rows; and views and saved queries. The advanced stretch adds window functions for ranking and running totals, transactions, concurrency, and locking, reading EXPLAIN QUERY PLAN output to fix slow queries, and real-world data — dates, text, JSON, and three-valued logic. The book closes with professional practice: how applications talk to databases, parameterized queries as the one unbreakable rule, how SQL injection works and is stopped, administration essentials — users, roles, backup and restore, migrations, and maintenance — and writing SQL other people can read, ending with a capstone that builds the corner-store database end to end. Every SQL example in the book is correct, executable SQLite as written, or is plainly labeled in the text as a dialect note for another engine, and every computed result is derived from the book's canonical dataset so you can verify it yourself.


Who it is for. The complete beginner who has never written a query and wants the whole subject taught in the order the craft itself builds; the self-taught data worker whose SQL works but has gaps — keys, normalization, indexes, window functions, transactions — and who wants them closed in one connected course; and the working professional who needs SQL and database design taught whole and honestly, with correct, safe queries as the standard from the first chapter to the last.

What's inside (every count verified against the actual book):



Complete course — 20 chapters, the first query to professional practice

340 practice questions — every answer explained, right and wrong



40-question diagnostic — know where you stand before you start

240 chapter questions — a 12-question check closes every chapter



60-question final review — sampling the whole craft of SQL

40 labeled figures — the relational idea, the B-tree shape, the running total and the capstone map, two in every chapter



150-term glossary · 8 cheat sheets · 3 study plans — Plan A, the four-week steady plan; Plan B, the two-week intensive; and Plan C, the weekend refresher

Six worked examples derived step by step from the book's stated dataset so you can check every result yourself — order aggregation, customers per city, the five-row join listing, the window running total, the normalization walkthrough, and reading a query plan before and after an index



Every one of the 340 questions is original, written for this book, and every explained answer tells you why the right answer is right and why each wrong answer is wrong. The book's facts rest on verified sources, listed in a Sources & Verification Note at the back of the book: the official SQLite documentation, the PostgreSQL documentation and versioning policy, the SQL standard (ISO/IEC 9075), Codd's 1970 relational-model paper, and the OWASP SQL injection prevention guidance. This book contains no invented statistics and no prices, salaries, or market figures anywhere — every number in its pages is either a documented fact about SQL and its engines or a stated given inside a worked example or a practice question whose result was verified by executing the query.

Read the first chapter free — the sample on this page is Chapter 1 of this book, exactly as it appears in the full edition.



From the Mastering Careers & Skills library — complete A-to-Z professional teaching books for careers, trades, and certifications.

This book is an independent teaching work, and no credential comes from this book: this book does not itself confer a certificate, a qualification, or a certification.



Refunds: Please read the free sample chapter before you buy. This is a digital ebook, delivered instantly by download. If the file is defective, or you cannot open or download it and we cannot fix the problem, you will receive a full refund — email us within 14 days of purchase. Because the book is delivered instantly as a downloadable file, all other sales are final.

How to read this book (EPUB format): After checkout, download the EPUB file, then open it in any free ebook reader app. On iPhone or iPad: Apple Books — it is already on your device. On Android phones and tablets: Google Play Books (free: https://play.google.com/store/apps/details?id=com.google.android.apps.books) — upload the file in the app — or ReadEra (free). On a Windows or Mac computer: Thorium Reader (free: https://thorium.edrlab.org) or Adobe Digital Editions (free). On Kindle: use Amazon's free Send to Kindle (https://www.amazon.com/sendtokindle) to add the file to your Kindle library.



You will get a EPUB (654KB) file