869
Fundamentals of Database Systems

Fundamentals of Database Systems Questions ... Chapter 3: Data Modeling Using the Entity-Relationship Model ... Preface . Fundamentals of Database Systems. Fundamentals of Database

Embed Size (px)

Citation preview

  • Fundamentals of Database Systems

  • Preface....................................................................................................................................................12

    Contents of This Edition.....................................................................................................................13 Guidelines for Using This Book.........................................................................................................14 Acknowledgments ..............................................................................................................................15

    Contents of This Edition.........................................................................................................................17 Guidelines for Using This Book.............................................................................................................19 Acknowledgments ..................................................................................................................................21 About the Authors ..................................................................................................................................22 Part 1: Basic Concepts............................................................................................................................23

    Chapter 1: Databases and Database Users..........................................................................................23 1.1 Introduction ..............................................................................................................................24 1.2 An Example ..............................................................................................................................25 1.3 Characteristics of the Database Approach ................................................................................26 1.4 Actors on the Scene ..................................................................................................................29 1.5 Workers behind the Scene ........................................................................................................30 1.6 Advantages of Using a DBMS .................................................................................................31 1.7 Implications of the Database Approach....................................................................................34 1.8 When Not to Use a DBMS .......................................................................................................35 1.9 Summary ..................................................................................................................................36 Review Questions...........................................................................................................................37 Exercises.........................................................................................................................................37 Selected Bibliography ....................................................................................................................37 Footnotes ........................................................................................................................................38

    Chapter 2: Database System Concepts and Architecture....................................................................38 2.1 Data Models, Schemas, and Instances ......................................................................................39 2.2 DBMS Architecture and Data Independence............................................................................41 2.3 Database Languages and Interfaces..........................................................................................43 2.4 The Database System Environment..........................................................................................45 2.5 Classification of Database Management Systems ....................................................................47 2.6 Summary ..................................................................................................................................49 Review Questions...........................................................................................................................49 Exercises.........................................................................................................................................50 Selected Bibliography ....................................................................................................................50 Footnotes ........................................................................................................................................50

    Chapter 3: Data Modeling Using the Entity-Relationship Model.......................................................52 3.1 Using High-Level Conceptual Data Models for Database Design ...........................................53 3.2 An Example Database Application...........................................................................................54 3.3 Entity Types, Entity Sets, Attributes, and Keys........................................................................55

    1 Page 2 of 893

  • 3.4 Relationships, Relationship Types, Roles, and Structural Constraints .....................................60 3.5 Weak Entity Types ...................................................................................................................64 3.6 Refining the ER Design for the COMPANY Database ............................................................65 3.7 ER Diagrams, Naming Conventions, and Design Issues ..........................................................66 3.8 Summary ..................................................................................................................................68 Review Questions...........................................................................................................................69 Exercises.........................................................................................................................................70 Selected Bibliography ....................................................................................................................72 Footnotes ........................................................................................................................................72

    Chapter 4: Enhanced Entity-Relationship and Object Modeling........................................................74 4.1 Subclasses, Superclasses, and Inheritance................................................................................75 4.2 Specialization and Generalization ............................................................................................76 4.3 Constraints and Characteristics of Specialization and Generalization......................................78 4.4 Modeling of UNION Types Using Categories .........................................................................82 4.5 An Example UNIVERSITY EER Schema and Formal Definitions for the EER Model..........84 4.6 Conceptual Object Modeling Using UML Class Diagrams......................................................86 4.7 Relationship Types of a Degree Higher Than Two ..................................................................88 4.8 Data Abstraction and Knowledge Representation Concepts ....................................................90 4.9 Summary ..................................................................................................................................93 Review Questions...........................................................................................................................93 Exercises.........................................................................................................................................94 Selected Bibliography ....................................................................................................................96 Footnotes ........................................................................................................................................97

    Chapter 5: Record Storage and Primary File Organizations.............................................................100 5.1 Introduction ............................................................................................................................101 5.2 Secondary Storage Devices ....................................................................................................103 5.3 Parallelizing Disk Access Using RAID Technology ..............................................................107 5.4 Buffering of Blocks ................................................................................................................111 5.5 Placing File Records on Disk .................................................................................................111 5.6 Operations on Files.................................................................................................................115 5.7 Files of Unordered Records (Heap Files) ...............................................................................117 5.8 Files of Ordered Records (Sorted Files) .................................................................................118 5.9 Hashing Techniques ...............................................................................................................120 5.10 Other Primary File Organizations.........................................................................................126 5.11 Summary...............................................................................................................................126 Review Questions.........................................................................................................................127 Exercises.......................................................................................................................................128 Selected Bibliography ..................................................................................................................131 Footnotes ......................................................................................................................................131

    Chapter 6: Index Structures for Files................................................................................................133

    1 Page 3 of 893

  • 6.1 Types of Single-Level Ordered Indexes .................................................................................134 6.2 Multilevel Indexes ..................................................................................................................139 6.3 Dynamic Multilevel Indexes Using B-Trees and B+-Trees....................................................142 6.4 Indexes on Multiple Keys.......................................................................................................153 6.5 Other Types of Indexes...........................................................................................................155 6.6 Summary ................................................................................................................................157 Review Questions.........................................................................................................................157 Exercises.......................................................................................................................................158 Selected Bibliography ..................................................................................................................160 Footnotes ......................................................................................................................................160

    Part 2: Relational Model, Languages, and Systems..............................................................................163 Chapter 7: The Relational Data Model, Relational Constraints, and the Relational Algebra...........163

    7.1 Relational Model Concepts ....................................................................................................164 7.2 Relational Constraints and Relational Database Schemas......................................................169 7.3 Update Operations and Dealing with Constraint Violations...................................................173 7.4 Basic Relational Algebra Operations......................................................................................176 7.5 Additional Relational Operations ...........................................................................................189 7.6 Examples of Queries in Relational Algebra ...........................................................................192 7.7 Summary ................................................................................................................................196 Review Questions.........................................................................................................................197 Exercises.......................................................................................................................................198 Selected Bibliography ..................................................................................................................202 Footnotes ......................................................................................................................................203

    Chapter 8: SQL - The Relational Database Standard .......................................................................205 8.1 Data Definition, Constraints, and Schema Changes in SQL2.................................................206 8.2 Basic Queries in SQL .............................................................................................................212 8.3 More Complex SQL Queries ..................................................................................................221 8.4 Insert, Delete, and Update Statements in SQL .......................................................................236 8.5 Views (Virtual Tables) in SQL...............................................................................................239 8.6 Specifying General Constraints as Assertions ........................................................................243 8.7 Additional Features of SQL....................................................................................................244 8.8 Summary ................................................................................................................................244 Review Questions.........................................................................................................................247 Exercises.......................................................................................................................................247 Selected Bibliography ..................................................................................................................249 Footnotes ......................................................................................................................................250

    Chapter 9: ER- and EER-to-Relational Mapping, and Other Relational Languages ........................252 9.1 Relational Database Design Using ER-to-Relational Mapping..............................................253 9.2 Mapping EER Model Concepts to Relations ..........................................................................257 9.3 The Tuple Relational Calculus ...............................................................................................260

    1 Page 4 of 893

  • 9.4 The Domain Relational Calculus............................................................................................271 9.5 Overview of the QBE Language.............................................................................................274 9.6 Summary ................................................................................................................................278 Review Questions.........................................................................................................................279 Exercises.......................................................................................................................................279 Selected Bibliography ..................................................................................................................280 Footnotes ......................................................................................................................................281

    Chapter 10: Examples of Relational Database Management Systems: Oracle and Microsoft Access..........................................................................................................................................................282

    10.1 Relational Database Management Systems: A Historical Perspective .................................283 10.2 The Basic Structure of the Oracle System ............................................................................284 10.3 Database Structure and Its Manipulation in Oracle ..............................................................287 10.4 Storage Organization in Oracle ............................................................................................291 10.5 Programming Oracle Applications .......................................................................................293 10.6 Oracle Tools .........................................................................................................................304 10.7 An Overview of Microsoft Access .......................................................................................304 10.8 Features and Functionality of Access ...................................................................................308 10.9 Summary...............................................................................................................................311 Selected Bibliography ..................................................................................................................312 Footnotes ......................................................................................................................................312

    Part 3: Object-Oriented and Extended Relational Database Technology .............................................316 Chapter 11: Concepts for Object-Oriented Databases ......................................................................316

    11.1 Overview of Object-Oriented Concepts ...............................................................................317 11.2 Object Identity, Object Structure, and Type Constructors....................................................319 11.3 Encapsulation of Operations, Methods, and Persistence ......................................................323 11.4 Type Hierarchies and Inheritance.........................................................................................325 11.5 Complex Objects ..................................................................................................................329 11.6 Other Objected-Oriented Concepts.......................................................................................331 11.7 Summary...............................................................................................................................333 Review Questions.........................................................................................................................334 Exercises.......................................................................................................................................334 Selected Bibliography ..................................................................................................................334 Footnotes ......................................................................................................................................335

    Chapter 12: Object Database Standards, Languages, and Design ....................................................339 12.1 Overview of the Object Model of ODMG............................................................................341 12.2 The Object Definition Language ..........................................................................................347 12.3 The Object Query Language.................................................................................................349 12.4 Overview of the C++ Language Binding..............................................................................359 12.5 Object Database Conceptual Design.....................................................................................361 12.6 Examples of ODBMSs .........................................................................................................364

    1 Page 5 of 893

  • 12.7 Overview of the CORBA Standard for Distributed Objects.................................................370 12.8 Summary...............................................................................................................................372 Review Questions.........................................................................................................................372 Exercises.......................................................................................................................................373 Selected Bibliography ..................................................................................................................373 Footnotes ......................................................................................................................................374

    Chapter 13: Object Relational and Extended Relational Database Systems.....................................379 13.1 Evolution and Current Trends of Database Technology.......................................................380 13.2 The Informix Universal Server.............................................................................................381 13.3 Object-Relational Features of Oracle 8 ................................................................................395 13.4 An Overview of SQL3..........................................................................................................399 13.5 Implementation and Related Issues for Extended Type Systems .........................................407 13.6 The Nested Relational Data Model.......................................................................................408 13.7 Summary...............................................................................................................................411 Selected Bibliography ..................................................................................................................411 Footnotes ......................................................................................................................................411

    Part 4: Database Design Theory and Methodology..............................................................................416 Chapter 14: Functional Dependencies and Normalization for Relational Databases .......................416

    14.1 Informal Design Guidelines for Relation Schemas ..............................................................417 14.2 Functional Dependencies......................................................................................................423 14.3 Normal Forms Based on Primary Keys ................................................................................429 14.4 General Definitions of Second and Third Normal Forms.....................................................434 14.5 Boyce-Codd Normal Form ...................................................................................................436 14.6 Summary...............................................................................................................................437 Review Questions.........................................................................................................................438 Exercises.......................................................................................................................................439 Selected Bibliography ..................................................................................................................442 Footnotes ......................................................................................................................................443

    Chapter 15: Relational Database Design Algorithms and Further Dependencies ............................445 15.1 Algorithms for Relational Database Schema Design............................................................446 15.2 Multivalued Dependencies and Fourth Normal Form ..........................................................455 15.3 Join Dependencies and Fifth Normal Form..........................................................................459 15.4 Inclusion Dependencies........................................................................................................460 15.5 Other Dependencies and Normal Forms...............................................................................462 15.6 Summary...............................................................................................................................463 Review Questions.........................................................................................................................463 Exercises.......................................................................................................................................464 Selected Bibliography ..................................................................................................................465 Footnotes ......................................................................................................................................465

    Chapter 16: Practical Database Design and Tuning .........................................................................467

    1 Page 6 of 893

  • 16.1 The Role of Information Systems in Organizations .............................................................468 16.2 The Database Design Process...............................................................................................471 16.3 Physical Database Design in Relational Databases ..............................................................483 16.4 An Overview of Database Tuning in Relational Systems.....................................................486 16.5 Automated Design Tools ......................................................................................................493 16.6 Summary...............................................................................................................................495 Review Questions.........................................................................................................................495 Selected Bibliography ..................................................................................................................496 Footnotes ......................................................................................................................................497

    Part 5: System Implementation Techniques .........................................................................................501 Chapter 17: Database System Architectures and the System Catalog ..............................................501

    17.1 System Architectures for DBMSs ........................................................................................502 17.2 Catalogs for Relational DBMSs ...........................................................................................504 17.3 System Catalog Information in ORACLE............................................................................506 17.4 Other Catalog Information Accessed by DBMS Software Modules ....................................509 17.5 Data Dictionary and Data Repository Systems.....................................................................510 17.6 Summary...............................................................................................................................510 Review Questions.........................................................................................................................510 Exercises.......................................................................................................................................511 Selected Bibliography ..................................................................................................................511 Footnotes ......................................................................................................................................511

    Chapter 18: Query Processing and Optimization .............................................................................512 18.1 Translating SQL Queries into Relational Algebra................................................................514 18.2 Basic Algorithms for Executing Query Operations ..............................................................515 18.3 Using Heuristics in Query Optimization ..............................................................................528 18.4 Using Selectivity and Cost Estimates in Query Optimization ..............................................534 18.5 Overview of Query Optimization in ORACLE ....................................................................543 18.6 Semantic Query Optimization ..............................................................................................544 18.7 Summary...............................................................................................................................544 Review Questions.........................................................................................................................545 Exercises.......................................................................................................................................545 Selected Bibliography ..................................................................................................................546 Footnotes ......................................................................................................................................547

    Chapter 19: Transaction Processing Concepts..................................................................................551 19.1 Introduction to Transaction Processing ................................................................................551 19.2 Transaction and System Concepts ........................................................................................556 19.3 Desirable Properties of Transactions ....................................................................................558 19.4 Schedules and Recoverability...............................................................................................559 19.5 Serializability of Schedules ..................................................................................................562 19.6 Transaction Support in SQL .................................................................................................568

    1 Page 7 of 893

  • 19.7 Summary...............................................................................................................................570 Review Questions.........................................................................................................................571 Exercises.......................................................................................................................................571 Selected Bibliography ..................................................................................................................573 Footnotes ......................................................................................................................................573

    Chapter 20: Concurrency Control Techniques .................................................................................575 20.1 Locking Techniques for Concurrency Control .....................................................................576 20.2 Concurrency Control Based on Timestamp Ordering...........................................................583 20.3 Multiversion Concurrency Control Techniques....................................................................585 20.4 Validation (Optimistic) Concurrency Control Techniques...................................................587 20.5 Granularity of Data Items and Multiple Granularity Locking ..............................................588 20.6 Using Locks for Concurrency Control in Indexes ................................................................591 20.7 Other Concurrency Control Issues........................................................................................592 20.8 Summary...............................................................................................................................593 Review Questions.........................................................................................................................594 Exercises.......................................................................................................................................595 Selected Bibliography ..................................................................................................................595 Footnotes ......................................................................................................................................596

    Chapter 21: Database Recovery Techniques ....................................................................................597 21.1 Recovery Concepts ...............................................................................................................597 21.2 Recovery Techniques Based on Deferred Update ................................................................601 21.3 Recovery Techniques Based on Immediate Update .............................................................605 21.4 Shadow Paging .....................................................................................................................606 21.5 The ARIES Recovery Algorithm..........................................................................................607 21.6 Recovery in Multidatabase Systems .....................................................................................609 21.7 Database Backup and Recovery from Catastrophic Failures................................................610 21.8 Summary...............................................................................................................................611 Review Questions.........................................................................................................................611 Exercises.......................................................................................................................................612 Selected Bibliography ..................................................................................................................614 Footnotes ......................................................................................................................................615

    Chapter 22: Database Security and Authorization............................................................................616 22.1 Introduction to Database Security Issues..............................................................................616 22.2 Discretionary Access Control Based on Granting/Revoking of Privileges...........................619 22.3 Mandatory Access Control for Multilevel Security..............................................................624 22.4 Introduction to Statistical Database Security........................................................................626 22.5 Summary...............................................................................................................................627 Review Questions.........................................................................................................................627 Exercises.......................................................................................................................................628 Selected Bibliography ..................................................................................................................628

    1 Page 8 of 893

  • Footnotes ......................................................................................................................................629 Part 6: Advanced Database Concepts & Emerging Applications .........................................................630

    Chapter 23: Enhanced Data Models for Advanced Applications .....................................................630 23.1 Active Database Concepts ....................................................................................................631 23.2 Temporal Database Concepts ...............................................................................................637 23.3 Spatial and Multimedia Databases........................................................................................647 23.4 Summary...............................................................................................................................649 Review Questions.........................................................................................................................650 Exercises.......................................................................................................................................651 Selected Bibliography ..................................................................................................................652 Footnotes ......................................................................................................................................652

    Chapter 24: Distributed Databases and Client-Server Architecture .................................................656 24.1 Distributed Database Concepts.............................................................................................657 24.2 Data Fragmentation, Replication, and Allocation Techniques for Distributed Database Design......................................................................................................................................................660 24.3 Types of Distributed Database Systems ...............................................................................664 24.4 Query Processing in Distributed Databases..........................................................................666 24.5 Overview of Concurrency Control and Recovery in Distributed Databases ........................671 24.6 An Overview of Client-Server Architecture and Its Relationship to Distributed Databases 674 24.7 Distributed Databases in Oracle ...........................................................................................675 24.8 Future Prospects of Client-Server Technology.....................................................................677 24.9 Summary...............................................................................................................................678 Review Questions.........................................................................................................................678 Exercises.......................................................................................................................................679 Selected Bibliography ..................................................................................................................681 Footnotes ......................................................................................................................................682

    Chapter 25: Deductive Databases.....................................................................................................683 25.1 Introduction to Deductive Databases....................................................................................684 25.2 Prolog/Datalog Notation.......................................................................................................685 25.3 Interpretations of Rules ........................................................................................................689 25.4 Basic Inference Mechanisms for Logic Programs ................................................................691 25.5 Datalog Programs and Their Evaluation...............................................................................693 25.6 Deductive Database Systems................................................................................................709 25.7 Deductive Object-Oriented Databases..................................................................................713 25.8 Applications of Commercial Deductive Database Systems..................................................715 25.9 Summary...............................................................................................................................717 Exercises.......................................................................................................................................717 Selected Bibliography ..................................................................................................................721 Footnotes ......................................................................................................................................722

    Chapter 26: Data Warehousing And Data Mining............................................................................723

    1 Page 9 of 893

  • 26.1 Data Warehousing ................................................................................................................723 26.2 Data Mining..........................................................................................................................732 26.3 Summary...............................................................................................................................746 Review Exercises..........................................................................................................................747 Selected Bibliography ..................................................................................................................748 Footnotes ......................................................................................................................................748

    Chapter 27: Emerging Database Technologies and Applications.....................................................750 27.1 Databases on the World Wide Web......................................................................................751 27.2 Multimedia Databases ..........................................................................................................755 27.3 Mobile Databases .................................................................................................................760 27.4 Geographic Information Systems .........................................................................................764 27.5 Genome Data Management ..................................................................................................770 27.6 Digital Libraries....................................................................................................................776 Footnotes ......................................................................................................................................778

    Appendix A: Alternative Diagrammatic Notations ..............................................................................780 Appendix B: Parameters of Disks ........................................................................................................782 Appendix C: An Overview of the Network Data Model ......................................................................786

    C.1 Network Data Modeling Concepts.........................................................................................786 C.2 Constraints in the Network Model .........................................................................................791 C.3 Data Manipulation in a Network Database ............................................................................795 C.4 Network Data Manipulation Language..................................................................................796 Selected Bibliography ..................................................................................................................803 Footnotes ......................................................................................................................................803

    Appendix D: An Overview of the Hierarchical Data Model ................................................................805 D.1 Hierarchical Database Structures...........................................................................................805 D.2 Integrity Constraints and Data Definition in the Hierarchical Model ....................................810 D.3 Data Manipulation Language for the Hierarchical Model .....................................................811 Selected Bibliography ..................................................................................................................816 Footnotes ......................................................................................................................................816

    Selected Bibliography ..........................................................................................................................818 Format for Bibliographic Citations...................................................................................................819 Bibliographic References .................................................................................................................819

    A ...................................................................................................................................................820 B ...................................................................................................................................................822 C ...................................................................................................................................................826 D ...................................................................................................................................................831 E ...................................................................................................................................................833 F....................................................................................................................................................836 G ...................................................................................................................................................837 H ...................................................................................................................................................839

    1 Page 10 of 893

  • I.....................................................................................................................................................841 J ....................................................................................................................................................842 K ...................................................................................................................................................843 L ...................................................................................................................................................846 M ..................................................................................................................................................848 N ...................................................................................................................................................850 O ...................................................................................................................................................852 P....................................................................................................................................................853 R ...................................................................................................................................................854 S....................................................................................................................................................855 T ...................................................................................................................................................861 U ...................................................................................................................................................861 UUV...................................................................................................................................................862 W ..................................................................................................................................................864 Y ...................................................................................................................................................866 Z ...................................................................................................................................................866

    Copyright Information..........................................................................................................................868

    1 Page 11 of 893

  • Preface (Fundamentals of Database Systems, Third Edition)

    Contents of This Edition Guidelines for Using This Book Acknowledgments

    This book introduces the fundamental concepts necessary for designing, using, and implementing database systems and applications. Our presentation stresses the fundamentals of database modeling and design, the languages and facilities provided by database management systems, and system implementation techniques. The book is meant to be used as a textbook for a one- or two-semester course in database systems at the junior, senior, or graduate level, and as a reference book. We assume that readers are familiar with elementary programming and data-structuring concepts and that they have had some exposure to basic computer organization.

    We start in Part 1 with an introduction and a presentation of the basic concepts from both ends of the database spectrumconceptual modeling principles and physical file storage techniques. We conclude the book in Part 6 with an introduction to influential new database models, such as active, temporal, and deductive models, along with an overview of emerging technologies and applications, such as data mining, data warehousing, and Web databases. Along the wayin Part 2 through Part 5we provide an indepth treatment of the most important aspects of database fundamentals.

    The following key features are included in the third edition:

    The entire book has a self-contained, flexible organization that can be tailored to individual needs.

    Complete and updated coverage is provided on the relational modelincluding new material on Oracle and Microsoft Access as examples of relational systemsin Part 2.

    A comprehensive new introduction is provided on object databases and object-relational systems in Part 3, including the ODMG object model and the OQL query language, as well as an overview of object-relational features of SQL3, INFORMIX, and ORACLE 8.

    Updated coverage of EER conceptual modeling has been moved to Chapter 4 to follow the basic ER modeling in Chapter 3, and includes a new section on notation for UML class diagrams.

    Two examples running throughout the bookcalled COMPANY and UNIVERSITYallow the reader to compare different approaches that use the same application.

    Coverage has been updated on database design, including conceptual design, normalization techniques, physical design, and database tuning.

    1 Page 12 of 893

  • The chapters on DBMS system implementation concepts, including catalog, query processing, concurrency control, recovery, and security, now include sections on how these concepts are implemented in real systems.

    New sections with examples on client-server architecture, active databases, temporal databases, and spatial databases have been added.

    There is updated coverage of recent advances in decision support applications of databases, including overviews of data warehousing/OLAP, and data mining.

    State-of-the-art coverage is provided on new database technologies, including Web, mobile, and multimedia databases.

    There is a focus on important new application areas of databases at the turn of the millennium: geographic databases, genome databases, and digital libraries.

    Contents of This Edition Part 1 describes the basic concepts necessary for a good understanding of database design and implementation, as well as the conceptual modeling techniques used in database systems. Chapter 1 and Chapter 2 introduce databases, their typical users, and DBMS concepts, terminology, and architecture. In Chapter 3, the concepts of the Entity-Relationship (ER) model and ER diagrams are presented and used to illustrate conceptual database design. Chapter 4 focuses on data abstraction and semantic data modeling concepts, and extends the ER model to incorporate these ideas, leading to the enhanced-ER (EER) data model and EER diagrams. The concepts presented include subclasses, specialization, generalization, and union types (categories). The notation for the class diagrams of UML are also introduced. These are similar to EER diagrams and are used increasingly in conceptual object modeling. Part 1 concludes with a description of the physical file structures and access methods used in database systems. Chapter 5 describes the primary methods of organizing files of records on disk, including static and dynamic hashing. Chapter 6 describes indexing techniques for files, including B-tree and B+-tree data structures and grid files.

    Part 2 describes the relational data model and relational DBMSs. Chapter 7 describes the basic relational model, its integrity constraints and update operations, and the operations of the relational algebra. Chapter 8 gives a detailed overview of the SQL language, covering the SQL2 standard, which is implemented in most relational systems. Chapter 9 begins with two sections that describe relational schema design, starting from a conceptual database design in an ER or EER model, and concludes with three sections introducing the formal relational calculus languages and an overview of the QBE language. Chapter 10 presents overviews of the Oracle and Microsoft Access database systems as examples of popular commercial relational database management systems.

    Part 3 gives a comprehensive introduction to object databases and object-relational systems. Chapter 11 introduces object-oriented concepts and how they apply to object databases. Chapter 12 gives a detailed overview of the ODMG object model and its associated ODL and OQL languages, and gives examples of two commercial object DBMSs. Chapter 13 describes how relational databases are being extended to include object-oriented concepts and presents the features of two object-relational systemsInformix Universal Server and ORACLE 8, as well as giving an overview of some of the features of the proposed SQL3 standard, and the nested relational data model.

    Part 4 covers several topics related to database design. Chapter 14 and Chapter 15 cover the formalisms, theory, and algorithms developed for relational database design by normalization. This material includes functional and other types of dependencies and normal forms for relations. Step by step intuitive normalization is presented in Chapter 14, and relational design algorithms are given in Chapter 15, which also defines other types of dependencies, such as multivalued and join dependencies. Chapter 16 presents an overview of the different phases of the database design process for medium-sized and large applications, and it also discusses physical database design issues and includes a discussion on database tuning.

    1 Page 13 of 893

  • Part 5 discusses the techniques used in implementing database management systems. Chapter 17 introduces DBMS system architectures, including centralized and client-server architectures, then describes the system catalog, which is a vital part of any DBMS. Chapter 18 presents the techniques used for processing and optimizing queries specified in a high-level database languagesuch as SQLand discusses various algorithms for implementing relational database operations. A section on query optimization in ORACLE has been added. Chapter 19, Chapter 20 and Chapter 21 discuss transaction processing, concurrency control, and recovery techniquesthis material has been revised to include discussions of how these concepts are realized in SQL. Chapter 22 discusses database security and authorization techniques.

    Part 6 covers a number of advanced topics. Chapter 23 gives detailed introductions to the concepts of active and temporal databaseswhich are increasingly being incorporated into database applicationsand also gives an overview of spatial and multimedia database concepts. Chapter 24 discusses distributed databases, issues for design, query and transaction processing with data distribution, and the different types of client-server architectures. Chapter 25 introduces the concepts of deductive database systems and surveys a few implementations. Chapter 26 discusses the new technologies of data warehousing and data mining for decision support applications. Chapter 27 surveys the new trends in database technology including Web, mobile and multimedia databases and overviews important emerging applications of databases: geographic information systems (GIS), human genome databases, and digital libraries.

    Appendix A gives a number of alternative diagrammatic notations for displaying a conceptual ER or EER schema. These may be substituted for the notation we use, if the instructor so wishes. Appendix B gives some important physical parameters of disks. Appendix C and Appendix D cover legacy database systems, based on the network and hierarchical database models. These have been used for over 30 years as a basis for many existing commercial database applications and transaction-processing systems and will take decades to replace completely. We consider it important to expose students of database management to these long-standing approaches. Full chapters from the second edition can be found at the Website for this edition.

    Guidelines for Using This Book There are many different ways to teach a database course. The chapters in Part 1, Part 2 and Part 3 can be used in an introductory course on database systems in the order they are given or in the preferred order of each individual instructor. Selected chapters and sections may be left out, and the instructor can add other chapters from the rest of the book, depending on the emphasis of the course. At the end of each chapters opening section, we list sections that are candidates for being left out whenever a less detailed discussion of the topic in a particular chapter is desired. We suggest covering up to Chapter 14 in an introductory database course and including selected parts of Chapter 11, Chapter 12 and Chapter 13, depending on the background of the students and the desired coverage of the object model. For an emphasis on system implementation techniques, selected chapters from Part 5 can be included. For an emphasis on database design, further chapters from Part 4 can be used.

    Chapter 3 and Chapter 4, which cover conceptual modeling using the ER and EER models, are important for a good conceptual understanding of databases. However, they may be partially covered, covered later in a course, or even left out if the emphasis is on DBMS implementation. Chapter 5 and Chapter 6 on file organizations and indexing may also be covered early on, later, or even left out if the emphasis is on database models and languages. For students who have already taken a course on file organization, parts of these chapters could be assigned as reading material or some exercises may be assigned to review the concepts.

    Chapter 10 and Chapter 13 include material specific to commercial relational database management systems (RDBMSs)ORACLE, Microsoft Access, and Informix. Because of the constant revision of these products, no exercises have been assigned in these chapters. Depending on local availability of RDBMSs, material from these chapters may be used in projects. A total life-cycle database design and

    1 Page 14 of 893

  • implementation project covers conceptual design (Chapter 3 and Chapter 4), data model mapping (Chapter 9), normalization (Chapter 14), and implementation in SQL (Chapter 8). Additional documentation on the specific RDBMS would be required.

    The book has been written so that it is possible to cover topics in a variety of orders. The chart included here shows the major dependencies between chapters. As the diagram illustrates, it is possible to start with several different topics following the first two introductory chapters. Although the chart may seem complex, it is important to note that if the chapters are covered in order, the dependencies are not lost. The chart can be consulted by instructors wishing to use an alternative order of presentation.

    For a single-semester course based on this book, some chapters can be assigned as reading material. Chapter 5, Chapter 6, Chapter 16, Chapter 17, Chapter 26, and Chapter 27 can be considered for such an assignment. The book can also be used for a two-semester sequence. The first course, "Introduction to Database Design/Systems," at the sophomore, junior, or senior level, could cover most of Chapter 1 to Chapter 15. The second course, "Database Design and Implementation Techniques," at the senior or first-year graduate level, can cover Part 4, Part 5 and Part 6. Chapters from Part 6 can be used selectively in either semester, and material describing the DBMS available to the students at the local institution can be covered in addition to the material in the book. Part 6 can also serve as introductory material for advanced database courses, in conjunction with additional assigned readings.

    Acknowledgments It is a great pleasure for us to acknowledge the assistance and contributions of a large number of individuals to this effort. First, we would like to thank our editors, Maite Suarez-Rivas, Katherine Harutunian, Patricia Unubun, and Bob Woodbury. In particular we would like to acknowledge the efforts and help of Katherine Harutunian, our primary contact for the third edition. We would like to acknowledge also those persons who have contributed to the third edition and suggested various improvements to the second edition. Suzanne Dietrich wrote parts of Chapter 10 and Chapter 12, and Ed Omiecinski contributed to Chapter 17Chapter 21. We appreciated the contributions of the following reviewers: Franois Banilhon, Jose Blakeley, Rick Cattell, Suzanne Dietrich, David W. Embley, Henry A. Etlinger, Leonidas Fegaras, Farshad Fotouhi, Michael Franklin, Goetz Graefe, Richard Hull, Sushil Jajodia, Ramesh K. Karne, Vijay Kumar, Tarcisio Lima, Ramon A. Mata-Toledo, Dennis McLeod, Rokia Missaoui, Ed Omiecinski, Joan Peckham, Betty Salzberg, Ming-Chien Shan, Junping Sun, Rajshekhar Sunderraman, and Emilia E. Villarreal. In particular, Henry A. Etlinger, Leonidas Fegaras, and Emilla E. Villareal reviewed the entire book.

    Sham Navathe would like to acknowledge the substantial contributions of his students Sreejith Gopinath (Chapter 10, Chapter 24), Harish Kotbagi (Chapter 25), Jack McCaw (Chapter 26, Chapter 27), and Magdi Morsi (Chapter 13). Help on this revision from Rafi Ahmed, Ann Chervenak, Dan Forsyth, M. Narayanaswamy, Carlos Ordonez, and Aravindan Veerasamy has been valuable. Gwen Baker, Amol Navathe, and Aditya Nawathe helped with the manuscript in many ways. Ramez Emasri would like to thank Katrina, Riyad, and Thomas Elmasri for their help with the index and his students at the University of Texas for their comments on the manuscript. We would also like to acknowledge the students at the University of Texas at Arlington and the Georgia Institute of Technology who used drafts of the new material in the third edition.

    1 Page 15 of 893

  • We would like to repeat our thanks to those who have reviewed and contributed to both previous editions of Fundamentals of Database Systems. For the first edition these individuals include Alan Apt (editor), Don Batory, Scott Downing, Dennis Heimbigner, Julia Hodges, Yannis Ioannidis, Jim Larson, Dennis McLeod, Per-Ake Larson, Rahul Patel, Nicholas Roussopoulos, David Stemple, Michael Stonebraker, Frank Tompa, and Kyu-Young Whang; for the second edition they include Dan Joraanstad (editor), Rafi Ahmed, Antonio Albano, David Beech, Jose Blakeley, Panos Chrysanthis, Suzanne Dietrich, Vic Ghorpadey, Goetz Graefe, Eric Hanson, Junguk L. Kim, Roger King, Vram Kouramajian, Vijay Kumar, John Lowther, Sanjay Manchanda, Toshimi Minoura, Inderpal Mumick, Ed Omiecinski, Girish Pathak, Raghu Ramakrishnan, Ed Robertson, Eugene Sheng, David Stotts, Marianne Winslett, and Stan Zdonick.

    Last but not least, we gratefully acknowledge the support, encouragement, and patience of our families.

    R.E.

    S.B.N.

    Copyright 2000 by Ramez Elmasri and Shamkant B. Navathe

    1 Page 16 of 893

  • Contents of This Edition (Fundamentals of Database Systems, Third Edition) Part 1 describes the basic concepts necessary for a good understanding of database design and implementation, as well as the conceptual modeling techniques used in database systems. Chapter 1 and Chapter 2 introduce databases, their typical users, and DBMS concepts, terminology, and architecture. In Chapter 3, the concepts of the Entity-Relationship (ER) model and ER diagrams are presented and used to illustrate conceptual database design. Chapter 4 focuses on data abstraction and semantic data modeling concepts, and extends the ER model to incorporate these ideas, leading to the enhanced-ER (EER) data model and EER diagrams. The concepts presented include subclasses, specialization, generalization, and union types (categories). The notation for the class diagrams of UML are also introduced. These are similar to EER diagrams and are used increasingly in conceptual object modeling. Part 1 concludes with a description of the physical file structures and access methods used in database systems. Chapter 5 describes the primary methods of organizing files of records on disk, including static and dynamic hashing. Chapter 6 describes indexing techniques for files, including B-tree and B+-tree data structures and grid files.

    Part 2 describes the relational data model and relational DBMSs. Chapter 7 describes the basic relational model, its integrity constraints and update operations, and the operations of the relational algebra. Chapter 8 gives a detailed overview of the SQL language, covering the SQL2 standard, which is implemented in most relational systems. Chapter 9 begins with two sections that describe relational schema design, starting from a conceptual database design in an ER or EER model, and concludes with three sections introducing the formal relational calculus languages and an overview of the QBE language. Chapter 10 presents overviews of the Oracle and Microsoft Access database systems as examples of popular commercial relational database management systems.

    Part 3 gives a comprehensive introduction to object databases and object-relational systems. Chapter 11 introduces object-oriented concepts and how they apply to object databases. Chapter 12 gives a detailed overview of the ODMG object model and its associated ODL and OQL languages, and gives examples of two commercial object DBMSs. Chapter 13 describes how relational databases are being extended to include object-oriented concepts and presents the features of two object-relational systemsInformix Universal Server and ORACLE 8, as well as giving an overview of some of the features of the proposed SQL3 standard, and the nested relational data model.

    Part 4 covers several topics related to database design. Chapter 14 and Chapter 15 cover the formalisms, theory, and algorithms developed for relational database design by normalization. This material includes functional and other types of dependencies and normal forms for relations. Step by step intuitive normalization is presented in Chapter 14, and relational design algorithms are given in Chapter 15, which also defines other types of dependencies, such as multivalued and join dependencies. Chapter 16 presents an overview of the different phases of the database design process for medium-sized and large applications, and it also discusses physical database design issues and includes a discussion on database tuning.

    Part 5 discusses the techniques used in implementing database management systems. Chapter 17 introduces DBMS system architectures, including centralized and client-server architectures, then describes the system catalog, which is a vital part of any DBMS. Chapter 18 presents the techniques used for processing and optimizing queries specified in a high-level database languagesuch as SQLand discusses various algorithms for implementing relational database operations. A section on query optimization in ORACLE has been added. Chapter 19, Chapter 20 and Chapter 21 discuss transaction processing, concurrency control, and recovery techniquesthis material has been revised to include discussions of how these concepts are realized in SQL. Chapter 22 discusses database security and authorization techniques.

    1 Page 17 of 893

  • Part 6 covers a number of advanced topics. Chapter 23 gives detailed introductions to the concepts of active and temporal databaseswhich are increasingly being incorporated into database applicationsand also gives an overview of spatial and multimedia database concepts. Chapter 24 discusses distributed databases, issues for design, query and transaction processing with data distribution, and the different types of client-server architectures. Chapter 25 introduces the concepts of deductive database systems and surveys a few implementations. Chapter 26 discusses the new technologies of data warehousing and data mining for decision support applications. Chapter 27 surveys the new trends in database technology including Web, mobile and multimedia databases and overviews important emerging applications of databases: geographic information systems (GIS), human genome databases, and digital libraries.

    Appendix A gives a number of alternative diagrammatic notations for displaying a conceptual ER or EER schema. These may be substituted for the notation we use, if the instructor so wishes. Appendix B gives some important physical parameters of disks. Appendix C and Appendix D cover legacy database systems, based on the network and hierarchical database models. These have been used for over 30 years as a basis for many existing commercial database applications and transaction-processing systems and will take decades to replace completely. We consider it important to expose students of database management to these long-standing approaches. Full chapters from the second edition can be found at the Website for this edition.

    Copyright 2000 by Ramez Elmasri and Shamkant B. Navathe

    1 Page 18 of 893

  • Guidelines for Using This Book (Fundamentals of Database Systems, Third Edition) There are many different ways to teach a database course. The chapters in Part 1, Part 2 and Part 3 can be used in an introductory course on database systems in the order they are given or in the preferred order of each individual instructor. Selected chapters and sections may be left out, and the instructor can add other chapters from the rest of the book, depending on the emphasis of the course. At the end of each chapters opening section, we list sections that are candidates for being left out whenever a less detailed discussion of the topic in a particular chapter is desired. We suggest covering up to Chapter 14 in an introductory database course and including selected parts of Chapter 11, Chapter 12 and Chapter 13, depending on the background of the students and the desired coverage of the object model. For an emphasis on system implementation techniques, selected chapters from Part 5 can be included. For an emphasis on database design, further chapters from Part 4 can be used.

    Chapter 3 and Chapter 4, which cover conceptual modeling using the ER and EER models, are important for a good conceptual understanding of databases. However, they may be partially covered, covered later in a course, or even left out if the emphasis is on DBMS implementation. Chapter 5 and Chapter 6 on file organizations and indexing may also be covered early on, later, or even left out if the emphasis is on database models and languages. For students who have already taken a course on file organization, parts of these chapters could be assigned as reading material or some exercises may be assigned to review the concepts.

    Chapter 10 and Chapter 13 include material specific to commercial relational database management systems (RDBMSs)ORACLE, Microsoft Access, and Informix. Because of the constant revision of these products, no exercises have been assigned in these chapters. Depending on local availability of RDBMSs, material from these chapters may be used in projects. A total life-cycle database design and implementation project covers conceptual design (Chapter 3 and Chapter 4), data model mapping (Chapter 9), normalization (Chapter 14), and implementation in SQL (Chapter 8). Additional documentation on the specific RDBMS would be required.

    The book has been written so that it is possible to cover topics in a variety of orders. The chart included here shows the major dependencies between chapters. As the diagram illustrates, it is possible to start with several different topics following the first two introductory chapters. Although the chart may seem complex, it is important to note that if the chapters are covered in order, the dependencies are not lost. The chart can be consulted by instructors wishing to use an alternative order of presentation.

    For a single-semester course based on this book, some chapters can be assigned as reading material. Chapter 5, Chapter 6, Chapter 16, Chapter 17, Chapter 26, and Chapter 27 can be considered for such an assignment. The book can also be used for a two-semester sequence. The first course, "Introduction to Database Design/Systems," at the sophomore, junior, or senior level, could cover most of Chapter 1 to Chapter 15. The second course, "Database Design and Implementation Techniques," at the senior or first-year graduate level, can cover Part 4, Part 5 and Part 6. Chapters from Part 6 can be used selectively in either semester, and material describing the DBMS available to the students at the local institution can be covered in addition to the material in the book. Part 6 can also serve as introductory material for advanced database courses, in conjunction with additional assigned readings.

    1 Page 19 of 893

  • Copyright 2000 by Ramez Elmasri and Shamkant B. Navathe

    1 Page 20 of 893

  • Acknowledgments (Fundamentals of Database Systems, Third Edition) It is a great pleasure for us to acknowledge the assistance and contributions of a large number of individuals to this effort. First, we would like to thank our editors, Maite Suarez-Rivas, Katherine Harutunian, Patricia Unubun, and Bob Woodbury. In particular we would like to acknowledge the efforts and help of Katherine Harutunian, our primary contact for the third edition. We would like to acknowledge also those persons who have contributed to the third edition and suggested various improvements to the second edition. Suzanne Dietrich wrote parts of Chapter 10 and Chapter 12, and Ed Omiecinski contributed to Chapter 17Chapter 21. We appreciated the contributions of the following reviewers: Franois Banilhon, Jose Blakeley, Rick Cattell, Suzanne Dietrich, David W. Embley, Henry A. Etlinger, Leonidas Fegaras, Farshad Fotouhi, Michael Franklin, Goetz Graefe, Richard Hull, Sushil Jajodia, Ramesh K. Karne, Vijay Kumar, Tarcisio Lima, Ramon A. Mata-Toledo, Dennis McLeod, Rokia Missaoui, Ed Omiecinski, Joan Peckham, Betty Salzberg, Ming-Chien Shan, Junping Sun, Rajshekhar Sunderraman, and Emilia E. Villarreal. In particular, Henry A. Etlinger, Leonidas Fegaras, and Emilla E. Villareal reviewed the entire book.

    Sham Navathe would like to acknowledge the substantial contributions of his students Sreejith Gopinath (Chapter 10, Chapter 24), Harish Kotbagi (Chapter 25), Jack McCaw (Chapter 26, Chapter 27), and Magdi Morsi (Chapter 13). Help on this revision from Rafi Ahmed, Ann Chervenak, Dan Forsyth, M. Narayanaswamy, Carlos Ordonez, and Aravindan Veerasamy has been valuable. Gwen Baker, Amol Navathe, and Aditya Nawathe helped with the manuscript in many ways. Ramez Emasri would like to thank Katrina, Riyad, and Thomas Elmasri for their help with the index and his students at the University of Texas for their comments on the manuscript. We would also like to acknowledge the students at the University of Texas at Arlington and the Georgia Institute of Technology who used drafts of the new material in the third edition.

    We would like to repeat our thanks to those who have reviewed and contributed to both previous editions of Fundamentals of Database Systems. For the first edition these individuals include Alan Apt (editor), Don Batory, Scott Downing, Dennis Heimbigner, Julia Hodges, Yannis Ioannidis, Jim Larson, Dennis McLeod, Per-Ake Larson, Rahul Patel, Nicholas Roussopoulos, David Stemple, Michael Stonebraker, Frank Tompa, and Kyu-Young Whang; for the second edition they include Dan Joraanstad (editor), Rafi Ahmed, Antonio Albano, David Beech, Jose Blakeley, Panos Chrysanthis, Suzanne Dietrich, Vic Ghorpadey, Goetz Graefe, Eric Hanson, Junguk L. Kim, Roger King, Vram Kouramajian, Vijay Kumar, John Lowther, Sanjay Manchanda, Toshimi Minoura, Inderpal Mumick, Ed Omiecinski, Girish Pathak, Raghu Ramakrishnan, Ed Robertson, Eugene Sheng, David Stotts, Marianne Winslett, and Stan Zdonick.

    Last but not least, we gratefully acknowledge the support, encouragement, and patience of our families.

    R.E.

    S.B.N.

    Copyright 2000 by Ramez Elmasri and Shamkant B. Navathe

    1 Page 21 of 893

  • About the Authors (Fundamentals of Database Systems, Third Edition)

    Ramez A. Elmasri is a professor in the department of Computer Science and Engineering at the University of Texas at Arlington. Professor Elmasri previously worked for Honeywell and the University of Houston. He has been an associate editor of the Journal of Parallel and Distributed Databases and a member of the steering committee for the International Conference on Conceptual Modeling. He was program chair of the 1993 International Conference on Entity Relationship Approach. He has conducted research sponsored by grants from NSF, NASA, ARRI, Texas Instruments, Honeywell, Digital Equipment Corporation, and the State of Texas in many areas of database systems and in the area of integration of systems and software over the past twenty years. Professor Elmasri has received the Robert Q. Lee teaching award of the College of Engineering of the University of Texas at Arlington. He holds a Ph.D. from Stanford University and has over 70 refereed publications in journals and conference proceedings.

    Shamkant Navathe is a professor and the head of the database research group in the College of Computing at the Georgia Institute of Technology. Professor Navathe has previously worked with IBM and Siemens in their research divisions and has been a consultant to various companies including Digital Equipment Corporation, Hewlett-Packard, and Equifax. He has been an associate editor of ACM Computing Surveys and IEEE Transactions on Knowledge and Data Engineering, and is currently on the editorial boards of Information Systems (Pergamon Press) and Distributed and Parallel Databases (Kluwer Academic Publishers). He is the co-author of Conceptual Design: An Entity Relationship Approach (Addison-Wesley, 1992) with Carlo Batini and Stefano Ceri. Professor Navathe holds a Ph.D. from the University of Michigan and has over 100 refereed publications in journals and conference proceedings.

    Copyright 2000 by Ramez Elmasri and Shamkant B. Navathe

    1 Page 22 of 893

  • Part 1: Basic Concepts (Fundamentals of Database Systems, Third Edition)

    Chapter 1: Databases and Database Users Chapter 2: Database System Concepts and Architecture Chapter 3: Data Modeling Using the Entity-Relationship Model Chapter 4: Enhanced Entity-Relationship and Object Modeling Chapter 5: Record Storage and Primary File Organizations Chapter 6: Index Structures for Files

    Chapter 1: Databases and Database Users 1.1 Introduction 1.2 An Example 1.3 Characteristics of the Database Approach 1.4 Actors on the Scene 1.5 Workers behind the Scene 1.6 Advantages of Using a DBMS 1.7 Implications of the Database Approach 1.8 When Not to Use a DBMS 1.9 Summary Review Questions Exercises Selected Bibliography Footnotes

    Databases and database systems have become an essential component of everyday life in modern society. In the course of a day, most of us encounter several activities that involve some interaction with a database. For example, if we go to the bank to deposit or withdraw funds; if we make a hotel or airline reservation; if we access a computerized library catalog to search for a bibliographic item; or if we order a magazine subscription from a publisher, chances are that our activities will involve someone accessing a database. Even purchasing items from a supermarket nowadays in many cases involves an automatic update of the database that keeps the inventory of supermarket items.

    The above interactions are examples of what we may call traditional database applications, where most of the information that is stored and accessed is either textual or numeric. In the past few years, advances in technology have been leading to exciting new applications of database systems. Multimedia databases can now store pictures, video clips, and sound messages. Geographic information systems (GIS) can store and analyze maps, weather data, and satellite images. Data warehouses and on-line analytical processing (OLAP) systems are used in many companies to extract and analyze useful information from very large databases for decision making. Real-time and active database technology is used in controlling industrial and manufacturing processes. And database search techniques are being applied to the World Wide Web to improve the search for information that is needed by users browsing through the Internet.

    1 Page 23 of 893

  • To understand the fundamentals of database technology, however, we must start from the basics of traditional database applications. So, in Section 1.1 of this chapter we define what a database is, and then we give definitions of other basic terms. In Section 1.2, we provide a simple UNIVERSITY database example to illustrate our discussion. Section 1.3 describes some of the main characteristics of database systems, and Section 1.4 and Section 1.5 categorize the types of personnel whose jobs involve using and interacting with database systems. Section 1.6, Section 1.7, and Section 1.8 offer a more thorough discussion of the various capabilities provided by database systems and of the implications of using the database approach. Section 1.9 summarizes the chapter.

    The reader who desires only a quick introduction to database systems can study Section 1.1 through Section 1.5, then skip or browse through Section 1.6, Section 1.7 and Section 1.8 and go on to Chapter 2.

    1.1 Introduction

    Databases and database technology are having a major impact on the growing use of computers. It is fair to say that databases play a critical role in almost all areas where computers are used, including business, engineering, medicine, law, education, and library science, to name a few. The word database is in such common use that we must begin by defining a database. Our initial definition is quite general.

    A database is a collection of related data (Note 1). By data, we mean known facts that can be recorded and that have implicit meaning. For example, consider the names, telephone numbers, and addresses of the people you know. You may have recorded this data in an indexed address book, or you may have stored it on a diskette, using a personal computer and software such as DBASE IV or V, Microsoft ACCESS, or EXCEL. This is a collection of related data with an implicit meaning and hence is a database.

    The preceding definition of database is quite general; for example, we may consider the collection of words that make up this page of text to be related data and hence to constitute a database. However, the common use of the term database is usually more restricted. A database has the following implicit properties:

    A database represents some aspect of the real world, sometimes called the miniworld or the Universe of Discourse (UoD). Changes to the miniworld are reflected in the database.

    A database is a logically coherent collection of data with some inherent meaning. A random assortment of data cannot correctly be referred to as a database.

    A database is designed, built, and populated with data for a specific purpose. It has an intended group of users and some preconceived applications in which these users are interested.

    In other words, a database has some source from which data are derived, some degree of interaction with events in the real world, and an audience that is actively interested in the contents of the database.

    A database can be of any size and of varying complexity. For example, the list of names and addresses referred to earlier may consist of only a few hundred records, each with a simple structure. On the other hand, the card catalog of a large library may contain half a million cards stored under different categoriesby primary authors last name, by subject, by book titlewith each category organized in alphabetic order. A database of even greater size and complexity is maintained by the Internal Revenue Service to keep track of the tax forms filed by U.S. taxpayers. If we assume that there are 100 million tax-payers and if each taxpayer files an average of five forms with approximately 200 characters of information per form, we would get a database of 100*(106)*200*5 characters (bytes) of information. If the IRS keeps the past three returns for each taxpayer in addition to the current return, we would get a database of 4*(1011) bytes (400 gigabytes). This huge amount of information must be organized and managed so that users can search for, retrieve, and update the data as needed.

    1 Page 24 of 893

  • A database may be generated and maintained manually or it may be computerized. The library card catalog is an example of a database that may be created and maintained manually. A computerized database may be created and maintained either by a group of application programs written specifically for that task or by a database management system.

    A database management system (DBMS) is a collection of programs that enables users to create and maintain a database. The DBMS is hence a general-purpose software system that facilitates the processes of defining, constructing, and manipulating databases for various applications. Defining a database involves specifying the data types, structures, and constraints for the data