Preface xi1 Introduction to Databases and the Relational Data Model 11.1 Databases are a Tool 21.2 Overview of Data and Models 61.3 The Relational Data Model 141.3.1 Definition 141.3.2 Uniqueness 161.3.3 Referential Integrity 20Special Topic: Primary Key and Referential Integrity 261.3.4 Additional Constraints 272 Conceptual Design 432.1 Gathering Requirements 442.2 Entity-Relationship Diagrams 46How To: Design an Entity-Relationship Diagram 50Special Topic: (Min, Max) Pairs 54Special Topic: Recursive Relationships and Role Names 54Special Topic: Ternary Relationships 56Special Topic: EER for Modeling Inheritance 562.3 Mapping ER Diagrams to Tables 62How To: Map an ER Diagram to Relations 672.4 Other Graphical Approaches 733 Relational Algebra 1033.1 Query Design 104How To: Query Design 1043.2 Algebra Operators 109Note: Overview of Relational Algebra 1103.2.1 Filtering 1113.2.2 Sets 1143.2.3 Joins 1163.2.4 Division 1193.3 Relational Completeness 1273.4 Query Optimization 134How To: Heuristic Query Optimization 1364 Relational Calculus 1614.1 Logical Foundations 162Note: Overview of Relational Calculus Languages 1634.2 Tuple Relational Calculus 1644.2.1 Fundamental Query Expressions 165How To: Writing a Fundamental Query in TRC 165vi4.2.2 Quantification of Variables 1674.2.3 Atoms and Formula 1724.2.4 Relational Completeness 1754.3 Domain Relational Calculus 1834.3.1 Fundamental Query Expressions 183How To: Writing a Fundamental Query in DRC 1844.3.2 Quantification of Variables 1874.3.3 Atoms and Formula 1934.3.4 Relational Completeness 1954.4 Safety 2045 SQL: An Introduction to Querying 2375.1 Foundations 237Note: SQL Syntax 238Syntax: Basic SQL Query 2405.2 Fundamental Query Expressions 246How To: Writing a Fundamental Query in SQL 2465.2.1 Queries involving One Table 2475.2.2 Queries involving Multiple Tables 250How To: Writing a Reflection Query 2555.3 Nested Queries 261Special Topic: A glimpse at query optimization 264Special Topic: Views and Inline Views 2665.4 Set Operators 2705.5 Aggregation and Grouping 276Special Topic: Arithmetic Expressions 2815.6 Querying with null Values 2855.7 Relational Completeness 2895.7.1 Fundamental Operators 2905.7.2 Additional Operators 2926 SQL: Beyond the Query Language 3296.1 Data Definition 329Syntax: Create Table Statement 331Syntax: Drop Table Statement 336Syntax: Alter Table Statement 337Special Topic: Create Index 338Syntax: Create View Statement 3396.2 Data Manipulation 342Syntax: Insert Into Statement 343Special Topic: Database Population 346Syntax: Update Statement 347Syntax: Delete Statement 3496.3 Database User Privileges 352Syntax: Grant Statement 354Syntax: Revoke Statement 3557 Database Programming 3717.1 Persistent Stored Modules 372Syntax: Create Procedure Statement 374Syntax: Create Function Statement 3767.2 Overview of Call-Level Interface 3827.3 Java and JDBC 3857.4 Python and DB-API 3938 XML and Databases 4318.1 Overview of XML 4328.2 DTD 439Syntax: DTD Overview 4408.3 XML Schema 448Syntax: XSD Overview of Element and Attribute Declarations 450Syntax: XSD Attribute Declarations: use, default, fixed 4608.4 Structuring XML for Data Exchange 4679 Transaction Management 4919.1 ACID Properties of a Transaction 4929.2 Recovery control 498How To: Recovery Control: UNDO and REDO 5019.3 Concurrency control 5049.3.1 Serializability 507How To: Create a Precedence Graph 5089.3.2 Locking 5129.3.3 Timestamps 520Algorithm: Basic Timestamp Protocol 52110 More on Database Design 54310.1 Database Design Goals 54410.2 Functional Dependencies 546Algorithm: Attribute Closure 550Special Topic: Minimal Set of Functional Dependencies 552How To: Heuristic Determination of a Candidate Key 55210.3 Decomposition 558How To: Determine Breakdown of F for a Decomposition 559How To: Determine Lossless Pairwise Decomposition 562Algorithm: Lossless-Join Property for Database Schema 56510.4 Normal Forms 571How To: Determine the Normal Form of a Relation 574Algorithm: BCNF Decomposition Algorithm 575A WinRDBI 599A.1 Overview 599A.2 Query Languages 600A.3 Implementation Overview 606A.4 Summary 606 Index 607