Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Kerem Koseoglu

Rating No ratings yet

Whether you're managing large datasets or writing your first query, build your SQL skills with this practical guide! Learn the basic elements of relational databases and walk through the syntax, features, and applications of SQL. Then dive into the sublanguages of SQL and apply them for tasks such as modifying tables and querying data. See SQL in action with an example PostgreSQL database and detailed code samples from real-word applications! Highlights: 1) Schemas 2) Tables 3) Views 4) Keys 5) PostgreSQL 6) Data definition language (DDL) 7) Data manipulation language (DML) 8) Transaction control language (TCL) 9) Data query language (DQL) 10) Data control language (DCL) 11) Entity-relationship diagrams (ERD)

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on tour of SQL through PostgreSQL that takes you from relational database fundamentals to writing real queries, tables, and transactions. Best for beginners and self-taught developers who want practical, example-driven grounding rather than theory. 【Book Arc】 - **Opening (~0%–10%)**: Orients you to relational databases—why they matter, where they're used, and how to choose a reading order. Solves the "what am I actually learning and why" question before syntax begins. - **Early (~10%–30%)**: Covers the basic elements of relational databases: data types, keys, normalization (1NF/2NF), roles and authorization, plus environment setup (PostgreSQL, pgAdmin, VS Code). Builds the conceptual and tooling foundation. - **Middle (~30%–50%)**: Data Definition Language (DDL)—creating, altering, and dropping databases, schemas, tables, views, and constraints. This is where you learn to shape the structure your data lives in. - **Late (~50%–80%)**: Data Manipulation Language (DML) and Data Query Language (DQL), worked through an extended example database (theater, events, ticket sales). Moves from defining structures to inserting, updating, and querying real data. - **Ending (~80%–100%)**: Transaction Control Language (TCL) and Data Control Language (DCL), plus the ERD appendix. Excerpts do not cover the closing chapters in detail, so the exact final sequence is uncertain. 【Key Takeaways】 - **Relational databases remain a solid career investment** (Early): SQL is an industry-standard skill applicable across ERPs, finance, healthcare, telecom, and social platforms—learning it pays off broadly. - **Normalization is taught through worked examples** (Early): 1NF removes repeating groups, 2NF eliminates redundancy by splitting tables—concrete driver/car tables make the abstract rules tangible. - **Roles simplify authorization at scale** (Early): Instead of per-user permissions, roles group privileges (finance_role, sales_role, dev_role) that users inherit, so onboarding is a one-step assignment. - **DDL syntax is deliberately close to plain English** (Middle): Statements like ALTER DATABASE ... RENAME TO or ALTER TABLE ... ADD COLUMN read almost literally, lowering the barrier to memorization. - **Constraints enforce data integrity declaratively** (Middle): PRIMARY KEY, UNIQUE, and NOT NULL are added at creation or via ALTER TABLE ADD CONSTRAINT, including multicolumn keys. - **Views are managed with CREATE OR REPLACE** (Middle): This prefix lets the same statement work across environments, creating or updating a view idempotently. - **A single evolving example database ties everything together** (Late): The theater/event/ticket-sale schema grows chapter by chapter, so each new concept lands on familiar ground. - **ERD literacy is assumed and supported** (Early): Diagrams appear throughout; an appendix covers ERD symbols for readers who need a quick primer. 【Reading Tips】 - **Skim the setup chapter if you already have PostgreSQL running**; deep-read the normalization and constraint sections, which are the conceptual backbone. - **Follow along in pgAdmin or VS Code**—the book is built around executing statements, not just reading them. - **Jump straight to DQL if you only need querying skills**; the author explicitly endorses this shortcut for readers with prior database exposure. - **Read the ERD appendix early** if diagram symbols are unfamiliar, so later schema figures don't slow you down. - **Treat the theater/ticket example as a running case study**—revisit earlier tables when new ones are added to see how the schema evolves. 【Coverage Limits】 This guide is based on stratified excerpts covering roughly the first half of the book; the TCL, DCL, and closing chapters are only partially represented, so their specific content and ordering are inferred from the table of contents and highlights rather than confirmed in detail.
Page 8
atabase Manipulation ...................................................................................................... 100 4.1.1 Database Creation ........
View in text
Excerpt 2
binary content, such as bytea images, audio files, and PDFs Complex Columns with standardized content, such as xml, json, jsonb XMLs and JSONs User-defined C...
View in text
Excerpt 3
se The owner has unrestricted access to all database compo- nents, including tables and schemas. Access control The owner can grant authorization privileges...
View in text
Excerpt 4
us_pkey PRIMARY KEY (employee_id, bonus_year); Listing 4.64 SQL Statement to Set Primary Key of employee_bonus That’s very similar to providing the primary k...
View in text
Excerpt 5
stored procedure is a procedure without parameters. You can simply execute the procedure by its name and let it run to fulfill its task. Remember Listing 5.2...
View in text
Excerpt 6
, 7500.00, 'EUR'); -- Insert mock data into credit_card INSERT INTO credit_card (card_number, customer_id, card_network, expiration_day, cvv, card_limit, usa...
View in text
Excerpt 7
value, we’re talking about sorting them in ascending order. Listing 7.37 is a sample query in which all products will be listed and sorted by their price, wi...
View in text
Excerpt 8
eferrers The results of this query will be as in Table 7.75. Apparently, Alice Smith was the referrer for Charlie Brown and Diana Prince. id name referrer_id...
View in text
Tags
AI categories
DatabaseSQLProgramming Language
ISBN: 1493226797
Publisher: Rheinwerk Computing
Publish Year: 2025
Language: English
Pages: 492
File Format: PDF
File Size: 10.5 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…