Make web site - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What this chapter covers: Creating MySQL user accounts Creating a new database Defining a database table Choosing the right column type Using MySQL, MySQLI, and PDO to query a database When I first started working with databases, one of the greatest frustrations was that all the books and online tutorials I consulted assumed that you already knew the basics of database design and construction, or if you didn t that you planned to use Microsoft Access. MySQL is very different from Access, which is intended for use in small office environments. MySQL is not only fast and multiplatform; it s capable of handling a high number of simultaneous connections without any perceptible loss of performance. The differences between MySQL and Access also affect the way that you construct and interact with the database. After describing the basics of a database, I ll show you how to set up MySQL user accounts, create your first database, and connect to it with PHP. I ll also show you how to choose the correct data type to store each piece of information. How a database stores information MySQL is a relational database system. All the data is stored in tables, very much in the same way as in a spreadsheet, with information organized into rows and columns. Figure 11-1 shows the database table that you will build later in this chapter, as displayed in phpMyAdmin. Figure 11-1. Information in a database table is stored in rows and columns, just like in a spreadsheet. Each column has a name (image_id, filename, and caption) indicating what it stores. The rows aren t labeled, but the first column (image_id) contains a unique identifier known as a primary key, which can be used to identify the data associated with a particular row.
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply