MySQL Foundations: Databases, Tables, Keys & Basic Queries
Build and query a fictional coffee roaster's MySQL database: data types, CREATE TABLE, primary and foreign keys, AUTO_INCREMENT, INSERT/UPDATE/DELETE, SELECT with LIMIT, CONCAT, IFNULL, DATE_FORMAT, GROUP BY and joins, with every answer checked as you go.
- One-time payment
- Instant access right after payment
- Secure checkout with Stripe
About this course
In this beginner course you build and query the MySQL database of a fictional coffee roaster, one lab per lesson. You choose integer, DECIMAL, VARCHAR and date types and compute their ranges and sizes, read CREATE TABLE statements, and replay what primary keys, foreign keys, UNIQUE, DEFAULT and AUTO_INCREMENT do to real inserts. Then you work through INSERT, UPDATE, DELETE and TRUNCATE, SELECT with WHERE, ORDER BY and MySQL's LIMIT offset form, CONCAT, IFNULL and DATE_FORMAT, GROUP BY with HAVING, and joins. Every answer is checked as you go, the first lesson is free, and a final exam leads to your certificate.
Lessons
- MySQL Server, Databases and Your First SELECTFree
- Integer Types: Bytes, Ranges and UNSIGNED Locked
- DECIMAL for Money: Precision, Scale and Rounding Locked
- CHAR and VARCHAR: Text Columns and Their Size Locked
- DATE, DATETIME and TIMESTAMP Locked
- CREATE TABLE: Columns, Types and Row Size Locked
- PRIMARY KEY: One Unique Id per Row Locked
- AUTO_INCREMENT: How MySQL Numbers New Rows Locked
- FOREIGN KEY: Linking Orders to Customers Locked
- NOT NULL, DEFAULT and UNIQUE Locked
- INSERT: Adding Rows, Multi-Row VALUES and INSERT … SELECT Locked
- SELECT with WHERE, IN, BETWEEN and LIKE Locked
- ORDER BY and LIMIT: Top Lists and Paging Locked
- UPDATE: Rows Matched vs Rows Changed Locked
- DELETE and TRUNCATE: Removing Rows Safely Locked
- String Functions: CONCAT, LPAD, LENGTH vs CHAR_LENGTH Locked
- NULL in Calculations: IFNULL and COALESCE Locked
- Date Functions: DATE_FORMAT, DAYOFWEEK and LAST_DAY Locked
- GROUP BY and HAVING: One Row per Category Locked
- JOIN and LEFT JOIN: Orders, Products and Customers Locked
- Final Project: The March Sales Report Locked