Database Systems
Database Systems
Nenad Jukic
Loyola University Chicago
Susan Vrbsky
The University of Alabama
Svetlozar Nestorov
University of Chicago
PEARSON
Boston Columbus Indianapolis New York San Francisco Upper Saddle River
Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto
Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo
CONTENTS
Preface xvii
Acknowledgments xxiii
Chapter 1 INTRODUCTION 1
Initial Terminology 1
Database Modeling 6
Database Implementation 6
Database Deployment 7
Database Use 7
Database Scope 8
Relational DBMS 10
Introduction 13
Entities 14
Relationships 15
Cardinality Constraints 15
Relationship Attributes 19
Composite Attributes 22
Multivalued Attributes 25
Derived Attribute 25
Optional Attribute 26
ix
Example: Entity Containing Various Types of Attributes 27
Weak Entity 30
Various ER Notations 39
Enhanced ER (EER) 40
Same Entities 40
Summary 50 •
Key Terms 52 • Review Questions 52 •
Introduction 57
Primary Key 59
Mapping Entities into Relations 59
Foreign Key 63
User-Defined Constraints 81
A Note About Mapping Associative Entities 83
A Note About
Mapping Ternary Relationships 84
A Note About Designer-Created Primary Keys and the Autonumber
Option 84
A Note About
Performing Both ER and Relational Modeling 85
Summary 87 •
Key Terms 88 • Review Questions 88 •
Update Operations 91
Update Anomalies 93
Example Scenario 93
Insertion Anomaly 95
Deletion Anomaly 95
Modification Anomaly 96
Functional Dependencies 97
Performance 115
Introduction 127
SELECT 134
WHERE 136
DISTINCT 137
ORDER BY 138
LIKE 139
GROUP BY 140
HAVING 144
IN 147
JOIN 148
Alias 151
UPDATE 153
DELETE 154
EXISTS 166
NOT 167
SQL Syntax Difference Note 1: DATE and TIME Data Types 170
Contents xiii
Introduction 177
Indexing 187
Integrated 213
Enterprise-Wide 213
Historical 213
ETL 216
Example 229
Cubes 254
Introduction 273
MOLAP 295
ROLAP 296
HOLAP 297
Introduction 301
Standards 308
Appendices
Glossary 361
Index 369