下载  >  开发技术  >  Java  > PostgreSQL数据库从入门到精通.pdf

PostgreSQL数据库从入门到精通.pdf 评分

PostgreSQL数据库从入门到精通.pdf
Matthewstones 4789Front fm Page ii Wednesday, March 9, 2005 9: 28 AM Beginning Databases with PostgreSQL: From Novice to Professional, Second Edition Copyright o 2005 by Neil Matthew and Richard Stones All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, clectronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN(pbk):1-59059-478-9 Printed and bound in the united states of america 987654321 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we usc the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark Gilmore Contributing Author: Jon Parise Technical reviewer: robert treat Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore, Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser Assistant Publisher: Grace Wong Project Manager: Sofia Marchant Copy Manager: Nicole LeClerc Copy Editor: Marilyn Smith Production Manager: Kari Brooks-Copony Production editor: Katie stence Compositor: Susan glinert Proofreader: Elizabeth Berry Indexer: John Collin Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Manager: Toll Debolski Distributed to the book trade in the United States by Springer-Verlag New York, InC, 233 Spring Street, 6th Floor, New York, NY 10013, and outside the United States by Springer-Verlag gmbh Co KG, Tiergar tenstr. 17, 69112 Heidelberg, Germany. In the United States: phone 1-800-SPRINGER, fax 201-348-4505, e-mail ordersospringer-ny com, or visit http://www.springer-ny.com.OutsidetheUnitedStatesfax+496221345229,e-mailorders@springer.de, orvisithttp://www.springer.de For information on translations, please contact Apress directly at 2560 Ninth Strect, Suite 219, Bcrkclcy, CA 94710.phOne510-549-5930,fax510-549-5939,e-mailinfo@apress.com,orvisithttp://www.apress.com The information in this book is distributed on an"as is"basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. Thesourcecodeforthisbookisavailabletoreadersathttp://ww.apress.comintheDownloadssection 命) ● Matthew stones 4789Front fm Page iii Wednesday, March 9, 2005 9: 28 AM Contents at a glance About the authors 1■■ .,,,...XV About the technical reviewer XIX Acknowledgments XXI Introduction CHAPTER 1 Introduction to PostgreSQL CHAPTER 2 Relational Database Principles................17 CHAPTER 3 Getting Started with PostgreSQL 43 CHAPTER 4 Accessing Your Data 73 CHAPTER 5 PostgreSQL Command-Line and Graphical Tools ,,,113 CHAPTER 6 Data Interfacing∴… 149 CHAPTER 7 Advanced data selection 173 CHAPTER 8 Data Definition and Manipulation...,....,...,,..20 CHAPTER 9 Transactions and Locking ,,,,,,,243 CHAPTER 10 Functions, Stored Procedures, and triggers ,,,,,,,267 CHAPTER 11 PostgreSQL Administration ..309 CHAPTER 12 Database design ,,,,,357 CHAPTER 13 Accessing PostgreSQL from C Using libpq CHAPTER 14 Accessing Postgre SQL from C Using Embedded SQL.....419 CHAPTER 15 Accessing Postgre SQL from PHP 445 CHAPTER 16 Accessing PostgresQL from Perl ,,465 CHAPTER 17 Accessing Postgre SQL from Java...........,..491 CHAPTER 18 Accessing PostgreSQL from C# 517 APPENDIX A PostgreSQL Database Limits APPENDIX B PostgreSQL Data Types 545 ii 命) ● MatthewStones 4789Front fm Page iv wednesday, March 9, 2005 9: 28 AM CONTENTS AT A GLANCE APPENDIXc PostgreSQL SQL Syntax reference APPENDIX D psql reference 573 APPendE Database schema and tables ..577 APPENDIX F Large Objects Support in PostgreSQL ,581 INDEX 命) ● Matthew Stones 4789Front fm Page v Wednesday, March 9, 2005 9: 28 AM Contents About the authors 1■■ 1■■ .,,,...XV About the technical reviewer XIX Acknowledgments XXI Introduction CHAPTER 1 Introduction to PostgreSQL Programming with Data Constant data 2 Flat Files for data Storage 2 Repeating Groups and other Problems 3 What Is a Database Management System?........,,...4 Database Models Query Languages 8 Database Management system Responsibilities 10 What ls postgreSQL? A Short History of PostgreSQL 12 The PostgreSQL Architecture ,,,,,,,,13 Data Access with Postgre SQL 15 What Is Open Source? 15 Resources 16 cHaPter 2 Relational Database principles 17 Limitations of Spreadsheets .....17 Storing Data in a Database Choosing Columns Choosing a data Type for each column Identifying Rows Uniquely........,,....., Accessing data in a database ,23 Accessing Data Across a Network 24 Handling multiuser Access.................25 Slicing and Dicing Data 26 ● Matthew Stones 4789Front fm Page vi Wednesday, March 9, 2005 9: 28 AM CONTENTS Adding Informa ,28 Using Multiple Tables 28 Relating a table with a join Operation 29 Designing Tables 32 Inderstanding Some Basic Rules of Thumb 33 Creating a Simple Database Design 34 Extending Beyond Two Tables........... Completing the Initial Design 37 Basic data types Dealing with the Unknown: NULLS. .......... Reviewing the Sample Database Summar 42 CHAPTER 3 Getting started with postgreSQL 43 Installing PostgreSQL on Linux and UNIX Systems.....,,..43 Installing postgresQl from Linux Binaries Anatomy of a PostgreSQL Installation ...47 Installing PostgreSQL from the Source Code Setting Up PostgreSQL on Linux and UNIX 53 Installing PostgreSQL on Windows ,,,,,,,,,,,59 Using the windows Installer Configuring Client Access 64 Creating the sample Database 64 Creating User Records.....,.. 65 Creating the database Creating the Tabl 67 Removing the Tables Populating the tables Summa CHAPTER 4 Accessing Your Data Using psql 74 Starting Up on Linux Syste 74 Starting Up on Windows Systems 74 Resolving Startup Problems....... 75 Using some basic psql commands 命) ● MatthewStones 4789Front fm Page vii Wednesday, March 9, 2005 9: 28 AM CONTENTS Using Simple SELECT Statements ,78 Overriding Column Names Controlling the Order of Rows..,.....,...,,...81 Suppressing Duplicates 盖111 83 Performing Calculations Choosing the rows ing More Complex Conditi Pattern Matching iting the Results Checking for NULL Checking dates and Times Setting the Time and date style 94 Using Date and Time Functions 98 Working with Multiple Tables 100 Relating Two Tables Aliasing Table Names Relating three or More tables 106 The sQL92 SELECT Synta Summary ..... 112 CHAPTER 5 PostgreSQL Command-Line and graphical Tools 11 113 psql 113 Starting psql 114 Issuing Commands in psql 114 Working with the command history 115 Examining the Database 117 psql command-Line Quick Reference 118 psql Internal Commands Quick Reference..........119 ODBC Setup Installing the oDBc Driver Creating a data Source ,,,,,123 dminⅢ Installing pgAdmin l Using pgAdminⅢl 126 phpPgAdmin 129 Installing phpPgAdmin....,,. Jsing phppgAdmin 130 命) ● MatthewStones 4789Front fm Page viii Wednesday, March 9, 2005 9: 28 AM CONTENTS Real 133 Connecting to a database........ ,,134 Creating Forms Building Queries....... ..:::#a:::...::·: 136 Microsoft access 137 Using linked Tables Entering Data and Creating Reports Microsoft excel .142 Resources for postgreSQl Tools Summary ,,,,,,,,,,147 CHAPTER 6 Data Interfacing ..149 Adding Data to the Database ,,,,,,,,,149 Using basic INSerT Statements 149 Using Safer INSERT Statements ,,,,,,,,,152 Inserting Data into Serial Columns ,,,,154 Inserting Null values 158 Using the \copy command....,........,,,.. 159 Loading data Directly from Another Application Updating Data in the Database 165 Using the UPDATE Statement Updating from another Table..,........ 168 Deleting Data from the databa 169 Using the delete statement ,,,,169 jsing the tRUncatE Statement Summary chaPter 7 Advanced data selection 173 Aggregate Functions............ ,,,,,,,,173 The Count Function 174 The Min Function The max Function The sum function 184 The Avg Function The Subquery Subqueries That Return Multiple RowS Correlated Subqueries..................188 Existence Subqueries ● MatthewStones 4789Front fm Page ix Wednesday, March 9, 2005 9: 28 AM CONTENTS The union Join Self joins ,,,,,,,194 Outer joins 196 Summat 200 CHAPTER8 Data Definition and Manipulation............201 Data Types 201 The boolean data Type 202 Character Data Types 204 Number Data Types 206 Temporal Data Types .209 Special Data Types .209 Arrays 210 Data Manipulation 212 Converting between Data Types ,,,,,,,,,,,,,212 Functions for Data Manipulation 214 Magic variables ..215 The oid column ,,,,,216 Table Management ,,,,,,,,,,,,,217 Creating Tables 217 ing Column Constr 218 Using table constraints.....,...,... 222 Altering Table Structures ,,,223 Deleting tables 227 Using temporary Tables ..227 Views 228 CreatingⅥi 228 Deleting and Replacing Views...,,,...... ..231 Foreign Key constraints 232 Foreign Key as a column constraint .233 Foreign Key as a Table Constraint 234 Foreign Key constraint Options. ...240 Summary CHAPTER 9 Transactions and locking 243 What Are Transactions? Grouping Data Changes into Logical Units..,........ 244 Concurrent multiuser Access to data 244 ACID Rules 246 Transaction Logs ,,,,,,,,,,,,,,,,,,,,,,,,,,,247 ●

...展开详情
所需积分/C币:50 上传时间:2016-12-14 资源大小:18.35MB
举报 举报 收藏 收藏
分享 分享

评论 下载该资源后可以进行评论 3

gzwsee 资源挺好,感谢楼主分享
2018-12-21
回复
mmczhangjing 英文版的,看起来还行,值得推荐。多谢楼主分享!
2017-10-09
回复
qfoxzjd 挺好的资源,谢谢
2017-06-15
回复
PostgreSQL实战.pdf 大小221MB PostgreSQL 10

本书基于PostgreSQL 10编写,重点介绍PostgreSQL的丰富特性以及生产实践运维技巧。全书共18章,分为基础篇、核心篇、进阶篇三部分。基础篇包括第1到4章,主要介绍PostgreSQL基础知识,例如安装、客户端工具、数据类型、SQL高级特性等,为读者阅读核心篇和进阶篇做好准备;核心篇包括第5到9章,主要介绍PostgreSQL核心内容

立即下载
postgresql 教程 pdf 资料集合 .rar

postgresql 教程 pdf资料整理;内含多本资料,适合不同阶段的学习。

立即下载
PostgreSQL从入门到精通

PostgreSQL从入门到精通, 完全的学习手册, 新手从0开始,

立即下载
PostgreSQL教程.pdf

这篇 PostgreSQL 教程提供 SQL 的基本和高级概念。此 PostgreSQL 系列教程是专为初学 者和专业人士编写提供的,需要读者有一些基本的数据库和编程基础。

立即下载
PostgreSQL从入门到精通.pdf

PostgreSQL从入门到精通

立即下载
Postgresql书籍

Postgresql学习,个人书籍

立即下载
【中文版】PostgreSQL即学即用 第2版.pdf

《PostgreSQL即学即用 第2版》, 作者:(美)奥贝,(美)徐著 , 页数:207 , 出版日期:2016.01

立即下载
PostgreSQL从入门到精通(中文)

PostgreSQL从入门到精通(中文)

立即下载
postgresql mvcc技术内幕

主要介绍postgresql的多版本并发控制实现原理与实际使用

立即下载
PostgreSQL服务器编程.[美]Hannu Krosing(带详细书签) PDF 下载 高清 完整版

原书名:PostgreSQL Server Programming 作者: (美)Hannu Krosing Jim Mlodgenski Kirk Roybal 译者: 戚长松 丛书名: 数据库技术丛书 出版社:机械工业出版社 ISBN:9787111480570 出版日期:2014 年10月 开本:16开 页码:186 版次:1-1 编辑推荐 资深PostgreSQL专家撰写,系统讲解PostgreSQL服务器编程的各种技术细节,深入解析PostgreSQL的扩展框架,Amazon全五星评价。 通过丰富的实例,循序渐进阐释PostgreSQL开发和扩展的相关概念及各种实用

立即下载
Postgis-学习 入门 教程 教学 手册-Postgresql

PostGIS简介、安装、新建空间数据库、简单SQL语句查询练习、几何数据操作和练习、空间关系操作与练习、空间链接与练习、投影数据与练习、空间索引与练习…… 还包括PostgreSQL for spatial的配置,验证,postgis函数简介等信息。 非常详细。

立即下载
PostgreSQL 9从零开始学.pdf

PostgreSQL 9从零开始学.pdf 个人收集电子书,仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!

立即下载