PHP and MySQL
MySQL and SQLPHP and MySQL - MySQL and SQL
MySQL and SQL
Database Basics
Introducing Relational Databases
Terminology
Quick Start Guide
Loading the Winestore Database
The Winestore Database
The winestore entity-relationship model
Creating the winestore with SQL
MySQL Command Interpreter
Managing Databases, Tables, and Indexes
Creating Databases
Creating Tables
Altering Tables and Indexes
Displaying Database Structure with SHOW
Inserting, Updating, and Deleting Data
Inserting Data
Bulk loading into a database
Transferring data between databases and DBMSs
Deleting Data
Updating Data
Querying with SQL SELECT
Basic Querying
WHERE Clauses
Sorting and Grouping Output
Limiting Result Sets in MySQL
Join Queries
Beware of the Cartesian Product
Elementary Natural Joins
Table aliases in SQL queries
Using DISTINCT in joins
Joins with More than Two Tables
Modifying the Database
Adding a New Wine to the Winestore
3.8.2Buying a Bottle of Wine from the Winestore
INSERTing with a SELECT Statement
Functions
Arithmetic and comparison operators
String-comparison operators and functions
Mathematical functions
Date and time functions
Miscellaneous operators and functions
More on SQL and MySQL
Keys, Primary Keys, and Indexes
Tuning the Database System
Adding and Deleting Users
Permissions
Limitations of MySQL
In this tutorial, we cover the following topics:
- A short introduction to relational databases and relational modeling
- A quick start guide to the winestore database and its full entity-relationship model
- The MySQL command interpreter and the basic features of MySQL
- Using SQL to create and modify databases, tables, and indexes
- Using SQL to insert, delete, and update data
- The SQL SELECT statement for querying, with examples of simple and advanced queries
- Functions and operators in SQL and MySQL
- Advanced features, including managing indexes and keys, tuning the MySQL DBMS, security, and the limitations of MySQL