The SQL shown in Chapter 5 was sufficient for the scripts in earlier chapters and for the winestore application that’s described in the next five chapters. However, SQL is extremely powerful and provides many other capabilities, some of which we’ll cover in this chapter. Examples of these useful features include advanced join types, nested queries, and aliases.
Many of the features shown in this chapter are specific to MySQL’s version of SQL. For example, MySQL’s functions are useful tools for working with strings, dates and times, and math. Also, we’ll show some ways to tune MySQL in order to improve application performance. It’s important to know how to choose and design indexes for fast querying, and how to use MySQL’s query cache for fast results.
We cover the following topics in this chapter:
Exploring your database, tables, indexes, and performance with
including advanced join types, aliases, nested queries, user
variables, and the limitations of MySQL
More on manipulating data and databases, including finding out
about tables and databases, creating tables with queries, altering
tables, more on the
DELETE statements, and bulk loading
and exporting data
Functions and operators in SQL and MySQL
Automatically running queries
MyISAM, InnoDB, and Heap table types
Backup and recovery, and transferring data between database servers
Managing database server users and privileges, and creating users for web database applications ...