Text Book Reading

In this assignment we were to read Chapter 4 -Introduction to MySQL, Chapter 5 - Introduction to Sql and Chapter 9 -Using PHP with MySQL from the book PHP and MySQL for Dynamic Web Sites. For the delivarable we are to have a textbook reading assignment page that briefly explains what we have read and that we understand the material. In addition, we are to include a link to a working code of register.php, password.php and view_users.php from Chapter 9.

MySQL is the world's most popular open source database application and is commonly used with PHP. MySQL software comes with the database server that stores actual data, different client applications and several utilities. Beginning with Chapter 4, we are introduced to defining simples tables using MySWL's data types and other properties.

.

Chapter 4 - Introduction to MySQL

  1. Naming Database Elements

    a. When creating databases and tables, you should come up with names, called identifiers.

    b. To name a databases elements:

    • Determine the Databases Name - Make sure that the name is unique for the MySQL server.
    • Determine the Table Names - The table names just need to be unique to the database.
    • Determine the Column Names - These are used to store a user ID, a first name, last name, etc.

  2. Choosing Your Column Types - Once all tables and columns identified in the database, a data type should be determined. There are three primary types:

    • Texts or Strings
    • Numbers
    • Dates and times

  3. Using PHPAdmin - one of the best and most popular applications written in PHP whose sole purpose is to provide interface to a MySQL server.

Chapter 5 - Introduction to SQL

Structured Query Language (SQL) - is a group of special words used exclusively for interacting with databases. In this chapter, the focus is on creating tables, populating them and running other basic queries.

What SQL can do:

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a database
  • SQL can delete records in a database
  • SQL can create new databases
  • SQL can create new tables in a database
  • SQL can create stored procedures in a database
  • SQL can create views in a database
  • SQL can set permissions on tables, procedures, and views

Chapter 9 - Using PHP with MySQL

This chapter focuses on placing PHP, SQL and MYSQL together by building a PHP interface for interacting with a users table. The knowledge taught in this chapter and the examples used are the basis for all PHP-MySQL Web applications. Below is an example of working code from this chapter of executing simple queries.

Executing Simple Queries - Working Code

Link:Registration


My Pic My Pic