Preface |
|
xvii | |
|
Chapter 1 Database Systems: Architecture and Components |
|
|
1 | (29) |
|
1.1 Data, Information, and Metadata |
|
|
1 | (2) |
|
|
3 | (1) |
|
1.3 Limitations of File-Processing Systems |
|
|
3 | (3) |
|
1.4 The ANSI/SPARC Three-Schema Architecture |
|
|
6 | (4) |
|
1.4.1 Data Independence Defined |
|
|
8 | (2) |
|
1.5 Characteristics of Database Systems |
|
|
10 | (7) |
|
1.5.1 What Is a Database System? |
|
|
11 | (1) |
|
1.5.2 What Is a Database Management System? |
|
|
12 | (3) |
|
1.5.3 Advantages of Database Systems |
|
|
15 | (2) |
|
|
17 | (13) |
|
1.6.1 Data Models and Database Design |
|
|
17 | (2) |
|
1.6.2 Data Modeling and Database Design in a Nutshell |
|
|
19 | (6) |
|
|
25 | (1) |
|
|
25 | (5) |
|
Part I Conceptual Data Modeling |
|
|
|
Chapter 2 Foundation Concepts |
|
|
30 | (49) |
|
2.1 A Conceptual Modeling Framework |
|
|
30 | (1) |
|
2.2 ER Modeling Primitives |
|
|
30 | (2) |
|
2.3 Foundations of the ER Modeling Grammar |
|
|
32 | (47) |
|
2.3.1 Entity Types and Attributes |
|
|
32 | (3) |
|
2.3.2 Entity and Attribute-Level Data Integrity Constraints |
|
|
35 | (3) |
|
|
38 | (5) |
|
2.3.4 Structural Constraints of a Relationship Type |
|
|
43 | (9) |
|
2.3.5 Base Entity Types and Weak Entity Types |
|
|
52 | (5) |
|
2.3.6 Cluster Entity Type: A Brief Introduction |
|
|
57 | (1) |
|
2.3.7 Specification of Deletion Constraints |
|
|
58 | (12) |
|
|
70 | (1) |
|
|
71 | (8) |
|
Chapter 3 Entity-Relationship Modeling |
|
|
79 | (62) |
|
3.1 Bearcat Incorporated: A Case Study |
|
|
79 | (2) |
|
3.2 Applying the ER Modeling Grammar to the Conceptual Modeling Process |
|
|
81 | (38) |
|
3.2.1 The Presentation Layer ER Model |
|
|
82 | (3) |
|
3.2.2 The Presentation Layer ER Model for Bearcat Incorporated |
|
|
85 | (19) |
|
3.2.3 The Design-Specific ER Model |
|
|
104 | (7) |
|
3.2.4 The Decomposed Design-Specific ER Model |
|
|
111 | (8) |
|
|
119 | (22) |
|
|
120 | (7) |
|
|
127 | (7) |
|
|
134 | (1) |
|
|
134 | (7) |
|
Chapter 4 Enhanced Entity-Relationship (EER) Modeling |
|
|
141 | (56) |
|
4.1 Superclass/subclass Relationship |
|
|
142 | (26) |
|
4.1.1 A Motivating Exemplar |
|
|
142 | (1) |
|
4.1.2 Introduction to the Intra-Entity Class Relationship Type |
|
|
143 | (2) |
|
4.1.3 General Properties of a Superclass/subclass Relationship |
|
|
145 | (1) |
|
4.1.4 Specialization and Generalization |
|
|
146 | (8) |
|
4.1.5 Specialization Hierarchy and Specialization Lattice |
|
|
154 | (3) |
|
|
157 | (3) |
|
4.1.7 Choosing the Appropriate EER Construct |
|
|
160 | (6) |
|
|
166 | (2) |
|
4.2 Converting from the Presentation Layer to a Design-Specific EER Diagram |
|
|
168 | (2) |
|
4.3 Bearcat Incorporated Data Requirements Revisited |
|
|
170 | (1) |
|
4.4 ER Model for the Revised Story |
|
|
171 | (11) |
|
4.5 Deletion Rules for Intra-Entity Class Relationships |
|
|
182 | (15) |
|
|
188 | (1) |
|
|
188 | (9) |
|
Chapter 5 Modeling Complex Relationships |
|
|
197 | (83) |
|
5.1 The Ternary Relationship Type |
|
|
198 | (7) |
|
5.1.1 Vignette 1---Madeira College |
|
|
198 | (5) |
|
5.1.2 Vignette 2---Get Well Pharmacists, Inc |
|
|
203 | (2) |
|
5.2 Beyond the Ternary Relationship Type |
|
|
205 | (19) |
|
5.2.1 The Case for a Cluster Entity Type |
|
|
205 | (1) |
|
5.2.2 Vignette 3---More on Madeira College |
|
|
206 | (6) |
|
5.2.3 Vignette 4---A More Complex Entity Clustering |
|
|
212 | (1) |
|
5.2.4 Cluster Entity Type---Additional Examples |
|
|
212 | (4) |
|
5.2.5 Madeira College---The Rest of the Story |
|
|
216 | (5) |
|
5.2.6 Clustering a Recursive Relationship Type |
|
|
221 | (3) |
|
5.3 Inter-Relationship Integrity Constraint |
|
|
224 | (6) |
|
5.4 Composites of Weak Relationship Types |
|
|
230 | (4) |
|
5.4.1 Inclusion Dependency in Composite Relationship Types |
|
|
230 | (1) |
|
5.4.2 Exclusion Dependency in Composites of Weak Relationship Types |
|
|
231 | (3) |
|
5.5 Decomposition of Complex Relationship Constructs |
|
|
234 | (12) |
|
5.5.1 Decomposing Ternary and Higher-Order Relationship Types |
|
|
234 | (1) |
|
5.5.2 Decomposing a Relationship Type with a Multi-Valued Attribute |
|
|
235 | (5) |
|
5.5.3 Decomposing a Cluster Entity Type |
|
|
240 | (1) |
|
5.5.4 Decomposing Recursive Relationship Types |
|
|
241 | (3) |
|
5.5.5 Decomposing a Weak Relationship Type |
|
|
244 | (2) |
|
5.6 Validation of the Conceptual Design |
|
|
246 | (11) |
|
|
246 | (5) |
|
|
251 | (2) |
|
5.6.3 Miscellaneous Semantic Traps |
|
|
253 | (4) |
|
5.7 Cougar Medical Associates |
|
|
257 | (23) |
|
5.7.1 Conceptual Model for CMA: The Genesis |
|
|
259 | (6) |
|
5.7.2 Conceptual Model for CMA: The Next Generation |
|
|
265 | (1) |
|
5.7.3 The Design-Specific ER Model for CMA: The Final Frontier |
|
|
266 | (7) |
|
|
273 | (1) |
|
|
273 | (7) |
|
Part II Logical Data Modeling |
|
|
|
Chapter 6 The Relational Data Model |
|
|
280 | (78) |
|
|
280 | (2) |
|
6.2 Characteristics of a Relation |
|
|
282 | (1) |
|
6.3 Data Integrity Constraints |
|
|
283 | (8) |
|
6.3.1 The Concept of Unique Identifiers |
|
|
284 | (6) |
|
6.3.2 Referential Integrity Constraint in the Relational Data Model |
|
|
290 | (1) |
|
6.4 A Brief Introduction to Relational Algebra |
|
|
291 | (5) |
|
6.4.1 Unary Operations: Selection (α) and Projection (π) |
|
|
292 | (1) |
|
6.4.2 Binary Operations: Union (∪), Difference (-), and Intersection (∩) |
|
|
293 | (2) |
|
6.4.3 The Natural Join (*) Operation |
|
|
295 | (1) |
|
6.5 Views and Materialized Views in the Relational Data Model |
|
|
296 | (1) |
|
6.6 The Issue of Information Preservation |
|
|
297 | (1) |
|
6.7 Mapping an ER Model to a Logical Schema |
|
|
298 | (22) |
|
6.7.1 Information-Reducing Mapping of ER Constructs |
|
|
298 | (17) |
|
6.7.2 An Information-Preserving Mapping |
|
|
315 | (5) |
|
6.8 Mapping Enhanced ER Model Constructs to a Logical Schema |
|
|
320 | (16) |
|
6.8.1 Information-Reducing Mapping of EER Constructs |
|
|
321 | (7) |
|
6.8.2 Information-Preserving Grammar for Enhanced ER Modeling Constructs |
|
|
328 | (8) |
|
6.9 Mapping Complex ER Model Constructs to a Logical Schema |
|
|
336 | (22) |
|
|
345 | (2) |
|
|
347 | (11) |
|
|
|
Chapter 7 Functional Dependencies |
|
|
358 | (37) |
|
7.1 A Motivating Exemplar |
|
|
359 | (6) |
|
7.2 Functional Dependencies |
|
|
365 | (9) |
|
7.2.1 Definition of Functional Dependency |
|
|
365 | (1) |
|
7.2.2 Inference Rules for Functional Dependencies |
|
|
366 | (1) |
|
7.2.3 Minimal Cover for a Set of Functional Dependencies |
|
|
367 | (5) |
|
7.2.4 Closure of a Set of Attributes |
|
|
372 | (2) |
|
|
374 | (1) |
|
7.3 Candidate Keys Revisited |
|
|
374 | (21) |
|
7.3.1 Deriving Candidate Key(s) by Synthesis |
|
|
375 | (4) |
|
7.3.2 Deriving Candidate Keys by Decomposition |
|
|
379 | (3) |
|
7.3.3 Deriving a Candidate Key---Another Example |
|
|
382 | (4) |
|
7.3.4 Prime and Non-prime Attributes |
|
|
386 | (4) |
|
|
390 | (1) |
|
|
390 | (5) |
|
Chapter 8 Normal Forms Based on Functional Dependencies |
|
|
395 | (72) |
|
|
395 | (25) |
|
8.1.1 First Normal Form (1NF) |
|
|
396 | (2) |
|
8.1.2 Second Normal Form (2NF) |
|
|
398 | (3) |
|
8.1.3 Third Normal Form (3NF) |
|
|
401 | (3) |
|
8.1.4 Boyce-Codd Normal Form (BCNF) |
|
|
404 | (3) |
|
8.1.5 Side Effects of Normalization |
|
|
407 | (11) |
|
8.1.6 Summary Notes on Normal Forms |
|
|
418 | (2) |
|
8.2 The Motivating Exemplar Revisited |
|
|
420 | (4) |
|
8.3 A Comprehensive Approach to Normalization |
|
|
424 | (18) |
|
|
424 | (7) |
|
|
431 | (5) |
|
8.3.3 A Fast-Track Algorithm for a Non-Loss, Dependency-Preserving Solution |
|
|
436 | (6) |
|
|
442 | (1) |
|
8.5 Role of Reverse Engineering in Data Modeling |
|
|
443 | (24) |
|
8.5.1 Reverse Engineering the Normalized Solution of Case 1 |
|
|
445 | (6) |
|
8.5.2 Reverse Engineering the Normalized Solution of URS2 (Case 3) |
|
|
451 | (2) |
|
8.5.3 Reverse Engineering the Normalized Solution of URS3 (Case 2) |
|
|
453 | (4) |
|
|
457 | (1) |
|
|
458 | (9) |
|
Chapter 9 Higher Normal Forms |
|
|
467 | (39) |
|
9.1 Multi-Valued Dependency |
|
|
467 | (5) |
|
9.1.1 A Motivating Exemplar for Multi-Valued Dependency |
|
|
467 | (2) |
|
9.1.2 Multi-Valued Dependency Defined |
|
|
469 | (1) |
|
9.1.3 Inference Rules for Multi-Valued Dependencies |
|
|
470 | (2) |
|
9.2 Fourth Normal Form (4NF) |
|
|
472 | (4) |
|
9.3 Resolution of a 4NF Violation---A Comprehensive Example |
|
|
476 | (2) |
|
9.4 Generality of Multi-Valued Dependencies and 4NF |
|
|
478 | (2) |
|
9.5 Join-Dependencies and Fifth Normal Form (5NF) |
|
|
480 | (10) |
|
9.6 A Thought-Provoking Exemplar |
|
|
490 | (7) |
|
9.7 A Note on Domain Key Normal Form (DK/NF) |
|
|
497 | (9) |
|
|
498 | (1) |
|
|
498 | (8) |
|
Part IV Database Implementation Using the Relational Data Model |
|
|
|
Chapter 10 Database Creation |
|
|
506 | (33) |
|
10.1 Data Definition Using SQL |
|
|
507 | (17) |
|
10.1.1 Base Table Specification in SQL/DDL |
|
|
507 | (17) |
|
10.2 Data Population Using SQL |
|
|
524 | (15) |
|
10.2.1 The INSERT Statement |
|
|
525 | (3) |
|
10.2.2 The DELETE Statement |
|
|
528 | (2) |
|
10.2.3 The UPDATE Statement |
|
|
530 | (2) |
|
|
532 | (1) |
|
|
532 | (7) |
|
Chapter 11 Relational Algebra |
|
|
539 | (28) |
|
|
542 | (4) |
|
11.1.1 The Select Operator |
|
|
542 | (2) |
|
11.1.2 The Project Operator |
|
|
544 | (2) |
|
|
546 | (21) |
|
11.2.1 The Cartesian Product Operator |
|
|
546 | (3) |
|
11.2.2 Set Theoretic Operators |
|
|
549 | (2) |
|
|
551 | (6) |
|
11.2.4 The Divide Operator |
|
|
557 | (3) |
|
11.2.5 Additional Relational Operators |
|
|
560 | (3) |
|
|
563 | (1) |
|
|
563 | (4) |
|
Chapter 12 Structured Query Language (SQL) |
|
|
567 | (68) |
|
12.1 SQL Queries Based on a Single Table |
|
|
569 | (28) |
|
12.1.1 Examples of the Selection Operation |
|
|
569 | (3) |
|
12.1.2 Use of Comparison and Logical Operators |
|
|
572 | (6) |
|
12.1.3 Examples of the Projection Operation |
|
|
578 | (2) |
|
12.1.4 Grouping and Summarizing |
|
|
580 | (3) |
|
12.1.5 Handling Null Values |
|
|
583 | (10) |
|
12.1.6 Pattern Matching in SQL |
|
|
593 | (4) |
|
12.2 SQL Queries Based on Binary Operators |
|
|
597 | (16) |
|
12.2.1 The Cartesian Product Operation |
|
|
597 | (2) |
|
12.2.2 SQL Queries Involving Set Theoretic Operations |
|
|
599 | (3) |
|
|
602 | (6) |
|
12.2.4 Outer Join Operations |
|
|
608 | (4) |
|
12.2.5 SQL and the Semi-Join and Semi-Minus Operations |
|
|
612 | (1) |
|
|
613 | (22) |
|
12.3.1 Multiple-Row Uncorrelated Subqueries |
|
|
613 | (12) |
|
12.3.2 Multiple-Row Correlated Subqueries |
|
|
625 | (3) |
|
12.3.3 Aggregate Functions and Grouping |
|
|
628 | (3) |
|
|
631 | (1) |
|
|
631 | (4) |
|
Chapter 13 Advanced Data Manipulation Using SQL |
|
|
635 | (84) |
|
13.1 Selected SQL:2003 Built-in Functions |
|
|
635 | (16) |
|
13.1.1 The SUBSTRING Function |
|
|
636 | (3) |
|
13.1.2 The CIIAR_LENGTH (char) Function |
|
|
639 | (1) |
|
|
640 | (3) |
|
13.1.4 The TRANSLATE Function |
|
|
643 | (1) |
|
13.1.5 The POSITION Function |
|
|
644 | (1) |
|
13.1.6 Combining the INSTR and SUBSTR Functions |
|
|
645 | (1) |
|
13.1.7 The DECODE Function and the CASE Expression |
|
|
646 | (3) |
|
13.1.8 A Query to Simulate the Division Operation |
|
|
649 | (2) |
|
13.2 Some Brief Comments on Handling Dates and Times |
|
|
651 | (5) |
|
13.3 Hierarchical Queries |
|
|
656 | (12) |
|
13.3.1 Using the CONNECT BY and START WITH Clauses with the PRIOR Operator |
|
|
658 | (2) |
|
13.3.2 Using the LEVEL Pseudo-Column |
|
|
660 | (1) |
|
13.3.3 Formatting the Results from a Hierarchical Query |
|
|
661 | (1) |
|
13.3.4 Using a Subquery in a START WITH Clause |
|
|
661 | (2) |
|
13.3.5 The SYS_CONNECT_BY_PATH Function |
|
|
663 | (1) |
|
13.3.6 Joins in Hierarchical Queries |
|
|
664 | (1) |
|
13.3.7 Incorporating a Hierarchical Structure into a Table |
|
|
665 | (3) |
|
13.4 Extended GROUP BY Clauses |
|
|
668 | (13) |
|
13.4.1 The ROLLUP Operator |
|
|
668 | (1) |
|
13.4.2 Passing Multiple Columns to ROLLUP |
|
|
669 | (2) |
|
13.4.3 Changing the Position of Columns Passed to ROLLUP |
|
|
671 | (1) |
|
13.4.4 Using the CUBE Operator |
|
|
672 | (2) |
|
13.4.5 The GROUPING () Function |
|
|
674 | (2) |
|
13.4.6 The GROUPING SETS Extension to the GROUP BY Clause |
|
|
676 | (1) |
|
13.4.7 The GROUPING_ID () |
|
|
677 | (2) |
|
13.4.8 Using a Column Multiple Times in a GROUP BY Clause |
|
|
679 | (2) |
|
13.5 Using the Analytical Functions |
|
|
681 | (11) |
|
13.5.1 Analytical Function Types |
|
|
682 | (2) |
|
13.5.2 The RANK () and DENSE_RANK () Functions |
|
|
684 | (3) |
|
13.5.3 Using ROLLUP, CUBE, and GROUPING SETS Operators with Analytical Functions |
|
|
687 | (1) |
|
13.5.4 Using the Window Functions |
|
|
688 | (4) |
|
13.6 A Quick Look at the MODEL Clause |
|
|
692 | (8) |
|
13.6.1 MODEL Clause Concepts |
|
|
693 | (1) |
|
13.6.2 Basic Syntax of the MODEL Clause |
|
|
693 | (1) |
|
13.6.3 An Example of the MODEL Clause |
|
|
694 | (6) |
|
13.7 A Potpourri of Other SQL Queries |
|
|
700 | (19) |
|
13.7.1 Concluding Example 1 |
|
|
700 | (2) |
|
13.7.2 Concluding Example 2 |
|
|
702 | (2) |
|
13.7.3 Concluding Example 3 |
|
|
704 | (1) |
|
13.7.4 Concluding Example 4 |
|
|
704 | (1) |
|
13.7.5 Concluding Example 5 |
|
|
705 | (1) |
|
|
706 | (1) |
|
|
707 | (4) |
|
|
711 | (8) |
|
Appendix A Data Modeling Architectures Based on the Inverted Tree and Network Data Structures |
|
|
719 | (12) |
|
A.1 Logical Data Structures |
|
|
719 | (3) |
|
A.1.1 Inverted Tree Structure |
|
|
719 | (2) |
|
A.1.2 Network Data Structure |
|
|
721 | (1) |
|
A.2 Logical Data Model Architectures |
|
|
722 | (9) |
|
A.2.1 Hierarchical Data Model |
|
|
722 | (4) |
|
|
726 | (3) |
|
|
729 | (1) |
|
|
729 | (2) |
|
Appendix B Object-Oriented Data Modeling Architectures |
|
|
731 | (8) |
|
B.1 The Object-Oriented Data Model |
|
|
731 | (6) |
|
B.1.1 Overview of OO Concepts |
|
|
732 | (3) |
|
|
735 | (2) |
|
B.2 The Object-Relational Data Model |
|
|
737 | (2) |
|
|
738 | (1) |
|
|
738 | (1) |
Selected Bibliography |
|
739 | (4) |
Index |
|
743 | |