Installing the Sample Database

If you want, you can download a sample database from this book's website: http://www.conjectrix.com/pgbook.

After you have downloaded the bookdata.tar.gz file, you can unpack it with either of the following commands:

$ tar -zxvf bookdata.tar.gz

or

$ gunzip -c bookdata.tar.gz | tar -xvf -

The bookdata.tar.gz file contains a number of files and will unpack into your current directory. After unpacking, you will see a subdirectory for each chapter (okay, for most chaptersnot all chapters include sample code or sample data).

You can use the chapter1/load_sample.sql file to create and populate the three tables that I have discussed (tapes, customers, and rentals). To use the load_sample.sql file, execute the following command:

$ psql -d movies -f chapter1/load_sample.sql

This command drops the tapes, customers, and rentals tables (if they exist), creates them, and adds a few sample rows to each one.

Part I: General PostgreSQL Use

Introduction to PostgreSQL and SQL

Working with Data in PostgreSQL

PostgreSQL SQL Syntax and Use

Performance

Part II: Programming with PostgreSQL

Introduction to PostgreSQL Programming

Extending PostgreSQL

PL/pgSQL

The PostgreSQL C APIlibpq

A Simpler C APIlibpgeasy

The New PostgreSQL C++ APIlibpqxx

Embedding SQL Commands in C Programsecpg

Using PostgreSQL from an ODBC Client Application

Using PostgreSQL from a Java Client Application

Using PostgreSQL with Perl

Using PostgreSQL with PHP

Using PostgreSQL with Tcl and Tcl/Tk

Using PostgreSQL with Python

Npgsql: The .NET Data Provider

Other Useful Programming Tools

Part III: PostgreSQL Administration

Introduction to PostgreSQL Administration

PostgreSQL Administration

Internationalization and Localization

Security

Replicating PostgreSQL Data with Slony

Contributed Modules

Index



PostgreSQL(c) The comprehensive guide to building, programming, and administering PostgreSQL databases
PostgreSQL(c) The comprehensive guide to building, programming, and administering PostgreSQL databases
ISBN: 735712573
EAN: N/A
Year: 2004
Pages: 261

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