PHP and PostgreSQL: Advanced Web Programming

Book description

Sams¿ PHP and MySQL Web Development, by Luke Welling and Laura Thomson, showed that there is a strong demand for books that describe how to use PHP together with a specific open-source database to develop Web applications.

While MySQL is very popular, PostgreSQL is widely considered to be the more powerful of the two open-source databases. And PostgreSQL is rapidly gaining market share large organizations are beginning to use PostgreSQL instead of Oracle; the demand for PostgreSQL training and support has increased by some accounts 50% in the last six months; and Web hosting services increasingly offer PostgreSQL along with MySQL.

PHP and PostgreSQL Advanced Web Programming focuses on the specific needs of a PostgreSQL developer and will detail how to make use of PostgreSQL¿s unique, advanced features to develop high-availability, fail-safe Web applications with PHP and PostgreSQL.

Table of contents

  1. Copyright
  2. About the Authors
  3. Acknowledgments
  4. Tell Us What You Think!
  5. Reader Services
  6. Introduction
  7. Getting Started
    1. Getting Started
      1. Why Use PHP and PostgreSQL as a Team?
      2. What You Can Do with PHP and PostgreSQL
      3. Web Sites Built on PHP and PostgreSQL
      4. Summary
    2. Setting Up PHP
      1. About PHP
      2. Installing Apache with PHP from Source
      3. Installing Binaries on Linux
      4. Configuring PHP
      5. Summary
    3. PHP Basics
      1. Getting Started
      2. Control Structures and Operators
      3. Data Types and Functions
      4. Building Functions
      5. Exception Handling
      6. Working with Files
      7. Variables and Scope
      8. Building Packages
      9. Working with Forms
      10. Debugging PHP
      11. Summary
    4. Object-Oriented PHP
      1. The Concepts of Object Orientation
      2. Building Classes
      3. Working with Inheritance
      4. Summary
  8. Getting Started with PostgreSQL
    1. Relational and Object-Relational Database Concepts
      1. Normalization
      2. Basic Operations in the Relational Model
      3. PostgreSQL as an Object Relational Database
      4. Modeling Techniques
      5. Components of Relational Databases and Technical Terms
      6. Summary
    2. Installing PostgreSQL
      1. Installing PostgreSQL on Unix
      2. Installing PostgreSQL on Windows
      3. Creating and Removing Databases
      4. The User Interface
      5. The Architecture of PostgreSQL
      6. License
      7. Summary
    3. Basic SQL
      1. Data Types
      2. Building Tables
      3. Building Simple SQL Statements
      4. Updates and Deletes
      5. Writing Joins
      6. Aggregating Data
      7. Inserting Huge Amounts of Data
      8. Indexes
      9. Modifying Objects
      10. Mathematical Functions and Operators
      11. Summary
    4. Advanced SQL
      1. Advanced Data Types
      2. Working with Views
      3. Working with Subselects
      4. Working with Aliases and Self-Joins
      5. Object-Oriented SQL
      6. Transactions and Locking
      7. Constraints
      8. Basic Optimizations Using EXPLAIN
      9. Sophisticated Joins
      10. Working with Arrays
      11. Combining Queries and Ranges of Values
      12. Summary
    5. Embedded Languages
      1. Writing SQL Functions
      2. PL/pgSQL
      3. Writing Triggers
      4. Embedded Languages Versus PHP Functions
      5. Summary
    6. PostgreSQL Administration
      1. User Administration and User Rights
      2. Maintenance and Database Internals
      3. Configuring PostgreSQL
      4. Preparing the Database for the Web
      5. Summary
  9. PHP/PostgreSQL Interaction
    1. Writing Database-Driven Applications
      1. Connecting to the Database
      2. Inserting and Retrieving Data
      3. Error Handling and Monitoring
      4. Handling Huge Amounts of Data
      5. Retrieving Objects from the Database
      6. Tracing a PostgreSQL Connection
      7. Locking
      8. PHP and Transactions
      9. Summary
    2. Working with BLOBs
      1. Working with PostgreSQL BLOBs Using SQL
      2. Working with PostgreSQL BLOBs Using PHP
      3. Managing File Uploads
      4. Storing Files as Toasted Text
      5. An Example of a Simple Image Management Tool
      6. Summary
    3. Working with Persistent Database Connections
      1. The Concept of Persistent Database Connections
      2. An Example
      3. Persistent Connections and Performance
      4. Dangers and Hardware Issues
      5. Summary
  10. Advanced Technologies
    1. Managing Regular Expressions
      1. Perl Style
      2. POSIX Style
      3. Regular Expressions and SQL
      4. Summary
    2. Session Management
      1. Managing Sessions with Cookies
      2. Session Management
      3. Summary
    3. Working with Dynamic Documents, Images, and Movies
      1. Creating Dynamic Images
      2. Using Geometric Data Types
      3. Creating Dynamic Flash Movies
      4. Generating PDF Files
      5. Summary
    4. Working with Dates and Time
      1. Dates and Time in SQL
      2. Dates and Time in PHP
      3. Summary
    5. Tuning
      1. Tuning PostgreSQL
      2. Tuning PHP
      3. Summary
    6. XML
      1. The Basic Concepts
      2. Building a Simple XML-Based Application
      3. XML and PostgreSQL
      4. Summary
    7. Security Issues
      1. Potential Threats
      2. Securing Your System
      3. User Authentication with Apache and PHP
      4. Summary
  11. Practical Examples
    1. Web Applications
      1. Mail Systems
      2. Building a Web Shop
      3. Building a Content Management System
      4. Creating Stock Charts
      5. PHP for Application Servers
      6. Summary
    2. Extending PostgreSQL
      1. A User-Defined Data Type
      2. Building Substring Indexes
      3. Tolerant Search Algorithms
      4. Summary
    3. High-Availability Systems
      1. An Introduction to High Availability
      2. Building Failsafe Applications
      3. Summary
  12. Migration
    1. Migration
      1. Migrating from MySQL to PostgreSQL
      2. Migrating from Oracle to PostgreSQL
      3. Summary
  13. Index

Product information

  • Title: PHP and PostgreSQL: Advanced Web Programming
  • Author(s): Ewald Geschwinde, Hans-Jürgen Schönig
  • Release date: June 2002
  • Publisher(s): Sams
  • ISBN: 0672323826