Introduction
  • Introduction
Environment
  • Installing SQL and MySQL on Windows
  • Installing SQL and MySQL on Mac
Databases Theory
  • What are databases and database management systems (DBMS)?
  • The relational model
  • Data structures behind database servers
  • Procedural and non-procedural languages
  • Types of DBMS and database languages
  • Databases Theory Quiz
Table Manipulation
  • Data types
  • Creating databases
  • CODE - creating databases
  • Creating a table
  • CODE - creating database tables
  • Inserting into a table
  • Inserting multiple items in one statement
  • CODE - inserting into tables
  • Delete row from a table
  • CODE - delete row
  • Updating a row
  • CODE - updating rows
  • Changing table structure
  • CODE - change table structure
  • Drop tables
  • What are primary keys?
  • The auto increment feature
  • CODE - auto incremented primary keys
  • Enums
  • Booleans
  • Floating point numbers with decimals
  • Dates
  • Exercise
  • Solution
  • Chapter summary & source code
  • Table Manipulation Quiz
Basic SQL
  • SQL dump - the city and country tables
  • SELECT
  • WHERE
  • IN
  • BETWEEN
  • NOT - negation in SQL
  • Logical operators
  • Wildcards
  • Functions
  • ORDER BY
  • Code - order by
  • GROUP BY
  • CODE - group by
  • Exercise
  • Solution
  • HAVING
  • Chapter summary & source code
  • Basic SQL Quiz
Multiple Tables
  • What is a foreign key?
  • Foreign key example
  • CODE - foreign keys
  • How to handle changes when dealing with multiple tables?
  • Updating dependent tables example
  • CODE - updating tables
  • Exercise
  • Solution
  • Multiple Tables Quiz
Database Normalization
  • What is database normalization?
  • The first normal form
  • The second normal form
  • The third normal form
  • Database Normalization Quiz
Joining Multiple Tables
  • Configuring the database tables - PERSON and UNIVERSITY
  • Inner join introduction
  • Inner join example
  • CODE - inner join
  • Left join introduction
  • Left join example
  • CODE - left join
  • Right join introduction
  • Right join example
  • CODE - right join
  • JOIN example - number of cities
  • CODE - joining cities
  • Exercise
  • Solution
  • Online SQL console
  • JOIN example - customers and orders
  • JOIN example - number of orders by customers
  • JOIN example - number of orders by country
  • Chapter summary & source code
  • Joining Tables Quiz
Advanced SQL - Subqueries
  • What are subqueries?
  • Non-correlated scalar subquery
  • CODE - scalar subquery
  • Non-correlated multiple-row subquery