Skip to content

SQL And Databases Textbook

A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 50 companion flashcards using spaced repetition.

8 chapters · 50 cards · Updated

Chapters

  1. 1Database Fundamentals and SQL

    A database is an organized collection of structured data stored and accessed electronically from a computer system. To work with this data efficiently, applications rely on a Datab...

  2. 2Tables, Keys, and Data Types

    Inside a relational database, the table is the primary unit of structured storage. A table is composed of rows, which are individual records, and columns, which are named attribute...

  3. 3Defining Database Structure with DDL

    Data Definition Language, or DDL, is the part of SQL used to define and manage the structure of a database, including tables, indexes, and views. The three commands at the heart of...

  4. 4Querying and Modifying Data with DML

    Data Manipulation Language, or DML, is the part of SQL used to read and change the data stored in tables. Its four main commands are SELECT for reading, INSERT for adding new rows,...

  5. 5Aggregates, Joins, and Subqueries

    SQL is not limited to reading individual rows. Aggregate functions such as COUNT(), SUM(), AVG(), MAX(), and MIN() perform calculations across sets of rows, producing summary value...

  6. 6Indexes, Views, and Advanced Features

    As tables grow, raw scans become expensive, and indexes are the primary tool for speeding up lookups. An index is a data structure, much like the index at the back of a book, that...

  7. 7Transactions, ACID, and Normalization

    A transaction is a unit of work that takes the database from one consistent state to another, and it must satisfy the ACID properties. Atomicity guarantees that all of the operatio...

  8. 8SQL versus NoSQL and Database Security

    The choice between SQL and NoSQL databases depends on the shape of the data and the demands of the application. SQL databases are relational and use a fixed schema, making them ide...

← Back to the SQL And Databases deck