Cover image for Beginning databases with PostgreSQL
Title:
Beginning databases with PostgreSQL
Author:
Stones, Richard.
Personal Author:
Publication Information:
Birmingham, UK : Wrox Press, [2001]

©2001
Physical Description:
xi, 569 pages : illustrations ; 23 cm.
General Note:
Includes index.
Language:
English
Title Subject:
Subject Term:
Added Author:
ISBN:
9781861005151
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Item Holds
Searching...
QA76.9.D3 S76 2001 Adult Non-Fiction Central Closed Stacks
Searching...

On Order

Summary

Summary

PostgreSQL is rapidly on its way to becoming the most successful open source relational database system. It has had an explosive growth, from its roots in academia, to the Internet, through the efforts of a talented hard-working worldwide development team. The vast array of enterprise businesses migrating to PostgreSQL from proprietary databases are stark evidence for its success to come. This book is a complete tutorial on PostgreSQL features and functions beginning with the basics and building up to the design and construction of databases and integrating them with programming languages for the Web. It shows you how to make the most of this fully programmable databases' powerful features like aggregate, join, transaction, inheritance, embedding your own C routines and more.


Table of Contents

Introductionp. 1
Chapter 1 Introduction to PostgreSQLp. 7
Programming with Datap. 7
Flat File Databasesp. 8
What is a Database?p. 10
Database Typesp. 10
Query Languagesp. 13
Database Management Systemsp. 15
What is PostgreSQL?p. 16
Chapter 2 Relational Database Principlesp. 23
Spreadsheetsp. 23
Putting Data Into a Databasep. 28
Adding Additional Informationp. 32
Designing Tablesp. 36
Basic Data Typesp. 42
The Sample Databasep. 45
Summaryp. 45
Chapter 3 Getting Started with PostgreSQLp. 47
Install or Upgrade?p. 48
Installing PostgreSQL from the Linux Binariesp. 48
Installing PostgreSQL From the Source Codep. 52
Installing PostgreSQL on Windowsp. 65
Summaryp. 77
Chapter 4 Accessing Your Datap. 79
Using psqlp. 80
Simple SELECT Statementsp. 82
Performing Calculationsp. 89
Choosing the Rowsp. 90
Comparisons Using Other Typesp. 96
Multiple Tablesp. 103
Relating Three Tablesp. 109
Summaryp. 114
Chapter 5 PostgreSQL Graphical Toolsp. 117
psqlp. 117
ODBCp. 124
pgAdminp. 128
Kpsqlp. 132
PgAccessp. 132
Microsoft Accessp. 135
Microsoft Excelp. 140
Resourcesp. 144
Summaryp. 144
Chapter 6 Data Interfacingp. 147
Adding Data to the Databasep. 147
Updating Data in the Databasep. 163
Deleting Data from the Databasep. 166
Summaryp. 168
Chapter 7 Advanced Data Selectionp. 171
Aggregate Functionsp. 171
The UNION Joinp. 181
Subqueriesp. 183
Self Joinsp. 190
Outer Joinsp. 191
Summaryp. 195
Chapter 8 Data Definition and Manipulationp. 197
Data Typesp. 197
PostgreSQL Special Typesp. 204
Manipulating Tablesp. 210
Viewsp. 218
Foreign Key Constraintsp. 222
Summaryp. 229
Chapter 9 Transactions and Lockingp. 231
What are Transactions?p. 232
Transaction with Single Usersp. 235
Transactions with Multiple Usersp. 238
Lockingp. 245
Summaryp. 249
Chapter 10 Stored Procedures and Triggersp. 253
Operatorsp. 254
Functionsp. 259
Procedural Languagesp. 261
Getting Started with PL/pgSQLp. 262
Anatomy of a Stored Procedurep. 266
SQL Functionsp. 281
Triggersp. 282
Why Stored Procedures and Triggers?p. 288
Summaryp. 289
Chapter 11 PostgreSQL Administrationp. 291
Default Installationp. 292
Server Controlp. 295
Usersp. 298
Data Maintenancep. 304
Database Securityp. 311
Configuration Optionsp. 313
Performancep. 316
Summaryp. 321
Chapter 12 Database Designp. 323
Understanding the Problemp. 323
What is a Good Database Design?p. 324
Stages in Database Designp. 326
Convert to a Physical Modelp. 336
Normal Formsp. 343
Common Patternsp. 345
Resourcesp. 348
Summaryp. 348
Chapter 13 Accessing PostgreSQL From C Using libpqp. 351
Using the libpq Libraryp. 352
Database Connectionsp. 353
Executing SQL with libpqp. 357
Transactionsp. 361
Printing Query Resultsp. 365
Cursorsp. 368
Binary Valuesp. 374
Asynchronous Functionalityp. 374
Summaryp. 379
Chapter 14 Accessing PostgreSQL From C Using Embedded SQLp. 381
A First Embedded SQL Programp. 382
Summaryp. 405
Chapter 15 Accessing PostgreSQL from PHPp. 407
Adding PostgreSQL Support to PHPp. 408
Using the PHP API for PostgreSQLp. 409
Summaryp. 427
Chapter 16 Accessing PostgreSQL From Perlp. 429
The pgsql_perl5 or Pg Modulep. 430
Using pgsql_perl5p. 431
The Perl DBIp. 437
Summaryp. 450
Chapter 17 Accessing PostgreSQL from Javap. 453
JDBC Overviewp. 453
JDBC Driversp. 454
Building the PostgreSQL JDBC Driverp. 455
DriverManager and Driverp. 456
Connectionsp. 460
JDBC Resultsetsp. 465
JDBC Statementsp. 472
SQL Exceptions and Warningsp. 479
A JDBC GUI Applicationp. 480
Summaryp. 497
Chapter 18 Further Information and Resourcesp. 499
Non-Relational Storagep. 499
OLTP, OLAP, and Other Database Terminologyp. 500
Resourcesp. 502
Summaryp. 504
Appendix A PostgreSQL Database Limitsp. 507
Appendix B PostgreSQL data typesp. 511
Logical Typesp. 511
Exact Number Typesp. 512
Approximate Number Typesp. 512
Temporal Typesp. 513
Character Typesp. 513
Geometric Typesp. 514
Miscellaneous Typesp. 514
Appendix C PostgreSQL SQL Syntaxp. 517
PostgreSQL SQL Commandsp. 517
PostgreSQL SQL Syntaxp. 518
Appendix D Psql Referencep. 531
Appendix E Database Schema and Tablesp. 535
Appendix F Large Objects Support in PostgreSQLp. 539
Adding Images to the Databasep. 539
Indexp. 547