Chapter 4. Introduction to SQL and MySQL


This chapter is a departure from its predecessors in that I'll be temporarily leaving PHP behind to delve into SQL and MySQL. Because this book discusses how to integrate two different technologies (PHP and MySQL), a solid understanding of each individually is important before you begin writing PHP scripts that use SQL and interact with MySQL.

SQL, short for Structured Query Language, 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 Dr. E.F. Codd came up with the theory of relational databases in the early 1970s. In 1989, the American National Standards Institutethe organization responsible for maintaining the languagereleased the first SQL standard, referred to now as SQL89. SQL2 was released in 1992 and is still the current, working version (also called SQL92 or just plain SQL).

MySQL is the world's most popular open source database application (according to MySQL's Web site, www.mysql.com) and is commonly used with PHP. The MySQL software comes with the database server, different client applications, and several utilities. This chapter and the next will demonstrate how to use SQL and MySQL to store and retrieve data. Chapter 7, "Using PHP with MySQL," will then apply this same information to PHP scripts.

This chapter assumes you have access to a running MySQL server. If you are working on your own computer, see Appendix A, "Installation," for installation, user-creation, and starting MySQL instructions. If you are using a hosted server, your Web host should provide you with the database access.



    PHP and MySQL for Dynamic Web Sites. Visual QuickPro Guide
    PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    ISBN: 0321336577
    EAN: 2147483647
    Year: 2005
    Pages: 166
    Authors: Larry Ullman

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net