Chapter 5. Basic SQL
SQL, short for Structured Query Language (although this is sometimes debated), is a group of special words used exclusively for interacting with databases. Every major database uses SQL, and MySQL is no exception.
SQL was created shortly after E.F. Codd came up with the theory of a relational database (along with normalization). Decades later, in 1989, the American National Standards Institute (ANSI)the organization responsible for maintaining the languagereleased the first SQL standard, referred to now as SQL 89. SQL2 was released in 1992. In 1999, SQL 3 was released, although it has not been completely supported as yet. And in 2003, a new standard was defined, with increased XML support.
Using the accounting database created in Chapter 4, "Creating a MySQL Database," this chapter will discuss and demonstrate all of the major SQL terms. Since you must use SQL to communicate with MySQL, the remainder of the book will, in part, rely upon the information presented here. The entire chapter assumes that you have created the accounting database, per the instructions in the last chapter, and that you are logged in to the mysql client as a user with permission to interact with that database.