[...]... orderinfo.customer_id = customer.customer_id GROUP BY customer_id SELECT customer.title, customer.fname, customer.lname, COUNT(orderinfo.orderinfo_id) AS "Number of orders" FROM customer, orderinfo WHERE customer.customer_id = orderinfo.customer_id GROUP BY customer.title, customer.fname, customer.lname These SELECT statements list all the customers, all the customer orders, and count the orders each customer... school sweetheart-turned-wife, Amber xix MatthewStones_4789Front.fm Page xx Wednesday, March 9, 2005 9:28 AM MatthewStones_4789Front.fm Page xxi Wednesday, March 9, 2005 9:28 AM Acknowledgments W e would like to thank the many people who helped to make this book possible Neil would like to thank his wife, Christine, for her understanding, and children Alex and Adrian for not complaining too loudly at... find a chapter to help you This is the second edition of Beginning Databases with PostgreSQL; the first edition was published by Wrox Press in 2001 Since then, every chapter has been updated with material to cover the latest version of PostgreSQL, version 8 We have taken the opportunity in this edition to add a new chapter on accessing PostgreSQL from the C# language to complement revised chapters covering... Third Edition (ISBN 0-7 64 5-4 49 7-7 ) covers the DBM library and the MySQL database system • Professional Linux Programming (ISBN 1-8 6100 3-0 1-3 ) contains chapters on the PostgreSQL and MySQL database systems • Beginning Databases with MySQL (ISBN 1-8 6100 6-9 2-6 ) covers the MySQL database system 1 MatthewStones_4789C01.fm Page 2 Tuesday, February 1, 2005 7:25 AM 2 CHAPTER 1 ■ INTRODUCTION TO POSTGRESQL Constant... units to the euro These rates will never change We are not quite finished though, as it is possible for this table of currencies to grow As countries sign up for the euro, their national currency exchange rate is fixed, and they will need to be added to the table When that happens, the currency converter needs to be changed, its built-in table changed, and the application rebuilt This will need to be... RICK STONES started programming at school, more years ago than he cares to remember, on a 6502-powered BBC micro, which with the help of a few spare parts, continued to function for the next 15 years He graduated from the University of Nottingham with a degree in Electronic Engineering, but decided software was more fun Over the years, he has worked for a variety of companies, from the very small, with. .. We would also like to thank our employer, Celesio, for support during the production of both editions of this book xxi MatthewStones_4789Front.fm Page xxii Wednesday, March 9, 2005 9:28 AM MatthewStones_4789Front.fm Page xxiii Wednesday, March 9, 2005 9:28 AM Introduction W elcome to Beginning Databases with PostgreSQL Early in our careers, we came to recognize the qualities of open-source software Not... find a “desktop database” useful for small applications in the office and around the home Many web sites are data-driven, with content being extracted from databases behind the web server As databases are becoming ubiquitous, we feel that there is a need for a book that includes some database theory and teaches good practice We have written this book to be a general introduction to databases, with broad... “post-gray-ess-cue-el”) The book is roughly divided into thirds The first part covers getting started, both with databases in general (what they are and what they are useful for) and with PostgreSQL in particular (how to obtain it, install it, start it, and use it) If you follow along with the examples, by the end of Chapter 5, you will have built your first working database and be able to use several tools... started the drive toward more sophisticated database management systems We can attempt to resolve this problem by using ordinary text files with a little more structure These are still often referred to as flat files, but they are probably better described as structured text files Here’s another example An application that stores the details of DVDs might need to record the year of production, director, . alt="" Beginning Databases with PostgreSQL From Novice to Professional, Second Edition NEIL MATTHEW AND RICHARD STONES MatthewStones_4789Front.fm Page i Wednesday, March 9, 2005 9:28 AM Beginning. AM Beginning Databases with PostgreSQL: From Novice to Professional, Second Edition Copyright © 2005 by Neil Matthew and Richard Stones All rights reserved. No part of this work may be reproduced or. States by Springer-Verlag GmbH & Co. KG, Tiergar- tenstr. 17, 69112 Heidelberg, Germany. In the United States: phone 1-8 00-SPRINGER, fax 20 1-3 4 8-4 505, e-mail orders@springer-ny.com, or visit