Chapter 13. Learning Structured Query Language (SQL)

This chapter is a basic introduction to SQL databases in which we discuss standards, database design, Data Manipulation Language, Data Definition Language, and database security procedures common to all SQL databases.

Note

This chapter is in no way a comprehensive guide to SQL or to any particular SQL database. To go beyond the simplest common features, you will need to consult your particular manufacturer's documentation or specific books. You will also want to look at documentation and books relating to your specific SQL database.

Relational Databases and SQL

SQL is the language of relational databases. A simple query like a one-table SELECT will be more or less the same whether you're using a tiny database like mSQL or an expensive behemoth like Oracle.

The big advantage for you, the web developer, is that, after you learn SQL, you will be able to interact with numerous databases across all platforms without a steep retraining curve. Just imagine how horrible life would be if Oracle, MySQL, and SQL Server all had entirely different sets of commands for putting data in and getting data out of their stores — as if Oracle used SELECT to ask for data sets, MySQL used VALJ (the developers are Swedish, you know), and SQL Server used FIND IT IN THIS TABLE (to better match the vocabulary of Windows). SQL is the common vocabulary ...

Get PHP6 and MySQL® 6 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.