SQL for Administrators

 

Course Overview

This SQL training course is designed for candidates new to writing SQL queries using MySQL running on a Linux or Ms Windows 7 Platform. The SQL learned in this course is standard to all modern databases, but MySQL will be used in class tutorials. Any syntax and functionality specific to MySQL will be pointed out.

Course Goals

  • Understand how SQL works
  • Learn to use SQL to output reports with MySQL
  • Learn to modify MySQL data with SQL
  • Learn to create a simple MySQL database
  • Learn to create simple work with Views and Stored Procedures in SQL
  • Learn to create tables in SQL

Course Outline

  1. Relational Database Basics
    1. Brief History of SQL
    2. Relational Databases
      1. Tables
      2. Rows
      3. Columns
      4. Relationships
      5. Datatypes
      6. Primary Keys
      7. Foreign Keys
      8. Relational Database Management System
    3. Popular Databases
      1. Commercial Databases
      2. Popular Open Source Databases
      3. Valid Object References
    4. SQL Statements
      1. Database Manipulation Language (DML)
      2. Database Definition Language (DDL)
      3. Database Control Language (DCL)
  2. Simple SELECTs
    1. Introduction to the Northwind Database
    2. Some Basics
      1. Comments
      2. Whitespace and Semi-colons
      3. Case Sensitivity
    3. SELECTing All Columns in All Rows
    4. Exploring the Tables
    5. SELECTing Specific Columns

Sorting Records

      1. Sorting By a Single Column
      2. Sorting By Multiple Columns
      3. Sorting By Column Position
      4. Ascending and Descending Sorts
    1. The WHERE Clause and Operator Symbols
      1. Checking for Equality
      2. Checking for Inequality
      3. Checking for Greater or Less Than
      4. Checking for NULL
      5. WHERE and ORDER BY
    2. Using the WHERE clause to check for equality or inequality
    3. Using the WHERE clause to check for greater or less than
    4. Checking for NULL
    5. Using WHERE and ORDER BY Together
    6. The WHERE Clause and Operator Words
      1. The BETWEEN Operator
      2. The IN Operator
      3. The LIKE Operator
      4. The NOT Operator
    7. More SELECTs with WHERE
    8. Checking Multiple Conditions
      1. AND
      2. OR
      3. Order of Evaluation
    9. Writing SELECTs with Multiple Conditions
  1. Advanced SELECTs
    1. Calculated Fields
      1. Concatenation
      2. Mathematical Calculations
      3. Aliases
    2. Calculating Fields
    3. Aggregate Functions and Grouping
      1. Aggregate Functions
      2. Grouping Data
      3. Selecting Distinct Records
    4. Working with Aggregate Functions
    5. Built-in Data Manipulation Functions
      1. Common Math Functions
      2. Common String Functions
      3. Common Date Functions
    6. Data Manipulation Functions

  2. Subqueries, Joins and Unions
    1. Subqueries
    2. Joins
      1. Table Aliases
      2. Multi-table Joins
    3. Using Joins
    4. Outer Joins
    5. Unions
      1. UNION ALL
      2. UNION Rules
    6. Working with Unions
  3. Conditional Processing with CASE
    1. Working with CASE
  4. Inserting, Updating and Deleting Records
    1. INSERT
    2. UPDATE
    3. DELETE
  5. Creating and Modifying Tables
    1. Data Types
    2. Creating Tables
      1. NULL Values
      2. Primary Keys
      3. Foreign Keys
    3. Adding and Dropping Columns
    4. Renaming Tables
      1. SQL Server
      2. Oracle and MySQL
    5. Dropping Tables
  6. Views
    1. Creating Views
    2. Dropping Views
    3. Benefits of Views
    4. Creating a View
  7. Stored Procedures
    1. Creating Stored Procedures
    2. Dropping Stored Procedures
    3. Creating a Stored Procedure
    4. Benefits of Stored Procedures