Access Database Design & Programming, Ed 2 1999.pdf

(1796 KB) Pobierz
Access Database Design & Programming, Second Edition
Steven Roman
Publisher: O'Reilly
Second Edition July 1999
ISBN: 1 -56592-626-9, 429 pages
Buy Print Version
Copyright
Table of Contents
Index
Full Description
About the Author
Reviews
Reader reviews
Errata
This second edition of the best-selling
Access Database Design &
Programming
covers Access' new VBA Integrated Development
Environment used by Word, Excel, and Powerpoint; the VBA language
itself; Microsoft's latest data access technology, Active Data Objects
(ADO); plus Open Database Connectivity (ODBC).
Access Database Design & Programming, Second Edition
Dedication
Preface
The Book's Audience
Organization of This Book
Conventions in This Book
Obtaining Updated Information
Request for Comments
Acknowledgments
I: Database Design
1. Introduction
1.1 Database Design
1.2 Database Programming
2. The Entity-Relationship Model of a Database
2.1 What Is a Database?
2.2 Entities and Their Attributes
2.3 Keys and Superkeys
2.4 Relationships Between Entities
3. Implementing Entity-Relationship Models: Relational Databases
3.1 Implementing Entities
3.2 A Short Glossary
3.3 Implementing the Relationships in a Relational Database
3.4 The LIBRARY Relational Database
3.5 Index Files
3.6 NULL Values
4. Database Design Principles
4.1 Redundancy
4.2 Normal Forms
4.3 First Normal Form
4.4 Functional Dependencies
4.5 Second Normal Form
4.6 Third Normal Form
4.7 Boyce-Codd Normal Form
4.8 Normalization
II: Database Queries
5. Query Languages and the Relational Algebra
5.1 Query Languages
5.2 Relational Algebra and Relational Calculus
5.3 Details of the Relational Algebra
6. Access Structured Query Language (SQL)
6.1 Introduction to Access SQL
6.2 Access Query Design
6.3 Access Query Types
6.4 Why Use SQL?
6.5 Access SQL
6.6 The DDL Component of Access SQL
6.7 The DML Component of Access SQL
III: Database Architecture
7. Database System Architecture
7.1 Why Program?
7.2 Database Systems
7.3 Database Management Systems
7.4 The Jet DBMS
7.5 Data Definition Languages
7.6 Data Manipulation Languages
7.7 Host Languages
7.8 The Client/Server Architecture
IV: Visual Basic for Applications
8. The Visual Basic Editor, Part I
8.1 The Project Window
8.2 The Properties Window
8.3 The Code Window
8.4 The Immediate Window
8.5 Arranging Windows
9. The Visual Basic Editor, Part II
9.1 Navigating the IDE
9.2 Getting Help
9.3 Creating a Procedure
9.4 Run Time, Design Time, and Break Mode
9.5 Errors
9.6 Debugging
10. Variables, Data Types, and Constants
10.1 Comments
10.2 Line Continuation
10.3 Constants
10.4 Variables and Data Types
10.5 VBA Operators
11. Functions and Subroutines
11.1 Calling Functions
11.2 Calling Subroutines
11.3 Parameters and Arguments
11.4 Exiting a Procedure
11.5 Public and Private Procedures
11.6 Fully Qualified Procedure Names
12. Built-in Functions and Statements
12.1 The MsgBox Function
12.2 The InputBox Function
12.3 VBA String Functions
12.4 Miscellaneous Functions and Statements
12.5 Handling Errors in Code
13. Control Statements
13.1 The If...Then Statement
13.2 The For Loop
13.3 Exit For
13.4 The For Each Loop
13.5 The Do Loop
13.6 The Select Case Statement
13.7 A Final Note on VBA
V: Data Access Objects
14. Programming DAO: Overview
14.1 Objects
14.2 The DAO Object Model
14.3 The Microsoft Access Object Model
14.4 Referencing Objects
14.5 Collections Are Objects Too
14.6 The Properties Collection
14.7 Closing DAO Objects
14.8 A Look at the DAO Objects
14.9 The CurrentDb Function
15. Programming DAO: Data Definition Language
15.1 Creating a Database
15.2 Opening a Database
15.3 Creating a Table and Its Fields
15.4 Creating an Index
15.5 Creating a Relation
15.6 Creating a QueryDef
16. Programming DAO: Data Manipulation Language
16.1 Recordset Objects
16.2 Opening a Recordset
16.3 Moving Through a Recordset
16.4 Finding Records in a Recordset
16.5 Editing Data Using a Recordset
VI: ActiveX Data Objects
17. ADO and OLE DB
17.1 What Is ADO?
17.2 Installing ADO
17.3 ADO and OLE DB
17.4 The ADO Object Model
17.5 Finding OLE DB Providers
17.6 A Closer Look at Connection Strings
VII: Appendixes
A. DAO 3.0/3.5 Collections, Properties, and Methods
A.1 DAO Classes
A.2 A Collection Object
A.3 Connection Object (DAO 3.5 Only)
A.4 Container Object
A.5 Database Object
A.6 DBEngine Object
A.7 Document Object
A.8 Error Object
A.9 Field Object
A.10 Group Object
A.11 Index Object
A.12 Parameter Object
A.13 Property Object
A.14 QueryDef Object
A.15 Recordset Object
A.16 Relation Object
A.17 TableDef Object
A.18 User Object
A.19 Workspace Object
B. The Quotient: An Additional Operation of the Relational Algebra
C. Open Database Connectivity (ODBC)
C.1 Introduction
C.2 The ODBC Driver Manager
C.3 The ODBC Driver
C.4 Data Sources
C.5 Getting ODBC Driver Help
C.6 Getting ODBC Information Using Visual Basic
D. Obtaining or Creating the Sample Database
D.1 Creating the Database
D.2 Creating the BOOKS Table
D.3 Creating the AUTHORS Table
D.4 Creating the PUBLISHERS Table
D.5 Creating the BOOK/AUTHOR Table
D.6 Backing Up the Database
D.7 Entering and Running the Sample Programs
E. Suggestions for Further Reading
Colophon
Dedication
To Donna
Preface
Let me begin by thanking all of those readers who have helped to make the first edition
of this book so very successful. Also, my sincere thanks go to the many readers who have
written some very flattering reviews of the first edition on amazon.com and on O'Reilly's
own web site. Keep them coming.
With the recent release of Office 2000, and in view of the many suggestions I have
received concerning the first edition of the book, it seemed like an appropriate time to do
a second edition. I hope that readers will find the second edition of the book to be even
more useful than the first edition.
Actually, Access has undergone only relatively minor changes in its latest release, at least
with respect to the subject matter of this book. Changes for the Second Edition are:
A discussion (Chapter
8,
and
Chapter 9
of Access' new VBA Integrated
Development Environment. At last Access shares the same IDE as Word, Excel,
and PowerPoint!
In response to reader requests, I have significantly expanded the discussion of the
VBA language itself, which now occupies
Chapter 10, Chapter 11, Chapter 12,
and
Chapter 13.
Chapter 17,
which is new for this edition, provides a fairly complete discussion of
ActiveX Data Objects (ADO). This is also accompanied by an appendix on Open
Database Connectivity (ODBC), which is still intimately connected with ADO.
As you may know, ADO is a successor to DAO (Data Access Objects) and is
intended to eventually replace DAO, although I suspect that this will take some
considerable time. While the DAO model is the programming interface for the Jet
database engine, ADO has a much more ambitious goal—it is a programming
model for a
universal
data access interface called OLE DB. Simply put, OLE DB
is a technology that is intended to be used to connect to
any
type of data—
traditional database data, spreadsheet data, Web-based data, text data, email, and
so on.
Frankly, while the ADO object model is smaller than that of DAO, the
documentation is much less complete and, as a result, ADO seems far more
confusing than DAO, especially when it comes to issues such as how to create the
infamous
connection strings.
Accordingly, I have spent considerable time
Zgłoś jeśli naruszono regulamin