Chapter 11. Introducing Databases and MySQL

Databases and PHP go together like cake and ice cream, Trinidad and Tobago, green eggs and ham — you get the picture.

After all, what's the Web about? Making vast stores of information available to a more or less wide public, that's what. Not that there aren't small brochureware sites galore, but the bigger and more frequently updated the data source, the more comparative value is provided by the Web over other media.

Perhaps the single greatest advantage of PHP over similar products is the unsurpassed choice and ease of database connectivity it offers. As detailed in the "Choosing a Database" section of this chapter, PHP supports native connections to a number of the most popular database server types, open source and commercial alike. Almost any database that will open its application programming interface (API) to the public seems to be included eventually. For any unsupported databases, there's generic ODBC (Open Database Connectivity) support.

What Is a Database?

A database is a collection of data. The term database usually indicates that the collection of data is stored on a computer. Regardless, it's the databases that are on computers that I'll concentrate on in this book.

Databases implemented through a computer are created within software. That software, commonly known as a database application, controls how the actual data is stored and retrieved. Some database ...

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.