Course Overview
By storing data in MySQL, one can easily and quickly, with the use of queries, retrieve valuable information, trends, summaries, statistics and insights from your company data.
Why use MySQL?
Retrieve data, simply, quickly and easily. Make sense of your data. MySQL is cost effective, (open source database), Secure and Cross-Platform, cost of maintenance is pretty low, and a favored option for small and medium sized companies.
Why learn MySQL?
Easy to use, Commonly used, In-demand skill.
Prerequisites
No existing knowledge on SQL is required. You should have basic computing knowledge. Familiarity with relational database concepts is helpful but not required.
Duration: 3 days
Maximum Group Size: 4 Delegates
Course Contents - Day 1
Session 1: Database Concepts
- What is a database?
- Database management systems
- Tables, rows and columns
- Indexes
- Primary keys
- Unique constraints and foreign keys
- Client-Server architecture
- Supported data types
- Storage engines and table types
- The Information_Schema and MySQL Databases
- Exercise: Using a MySQL Database
Session 2: Using the MySQL client
- What is the MySQL client?
- Getting started and Logging in
- Selecting a database
- Client commands
- Entering and executing SQL statements
- Retrieving previous commands
- Creating, editing and executing SQL files
- Redirecting output into a file
- Command line execution of MySQL Scripts
- Exercise: Using the MySQL Client
Session 3: Basic SELECT
- The SQL SELECT statement
- Case sensitivity
- Quotes
- Statement terminator
- Syntax conventions
- The select clause
- The FROM clause
- Conditions and the WHERE clause,
- Logical operators
- The ORDER BY clause
- Column aliases
- Arithmetic expressions
- Precedence of operators
- Exercises: Querying the sample database
Session 4: LIMIT, UNION and AGGERGATE Functions
- The LIMIT clause
- UNION
- UNION ALL
- Aggregate functions
- The GROUP BY clause
- Using Rollup with GROUP BY
- The HAVING clause
- Exercises: Using Limit, Union and Aggregate Functions
Course Content - Day 2
Session 5: Subqueries and Joins
- Subqueries
- Cartesian products
- Joins with original syntax
- Table aliases
- Natural joins
- Join using
- Join on
- Multi-table joins
- Exercises: Using Subqueries and Joins
Session 6: Numeric and Character Functions
- Function types
- Testing functions
- Numeric functions
- Character functions
- Exercise: Using Numeric and Character Functions
Session 7: DATE, TIME and Other functions
- Date and time column types
- Date and time formats
- The date format function
- Functions to return date time
- Functions to extract components from date time
- Date time arithmetic
- Miscellaneous functions
- Exercise: Using Date, Time and other functions
Course Contents: Day 3
Session 8: Databases and Tables
- Creating a database
- Selecting a database
- Creating tables
- Auto_increment
- Show create table
- Column operations
- Constraint operations
- Copying tables
- Renaming tables
- Changing engine for tables
- Dropping tables
- Temporary tables
- Exercises: Maintaining databases and tables
Session 9: Indexes and Views
- What is an index?
- Creating an index
- Reviewing indexes
- Dropping indexes
- What is a view?
- Creating views
- View restrictions
- Dropping views
- Exercise: Maintaining indexes and views
Session 10: Managing Data
- Inserting rows
- Replacing rows
- Updating rows
- Deleting rows
- The truncate statement
- The COMMIT and ROLLBACK commands
- Savepoints
- Implicit commits
- Exercise: Managing data
Session 11: Access Control
- Creating users
- Renaming users
- Dropping users
- Granting privileges
- Revoking privileges
- Exercise: Creating users, granting and revoking
Session 12: Import and Export
- Exporting using SQL
- Importing using SQL
- Exporting from the command line
- Importing from the command line
- Exercise: Export and import data