The SQL Programming Language

Book description


Ideal as a stand-alone primer or when used in conjunction with another introductory computer science text, SQL: The Programming Language will prepare students for core SQL programming courses offered in CS and CIS. With a clear, concise, and descriptive writing style, students will see real-world examples and cases of SQL functionality in database management. Screen shots and figures throughout the text allow readers to visualize important concepts discussed and student exercises urge them to explore problems on their own.

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Preface
  6. Chapter 1 - Relational Databases, Entities, Tables, and Primary Keys
    1. 1.1 - Relational Databases and Entities
    2. 1.2 - Entities, Attributes, Tables, Rows, and Columns
    3. 1.3 - Primary Keys and Entity Integrity
    4. 1.4 - Table Schema Notation
    5. 1.5 - The Text and Number Data Types
    6. 1.6 - The Currency Data Type
    7. 1.7 - The Date Data Type
    8. 1.8 - When is a Number Not a Number?
    9. 1.9 - More Complete Schema Notation
    10. 1.10 - The Definition of Null
    11. 1.11 - Data Integrity
  7. Chapter 2 - Entities and Relationships
    1. 2.1 - Foreign Keys and Relationships between Tables
    2. 2.2 - The One-to-Many Relationship and Entity Relationship Diagrams
    3. 2.3 - The One-to-One Relationship
    4. 2.4 - The Role-to-Actor Relationship: Not One-to-Many
    5. 2.5 - The Number of Entities Participating in Relationships
    6. 2.6 - The Referential Integrity Constraint
    7. 2.7 - The Many-to-Many Relationship
    8. 2.8 - The Example Database Expanded and Concatenated Primary Keys
    9. 2.9 - The Complete Example Database
    10. 2.10 - Data for the Example Database
  8. Chapter 3 - Queries in SQL
    1. 3.1 - What is SQL?
    2. 3.2 - Simple SQL Queries and the Keywords SELECT and FROM
    3. 3.3 - Projection
    4. 3.4 - Column Aliases and the Keyword AS
    5. 3.5 - Selection on Text Columns and the Keyword WHERE
    6. 3.6 - Selection on Number Columns
    7. 3.7 - Selection on Currency Columns
    8. 3.8 - Selection on Date Columns
    9. 3.9 - Selection with NULL, is, and NOT
    10. 3.10 - Queries with the Keyword LIKE
    11. 3.11 - The Logical Operators AND and OR
    12. 3.12 - Problem Queries
  9. Chapter 4 - Ordering, Calculating, and Grouping in Queries
    1. 4.1 - The Keyword DISTINCT
    2. 4.2 - The Keywords ORDER BY
    3. 4.3 - The Keywords ASC and DESC
    4. 4.4 - Ordering on More Than One Column
    5. 4.5 - Calculated Columns in Results
    6. 4.6 - The Date Functions YEAR, MONTH, and DAY
    7. 4.7 - The Built-In Function COUNT
    8. 4.8 - The Built-In Functions MAX, MIN, SUM, and AVG
    9. 4.9 - The Keywords GROUP BY
    10. 4.10 - GROUP BY and ORDER BY
    11. 4.11 - The Keyword HAVING
    12. 4.12 - Grouping by More Than One Column
    13. 4.13 - Problem Queries
  10. Chapter 5 - Complex Queries and Join Queries
    1. 5.1 - Selection Queries with DISTINCT
    2. 5.2 - Selection Queries with Calculated Columns and DISTINCT
    3. 5.3 - Selection Queries with GROUP BY
    4. 5.4 - The Join and Qualified Column Names
    5. 5.5 - The Join with Projection
    6. 5.6 - The Cartesian Product
    7. 5.7 - Joins with Additional WHERE Conditions
    8. 5.8 - Joins with ORDER BY
    9. 5.9 - Joins with GROUP BY and HAVING
    10. 5.10 - Three-Way and Multi-Way Joins
    11. 5.11 - Joins with Calculated Columns and Built-In Functions
    12. 5.12 - Subqueries
    13. 5.13 - Problem Queries
  11. Chapter 6 - Creating Tables and Entering Data
    1. 6.1 - Graphical User Interface Alternatives and SQL
    2. 6.2 - The Keywords CREATE TABLE
    3. 6.3 - Constraints and the Keywords CONSTRAINT, PRIMARY KEY, FOREIGN KEY, and REFERENCES
    4. 6.4 - The Keywords INSERT INTO, VALUES, UPDATE, SET, and DELETE FROM
  12. Annotated Bibliography of References for the Example Database
  13. Index

Product information

  • Title: The SQL Programming Language
  • Author(s): Kirk Scott
  • Release date: July 2009
  • Publisher(s): Jones & Bartlett Learning
  • ISBN: 9781449613211