Books / Computer Science / Designing Data-Intensive Applications

Cover of Designing Data-Intensive Applications

Designing Data-Intensive Applications

★★★★★ 5.0 (1 review)

₺1450.00 Only 12 left

Order this book

Log in to order this book or to write a review.

Log in to order
  • In stock: 12 copies
  • Sold by Book Store
  • ISBN: 9781449373320

Highlights

Pages
616
Language
English
Published
2017

Details Reviews (1)

About Designing Data-Intensive Applications

Title
Designing Data-Intensive Applications
Author
Martin Kleppmann
Publisher
O'Reilly Media
Category
Computer Science
Language
English
Pages
616
Published
2017
ISBN
9781449373320

Reviews

5.0 ★★★★★ 1 review
5 ★ 1
4 ★ 0
3 ★ 0
2 ★ 0
1 ★ 0

Ayşe Yılmaz ★★★★★ 5/5 2026-10-18

The best book about how databases really work.

SQL behind this page 6 statements

This page was built with 6 statements

  1. SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Builds: the book itself: cover, title, publisher, price, stock, the highlights and the details grid.

    %s values, in order: 8

    Show on the page
    Picture

    The page as it is now. Red: what this statement builds.

    Step by step
    SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Step 1 of 5

    SELECT

    Chooses the columns (or computed values) that the result shows.

    Back
    SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Step 2 of 5

    FROM

    The table the rows come from.

    SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Step 3 of 5

    JOIN

    Adds the matching row of another table; the ON part says which columns must be equal.

    SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Step 4 of 5

    JOIN

    Adds the matching row of another table; the ON part says which columns must be equal.

    SELECT b.*, c.name AS category, p.name AS publisher
    FROM book b
    JOIN category c  ON c.category_id  = b.category_id
    JOIN publisher p ON p.publisher_id = b.publisher_id
    WHERE b.book_id = %s

    Step 5 of 5

    WHERE

    Keeps only the rows for which the condition is true; AND and OR combine several conditions. Each %s stands for a value (for example one typed in a form) that is sent separately from the SQL text, which is why text typed in a form cannot change the query.

    Back to this SQL statement
  2. SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Builds: the author names: the Author line under the title and the Author row of the details.

    %s values, in order: 8

    Show on the page
    Picture

    The page as it is now. Red: what this statement builds.

    Step by step
    SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Step 1 of 5

    SELECT

    Chooses the columns (or computed values) that the result shows.

    Back
    SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Step 2 of 5

    FROM

    The table the rows come from.

    SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Step 3 of 5

    JOIN

    Adds the matching row of another table; the ON part says which columns must be equal.

    SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Step 4 of 5

    WHERE

    Keeps only the rows for which the condition is true; AND and OR combine several conditions. Each %s stands for a value (for example one typed in a form) that is sent separately from the SQL text, which is why text typed in a form cannot change the query.

    SELECT a.first_name, a.last_name, a.nationality
    FROM author a
    JOIN book_author ba ON ba.author_id = a.author_id
    WHERE ba.book_id = %s
    ORDER BY a.last_name

    Step 5 of 5

    ORDER BY

    Sorts the result by these columns, from the smallest to the largest (A to Z) unless DESC is written.

    Back to this SQL statement
  3. SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Builds: the reviews with their rating summary, the stars and count under the title, and the number on the Reviews tab.

    %s values, in order: 8

    Show on the page
    Picture

    The page as it is now. Red: what this statement builds.

    Step by step
    SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Step 1 of 5

    SELECT

    Chooses the columns (or computed values) that the result shows.

    Back
    SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Step 2 of 5

    FROM

    The table the rows come from.

    SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Step 3 of 5

    JOIN

    Adds the matching row of another table; the ON part says which columns must be equal.

    SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Step 4 of 5

    WHERE

    Keeps only the rows for which the condition is true; AND and OR combine several conditions. Each %s stands for a value (for example one typed in a form) that is sent separately from the SQL text, which is why text typed in a form cannot change the query.

    SELECT r.review_id, r.user_id, r.rating, r.comment, r.review_date, u.full_name
    FROM review r
    JOIN user_account u ON u.user_id = r.user_id
    WHERE r.book_id = %s
    ORDER BY r.review_date DESC

    Step 5 of 5

    ORDER BY

    Sorts the result by these columns, from the smallest to the largest (A to Z) unless DESC is written.

    Back to this SQL statement
  4. SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Builds: the category links: in the menu row and the footer, and on a book list the category band or the side list with the number of books.

    Show on the page
    Picture

    The page as it is now. Red: what this statement builds.

    Step by step
    SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Step 1 of 5

    SELECT

    Chooses the columns (or computed values) that the result shows. Here COUNT counts rows.

    Back
    SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Step 2 of 5

    FROM

    The table the rows come from.

    SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Step 3 of 5

    LEFT JOIN

    Like JOIN, but a row is kept even when the other table has no match (then its columns are empty).

    SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Step 4 of 5

    GROUP BY

    Puts the rows with the same values into one group, so COUNT, SUM or AVG give one result per group.

    SELECT c.category_id, c.name, COUNT(b.book_id) AS book_count
    FROM category c
    LEFT JOIN book b ON b.category_id = c.category_id
    GROUP BY c.category_id, c.name
    ORDER BY c.name

    Step 5 of 5

    ORDER BY

    Sorts the result by these columns, from the smallest to the largest (A to Z) unless DESC is written.

    Back to this SQL statement