Chapter 1: Database SystemsChapter 2: Data Models Chapter 3: The Relational Database ModelChapter 4: Entity Relationship ER ModelingChapter 5: Advanced Data ModelingChapter 6: Normalizat
Trang 3Vice President of Editorial, Business: Jack W Calhoun
Publisher: Joe Sabatino
Senior Acquisitions Editor: Charles McCormick, Jr
Senior Product Manager: Kate Mason
Development Editor: Deb Kaufmann
Editorial Assistant: Nora Heink
Senior Marketing Communications Manager:
Libby Shipp
Marketing Coordinator: Suellen Ruttkay
Content Product Manager: Matthew Hutchinson
Senior Art Director: Stacy Jenkins Shirley
Cover Designer: Itzhack Shelomi
Cover Image: iStock Images
Media Editor: Chris Valentine
Manufacturing Coordinator: Julio Esperas
Copyeditor: Andrea Schein
Proofreader: Foxxe Editorial
Indexer: Elizabeth Cunningham
Composition: GEX Publishing Services
ing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher.
Library of Congress Control Number: 2009936830
Student Edition Package
ISBN- 13 : 978-0-538-46968-5 ISBN- 10 : 0-538-46968-4
Student Edition (Book Only)
ISBN- 13 : 978-0-538-74884-1 ISBN- 10 : 0-538-74884-2
Instructor Edition
ISBN- 13 : 978-0-538-46806-0 ISBN- 10 : 0-538-46806-8
Cengage Learning
20 Channel Center Street Boston, MA 02210 USA
Cengage Learning is a leading provider of customized learning solutions with office tions around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan Locate your local office at:
loca-international.cengage.com/region
Cengage Learning products are represented in Canada by Nelson Education, Ltd.
To learn more about Course Technology, visit www.cengage.com/coursetechnology
To learn more about Cengage Learning, visit www.cengage.com.
Purchase any of our products at your local college store or at our preferred online store
www.ichapters.com
Printed in the United States of America
1 2 3 4 5 6 7 17 16 15 14 13 12 11
For product information and technology assistance, contact us at
Cengage Learning Customer & Sales Support, 1-800-354-9706
For permission to use material from this text or product, submit all
requests online at www.cengage.com/permissions
Further permissions questions can be emailed to
permissionrequest@cengage.com
Trang 4D edication
To the treasures in my life:To Victoria, for 20 wonderful years.Thank you for your unendingsupport, for being my angel, my sweetie and most importantly, my best friend To CarlosAnthony whose intelligence and wit is matched only by your good looks; you show us the way
Thank you for your words of wisdom, contagious happiness and for bringing us shining days
You are still young; your best times are still to come.To Gabriela Victoria who is the image ofbrilliance, beauty, and faithfulness Thank you for being the sunshine in my cloudy days ToChristian Javier whose endless energy and delightful smiles keep us going every day Thank youfor being the youthful reminder of life’s simple beauties.To my parents, Sarah and Carlos, thankyou for your sacrifice and example.To all of you, you are all my inspiration.“TQTATA.”
Carlos Coronel
To Pamela, from high school sweetheart through 20 years of marriage, the beautiful love of
my life who has supported, encouraged, and inspired me More than anyone else, you areresponsible for whatever successes I have achieved To my son, Alexander Logan, whosedepth of character is without measure.You are my pride and joy To my daughter, LaurenElizabeth, whose beauty and intensity take my breath away You are my heart and soul
Thank you all for the sacrifices that you have made that enabled me to pursue this dream
I love you so much more than I can express.To my mother, Florence Maryann, and to thememory of my father, Alton Lamar, who together instilled in me the desire to learn and thepassion to achieve.To my mother-in-law, Connie Duke, and to the memory of my father-in-law, Wayne Duke, who taught me to find joy in all things To all of you, with all my love,
I dedicate this book
Steven Morris
To Anne, who remains my best friend after 48 years of marriage.To our son, Peter William,who turned out to be the man we hoped he would be and who proved his wisdom bymaking Sheena our treasured daughter-in-law To Sheena, who stole our hearts so manyyears ago.To our grandsons, Adam Lee and Alan Henri, who are growing up to be the finehuman beings their parents are.To my mother-in-law, Nini Fontein, and to the memory of
my father-in-law, Henri Fontein—their life experiences in Europe and Southeast Asia wouldfill a history book and they enriched my life by entrusting me with their daughter’s future
To the memory of my parents, Hendrik and Hermine Rob, who rebuilt their lives afterWorld War II’s horrors, who did it again after a failed insurgency in Indonesia, and whofinally found their promised land in these United States And to the memory of Heinz, whotaught me daily lessons about loyalty, uncritical acceptance, and boundless understanding
I dedicate this book to you, with love
Peter Rob
Trang 6Chapter 1: Database SystemsChapter 2: Data Models
Chapter 3: The Relational Database ModelChapter 4: Entity Relationship (ER) ModelingChapter 5: Advanced Data ModelingChapter 6: Normalization of Database Tables
Chapter 7: Introduction to Structured Query Language (SQL)Chapter 8: Advanced SQL
Chapter 9: Database Design
Chapter 10: Transaction Management and Concurrency ControlChapter 11: Database Performance Tuning and Query OptimizationChapter 12: Distributed Database Management Systems
Chapter 13: Business Intelligence and Data Warehouses
Chapter 14: Database Connectivity and Web Technologies
Chapter 15: Database Administration and Security
GLOSSARY
INDEX
Trang 7The following appendixes and answers to selected questions and problems are included in the Premium Website for
this text, found at cengage.com/mis/coronel.
Design, and Implementation
Answers to Selected Questions and Problems
Trang 8P A R T I D ATA B A S E C O N C E P T S
1.5.3 File System Redux: Modern End-User Productivity Tools 14
2.4.2 Translating Business Rules into Data Model Components 33
2.5.5 Newer Data Models: Object/Relational and XML 42
Trang 105.3.3 When to Use Composite Primary Keys 1575.3.4 When to Use Surrogate Primary Keys 158
5.4.1 Design Case #1: Implementing 1:1 Relationships 1605.4.2 Design Case #2: Maintaining History of Time-Variant Data 161
5.4.4 Design Case #4: Redundant Relationships 164
6.6.1 The Boyce-Codd Normal Form (BCNF) 192
Trang 11P A R T I I I A D VA N C E D D E S I G N A N D I M P L E M E N TAT I O N
Chapter 7 Introduction to Structured Query Language (SQL) 220
7.3.7 Inserting Table Rows with a Select Subquery 242
7.4.1 Selecting Rows with Conditional Restrictions 242
7.4.2 Arithmetic Operators:The Rule of Precedence 247
7.4.3 Logical Operators: AND, OR, and NOT 247
7.5.2 Changing a Column’s Data Characteristics 254
7.5.7 Adding Primary and Foreign Key Designations 258
7.5.8 Deleting a Table from the Database 259
Trang 139.4.2 Entity Relationship Modeling and Normalization 393
9.6.1 Map the Conceptual Model to the Logical Model 400
9.6.2 Validate the Logical Model Using Normalization 402
9.6.3 Validate Logical Model Integrity Constraints 402
9.6.4 Validate the Logical Model against User Requirements 403
9.7.2 Define Integrity and Security Measures 404
Chapter 10 Transaction Management and Concurrency Control 414
Trang 14Chapter 11 Database Performance Tuning and Query Optimization 445
11.1.1 Performance Tuning: Client and Server 447
12.6.1 Single-Site Processing, Single-Site Data (SPSD) 48812.6.2 Multiple-Site Processing, Single-Site Data (MPSD) 48912.6.3 Multiple-Site Processing, Multiple-Site Data (MPMD) 490
12.9.1 Distributed Requests and Distributed Transactions 494
Trang 15Chapter 13 Business Intelligence and Data Warehouses 514
13.4.1 Operational Data vs Decision Support Data 521
13.4.2 Decision Support Database Requirements 523
13.5.1 Twelve Rules that Define a Data Warehouse 528
13.5.2 Decision Support Architectural Styles 529
13.6.1 Multidimensional Data Analysis Techniques 529
13.7.6 Performance-Improving Techniques for the Star Schema 548
13.8.1 The Data Warehouse as an Active Decision Support Framework 551
13.8.2 A Company-Wide Effort that Requires User Involvement 552
13.8.3 Satisfy the Trilogy: Data,Analysis, and Users 552
13.8.4 Apply Database Design Procedures 552
Trang 16P A R T V D ATA B A S E S A N D T H E I N T E R N E T
Chapter 14 Database Connectivity and Web Technologies 574
14.2.1 Web-to-Database Middleware: Server-Side Extensions 586
14.3.1 Document Type Definitions (DTD) and XML Schemas 594
Trang 1715.9.1 Oracle Database Administration Tools 640
15.9.3 Ensuring an Automatic RDBMS Start 641
15.9.4 Creating Tablespaces and Datafiles 642
15.9.5 Managing the Database Objects:Tables,Views,Triggers, and Procedures 643
15.9.6 Managing Users and Establishing Security 644
15.9.7 Customizing the Database Initialization Parameters 647
IN THE PREMIUM WEBSITE
The Premium Website can be found at cengage.com/mis/coronel Locate your premium access card in the front of each new
book purchase, and click “Create My Account” to begin the registration process If you’ve purchased a used book, please
search for Database Systems, Ninth Edition at www.ichapters.com where you can purchase instant access.
Appendix A Designing Databases with Visio Professional: A Tutorial
Appendix B The University Lab: Conceptual Design
Appendix C The University Lab: Conceptual Design Verification, Logical Design,
and Implementation Appendix D Converting an ER Model into a Database Structure
Appendix E Comparison of ER Model Notations
Appendix F Client/Server Systems
Appendix G Object-Oriented Databases
Appendix H Unified Modeling Language (UML)
Appendix I Databases in Electronic Commerce
Appendix J Web Database Development with ColdFusion
Appendix K The Hierarchical Database Model
Appendix L The Network Database Model
Appendix M Microsoft® Access® Tutorial
Appendix N Creating a New Database with Oracle 11g
Answers to Selected Questions and Problems
Trang 18This database systems book has been successful through eight editions because the authors, editors, and the publisherpaid attention to the impact of technology and to adopter questions and suggestions.We believe that this ninth editionsuccessfully reflects the same attention to such stimuli Furthermore this ninth edition marks the addition of a new co-author, Steven Morris Steven brings his wealth of knowledge, teaching experience, and expertise to this work
In many respects, rewriting a book is more difficult than writing it the first time If the book is successful, as this one is,
a major concern is that the updates, inserts, and deletions will adversely affect writing style and continuity of coverage.Fortunately, this edition benefits from the incorporation of a new co-author with fresh ideas and perspectives balanced
by the experience of the original authors to ensure continuity of writing style and quality of presentation In addition, theefforts of a combination of superb reviewers and editors, plus a wealth of feedback from adopters and students of theprevious editions, helped provide the guidance that make this new edition the best yet
Trang 19C H A N G E S T O T H E N I N T H E D I T I O N
In this ninth edition, we have added some new features and we have reorganized some of the coverage to provide abetter flow of material Aside from enhancing the already strong database design coverage, we have made otherimprovements in the topical coverage Here are a few of the highlights:
• Updated Business Vignettes showing the impact of database technologies in the real world
• Strengthened the database design contents by more clearly differentiating among the conceptual, cal, and physical design stages
logi-• Streamlined and modernized the coverage of database evolution and the importance of database designskills
• Enhanced the coverage of data models by shifting the focus from a historical perspective to emergingdata technologies
• Expanded end-of-chapter review questions and problems and introduced a new Cases section toselected chapters
• Formalized and improved consistency of normalization concepts
• Improved readability and overall visual appeal of the book
• Created a database design process guide and a data modeling checklist as cover inserts
This ninth edition continues to provide a solid and practical foundation for the design, implementation, and ment of database systems This foundation is built on the notion that, while databases are very practical things, theirsuccessful creation depends on understanding the important concepts that define them It’s not easy to come up withthe proper mix of theory and practice, but we are grateful that the previously mentioned feedback suggests that welargely succeeded in our quest to maintain the proper balance
manage-T H E A P P R O A C H : A C O N manage-T I N U E D E M P H A S I S O N D E S I G N
As the title suggests, Database Systems: Design, Implementation, and Management covers three broad aspects of
database systems However, for several important reasons, special attention is given to database design
• The availability of excellent database software enables even database-inexperienced people to create
databases and database applications Unfortunately, the “create without design” approach usuallypaves the road to any number of database disasters In our experience, many, if not most, database sys-tem failures are traceable to poor design and cannot be solved with the help of even the best program-mers and managers Nor is better DBMS software likely to overcome problems created or magnified bypoor design Using an analogy, even the best bricklayers and carpenters can’t create a good buildingfrom a bad blueprint
• Most of the vexing database system management problems seem to be triggered by poorly designed
data-bases It hardly seems worthwhile to use scarce resources to develop excellent and extensive database tem management skills in order to exercise them on crises induced by poorly designed databases
sys-• Design provides an excellent means of communication Clients are more likely to get what they need
when database system design is approached carefully and thoughtfully In fact, clients may discoverhow their organizations really function once a good database design is completed
Trang 20• Familiarity with database design techniques promotes one’s understanding of current database
tech-nologies For example, because data warehouses derive much of their data from operational databases,data warehouse concepts, structures, and procedures make more sense when the operational data-base’s structure and implementation are understood
Because the practical aspects of database design are stressed, we have covered design concepts and procedures indetail, making sure that the numerous end-of-chapter problems and cases are sufficiently challenging so students candevelop real and useful design skills We also make sure that students understand the potential and actual conflictsbetween database design elegance, information requirements, and transaction processing speed For example, itmakes little sense to design databases that meet design elegance standards while they fail to meet end-user informationrequirements Therefore, we explore the use of carefully defined trade-offs to ensure that the databases are capable ofmeeting end-user requirements while conforming to high design standards
T O P I C A L C O V E R A G E
The Systems View
The book’s title begins with Database Systems Therefore, we examine the
database and design concepts covered in Chapters 1–6 as part of a larger
whole by placing them within the systems analysis framework of Chapter 9
We believe that database designers who fail to understand that the database
is part of a larger system are likely to overlook important database design
requirements In fact, Chapter 9, Database Design, provides the map for
the advanced database design developed in Appendixes B and C Within
the larger systems framework, we can also explore issues such as
transac-tion management and concurrency control (Chapter 10), distributed
data-base management systems (Chapter 12), business intelligence and data
warehouses (Chapter 13), database connectivity and Web technologies
(Chapter 14), and database administration and security (Chapter 15)
Database Design
The first item in the
book’s subtitle is Design,
and our examination ofdatabase design is com-prehensive For example, Chapters 1 and 2 examine the developmentand future of databases and data models and illustrate the need fordesign Chapter 3 examines the details of the relational databasemodel; Chapter 4 provides extensive, in-depth, and practical databasedesign coverage; and Chapter 5 explores advanced database designtopics Chapter 6 is devoted to critical normalization issues that affectdatabase efficiency and effectiveness Chapter 9 examines databasedesign within the systems framework and maps the activities required
to successfully design and implement the complex real-world database
Trang 21The second portion of the subtitle is Implementation We use Structured
Query Language (SQL) in Chapters 7 and 8 to show how databases are
implemented and managed Appendix M, Microsoft Access Tutorial,
pro-vides a quick but comprehensive guide to MS Access database
implemen-tation Appendixes B and C demonstrate the design of a database that was
fully implemented and they illustrate a wide range of implementation
issues We had to deal with conflicting design goals: design elegance,
infor-mation requirements, and operational speed Therefore, we carefully
audited the initial design (Appendix B) to check its ability to meet end-user
needs and to establish appropriate implementation protocols The result of
this audit yielded the final, implementable design developed in Appendix
C The special issues encountered in an Internet database environment are
addressed in Chapter 14, Database Connectivity and Web Technologies,
and in Appendix J, WebDatabase Developmentwith ColdFusion
Management
The final portion of the subtitle is Management We deal with database
management issues in Chapter 10, Transaction Management andConcurrency Control; Chapter 12, Distributed Database ManagementSystems; and Chapter 15, Database Administration and Security.Chapter 11, Database Performance Tuning and Query Optimization, is
a valuable resource that illustrates how a DBMS manages the dataretrieval operations In addition, Appendix N, Creating a New DatabaseUsing Oracle 11g, walks you through the process of setting up a newdatabase
Trang 22T E A C H I N G D ATA B A S E : A M AT T E R O F F O C U S
Given the wealth of detailed coverage, instructors can “mix and match” chapters to produce the desired coverage.Depending on where database courses fit into the curriculum, instructors may choose to emphasize database design ordatabase management (See Figure 1.)
The hands-on nature of database design lends itself particularly well to class projects for which students use selected software to prototype a student-designed system for the end user Several of the end-of-chapter problems aresufficiently complex to serve as projects, or an instructor may work with local businesses to give students hands-onexperience Note that some elements of the database design track are also found in the database management track.This is because it is difficult to manage database technologies that are not understood
instructor-The options shown in Figure 1 serve only as a starting point Naturally, instructors will tailor their coverage based ontheir specific course requirements For example, an instructor may decide to make Appendix I an outside readingassignment and Appendix A a self-taught tutorial, then use that time to cover client/server systems or object-orienteddatabases The latter choice would serve as a gateway to UML coverage
FIGURE
1
(1) Database Systems (2) Data Models (3) The Relational Database Model (4) Entity Relationship (ER) Modeling (6) Normalization of Database Tables (7) Introduction to Structured Query Language (SQL)
(10) Transaction Management and Concurrency Control (11) Database Performance Tuning and Query Optimization (12) Distributed Database Management Systems
(13) The Data Warehouse (15) Database Administration (F) Client/Server Systems (G) Object-Oriented Databases (I) Databases in Electronic Commerce
(9) Database Design (A) Designing Databases with Visio Professional: A Tutorial (D) Converting an ER Model into a Database Structure (E) Comparison of ER Model Notations (K) The Hierarchical Database Model (L) The Network Database Model (N) Creating a New Database Using Oracle 11g
(5) Advanced Data Modeling (8) Advanced SQL (9) Database Design (D) Converting an ER Model into a Database Structure
(E) Comparison of ER Model Notations
(H) Unified Modeling Language (UML)
(11) Database Performance Tuning and Query Optimization
(14) Database Connectivity and Web Development
(J) Web Database Development with ColdFusion
(A) Designing Databases with Visio Professional: A Tutorial
(B) The University Lab: Conceptual Design
(C) The University Lab: Conceptual Design Verification,
Logical Design, and Implementation
(F) Client/Server Systems (L) The Network Database Model
(M) Microsoft Access Tutorial
Core Coverage
Database Design and Implementation Focus Database Management Focus
Trang 23FIGURE
1.9
Illustrating data storage management with Oracle
The ORALAB database is actually stored in nine datafiles located on the C:
drive of the database server computer.
The Oracle DBA Studio Management interface also shows the amount of space used by each of the datafiles that constitute the single logical database.
Database Name: ORALAB.MTSU.EDU
The Oracle DBA Studio Administrator GUI shows the data storage management characteristics for the ORALAB database.
Note
Data that display data inconsistency are also referred to as data that lack data integrity Data integrity is defined
as the condition in which all of the data in the database are consistent with the real-world events and conditions.
In other words, data integrity means that:
•Data are accurate—there are no data inconsistencies.
•Data are verifiable—the data will always yield consistent results.
Online Content boxes
draw attention to material
in the Premium Website
for this text and provide
ideas for incorporating
this content into the course
Business Vignettes
highlight part topics in
a real-life setting
Notes highlight
impor-tant facts about the
con-cepts introduced in the
chapter
A variety of four-color
figures, including ER
models and
implementa-tions, tables, and
illustra-tions, clearly illustrate
difficult concepts
O n l i n e C o n t e n tThe databases used in each chapter are available in the Premium Website for this book Throughout the book, Online Content boxes highlight material related to chapter content located in the Premium Website.
B V
usinessignette
The Relational Revolution
Today, we take for granted the benefits brought to us by relational databases: the ability
to store, access, and change data quickly and easily on low-cost computers.Yet, until the late 1970s, databases stored large amounts of data in a hierarchical structure that was difficult to navigate and inflexible Programmers needed to know what clients wanted to
do with the data before the database was designed Adding or changing the way the data was analyzed was a time-consuming and expensive process As a result, you searched through huge card catalogs to find a library book, you used road maps that didnt show changes made in the last year, and you had to buy a newspaper to find information on stock prices.
In 1970, Edgar “Ted” Codd, a mathematician employed by IBM, wrote an article that would change all that At the time, nobody realized that Codd’s obscure theories would
Trang 24S u m m a r y
The ERM uses ERDs to represent the conceptual database as viewed by the end user The ERM’s main components
are entities, relationships, and attributes The ERD also includes connectivity and cardinality notations An ERD can
also show relationship strength, relationship participation (optional or mandatory), and degree of relationship
(unary, binary, ternary, etc.).
Connectivity describes the relationship classification (1:1, 1:M, or M:N) Cardinality expresses the specific number
of entity occurrences associated with an occurrence of a related entity Connectivities and cardinalities are usually
based on business rules.
In the ERM, a M:N relationship is valid at the conceptual level However, when implementing the ERM in a
relational database, the M:N relationship must be mapped to a set of 1:M relationships through a composite entity.
relationship degree, 118 simple attribute, 106 single-valued attribute, 106 strong relationship, 112 ternary relationship, 118 unary relationship, 118
R e v i e w Q u e s t i o n s
1 What two conditions must be met before an entity can be classified as a weak entity? Give an example of a
weak entity.
2 What is a strong (or identifying) relationship, and how is it depicted in a Crow’s Foot ERD?
3 Given the business rule “an employee may have many degrees,” discuss its effect on attributes, entities, and
relationships (Hint: Remember what a multivalued attribute is and how it might be implemented.)
4 What is a composite entity, and when is it used?
5 Suppose you are working within the framework of the conceptual model in Figure Q4.5.
P r o b l e m s
1 Given the following business rules, create the appropriate Crow’s Foot ERD.
a A company operates many departments.
b Each department employs one or more employees.
c Each of the employees may or may not have one or more dependents.
d Each employee may or may not have an employment history.
2 The Hudson Engineering Group (HEG) has contacted you to create a conceptual model whose application will
meet the expected database requirements for the company’s training program The HEG administrator gives you
A robust Summary at
the end of each ter ties together themajor concepts andserves as a quickreview for students
chap-Review Questions
challenge students toapply the skills learned
in each chapter
Problems become
progressively morecomplex as studentsdraw on the lessonslearned from the com-pletion of precedingproblems
An alphabetic list of
Key Terms points to
the pages where termsare first explained
Trang 25P R E M I U M W E B S I T E
Single Sign On (SSO) provides a central location from which you can access Cengage Learning’s online learning tions with convenience and flexibility You can:
solu-• Gain access to online resources including robust Premium Website
• Simplify your coursework by reducing human error and the need to keep track of multiple passwords.See the insert card at the front of this book for instructions on how to access this text’s SSO site
This Web resource, which you will find referenced throughout the book in the Online Content boxes, includes the lowing features:
fol-Appendixes
Fourteen appendixes provide additional material on a variety of important areas, such as using Microsoft®Visio®andMicrosoft®Access®, ER model notations, UML, object-oriented databases, databases and electronic commerce, andAdobe®ColdFusion®
Answers to Selected Questions and Problems
The authors have provided answers to selected Review Questions and Problems from each chapter to help studentscheck their comprehension of chapter content and database skills
Database, SQL Script, and ColdFusion Files
The Premium Website for this book includes all of the database structures and table contents used in the text For studentsusing Oracle®and Microsoft SQL Server™, the SQL scripts to create and load all tables used in the SQL chapters (7 and 8)are included In addition, all ColdFusion scripts used to develop the Web interfaces shown Appendix J are included
Video Tutorials
Custom-made video tutorials by Peter Rob and Carlos Coronel, exclusive to this textbook, provide clear explanations
of the essential concepts presented in the book These unique tutorials will help the user gain a better understanding oftopics such as SQL, Oracle, ERDs, and ColdFusion
Test Yourself on Database Systems
Brand new quizzes, created specifically for this site, allow users to test themselves on the content of each chapter andimmediately see what answers they answered right and wrong For each question answered incorrectly, users are pro-vided with the correct answer and the page in the text where that information is covered Special testing software ran-domly compiles a selection of questions from a large database, so students can take quizzes multiple times on a givenchapter, with some new questions each time
Microsoft PowerPoint® Slides
Direct access is offered to the book’s PowerPoint presentations that cover the key points from each chapter Thesepresentations are a useful study tool
Useful Web Links
Students can access a chapter-by-chapter repository of helpful and relevant links for further research
Glossary of Key Terms
Students can view a PDF file of the glossary from the book They can also search for keywords and terms in this file;it’s quick and easy to use!
Q & A
Helpful question-and-answer documents are available for download Here you will find supporting material in areassuch as Data Dependency/Structural Dependency and Weak Entities/Strong Relationships
Trang 26I N S T R U C T O R R E S O U R C E S
Database Systems: Design, Implementation, and Management, Ninth Edition, includes teaching tools to support
instructors in the classroom The ancillaries that accompany the textbook are listed below Most of the teaching toolsavailable with this book are provided to the instructor on a single CD-ROM; they are also available on the Web at
www.cengage.com/mis/coronel
Instructor’s Manual
The authors have created this manual to help instructors make their classes informative and interesting Because the
authors tackle so many problems in depth, instructors will find the Instructor’s Manual especially useful The details of the design solution process are shown in detail in the Instructor’s Manual as well as notes about alternative
approaches that may be used to solve a particular problem Finally, the book’s questions and problems together withtheir answers and solutions are included
SQL Script Files for Instructors
The authors have provided teacher’s SQL script files to create and delete users They have also provided SQL scripts
to let instructors cut and paste the SQL code into the SQL windows (Scripts are provided for Oracle as well as for MSSQL Server.) The SQL scripts, which have all been tested by Course Technology, are a major convenience for instruc-tors You won’t have to type in the SQL commands and the use of the scripts eliminates errors due to “typos” that aresometimes difficult to trace
ColdFusion Files for Instructors
The ColdFusion Web development solutions are provided Instructors have access to a menu-driven system that letsteachers show the code as well as the execution of that code
Databases
Microsoft®Access®Instructor databases are available for many chapters that include features not found in the studentdatabases For example, the databases that accompany Chapters 7 and 8 include many of the queries that produce theproblem solutions Other Access databases, such as the ones accompanying Chapters 3, 4, 5, and 6, include theimplementation of the design problem solutions to let instructors illustrate the effect of design decisions All the MSAccess files are in the Access 2000 format so that students can use them regardless of what version they have installed
on their computers In addition, instructors have access to all the script files for both Oracle and MS SQL Server so thatall the databases and their tables can be converted easily and precisely
Trang 27PowerPoint® Presentations
Microsoft PowerPoint slides are included for each chapter Instructors can use the slides in a variety of ways; for ple, as teaching aids during classroom presentations or as printed handouts for classroom distribution Instructors canmodify the slides provided or include slides of their own for additional topics introduced to the class
Trang 28A difficult task in rewriting a book is deciding what new approaches, topical coverage, and depth of coverage changescan or cannot fit into a book that has successfully weathered the test of the marketplace The comments and sugges-tions made by the book’s adopters, students, and reviewers play a major role in deciding what coverage is desirable andhow that coverage is to be treated.
Some adopters became extraordinary reviewers, providing incredibly detailed and well-reasoned critiques even as theypraised the book’s coverage and style Dr David Hatherly, a superb database professional who is a senior lecturer in theSchool of Information Technology, Charles Sturt University–Mitchell, Bathhurst, Australia, made sure that we knew preciselywhat issues led to his critiques Even better for us, he provided the suggestions that made it much easier for us to improvethe topical coverage in earlier editions Dr Hatherly’s recommendations continue to be reflected in this ninth edition All ofhis help was given freely and without prompting on our part His efforts are much appreciated, and our thanks are heartfelt
We also owe a debt of gratitude to Professor Emil T Cipolla, who teaches at St Mary College Professor Cipolla’s wealth
of IBM experience turned out to be a valuable resource when we tackled the embedded SQL coverage in Chapter 8 Every technical book receives careful scrutiny by several groups of reviewers selected by the publisher We were fortu-nate to face the scrutiny of reviewers who were superbly qualified to offer their critiques, comments, and suggestions—many of which were used to strengthen this edition While holding them blameless for any remaining shortcomings, weowe these reviewers many thanks for their contributions:
Amita G Chin, Virginia Commonwealth University
Samuel Conn, Regis University
Bill Hochstettler, Franklin University
Lionel M Holguin, Jr., Athens State University
Larry Molloy, Oakland Community College
Bruce Myers, Austin Peay State University
Steven Robinett, Allegany College of Maryland
Ioulia Rytikova, George Mason University
Samuel Sambasivam, Azusa Pacific University
Kevin Scheibe, Iowa State University
Ganesan Shankaranarayanan, Boston University
Xingzhong (Frank) Shi, New Jersey Institute of Technology
Yingbing Yu, Austin Peay State Univeristy
Trang 29Because this ninth edition is build solidly on the foundation of the previous editions, we would also like to thank thefollowing reviewers for their efforts in helping to make the previous editions successful: Dr Reza Barkhi, PamplinCollege of Business, Virginia Polytechnic Institute and State University; Dr Vance Cooney, Xavier University; Harpal
S Dillion, Southwestern Oklahoma State University; Janusz Szczypula, Carnegie Mellon University; Dr AhmadAbuhejleh, University of Wisconsin, River Falls; Dr Terence M Baron, University of Toledo; Dr Juan Estava, EasternMichigan University; Dr Kevin Gorman, University of North Carolina, Charlotte; Dr Jeff Hedrington, University ofWisconsin, Eau Claire; Dr Herman P Hoplin, Syracuse University; Dr Sophie Lee, University of Massachusetts,Boston; Dr Michael Mannino, University of Washington; Dr Carol Chrisman, Illinois State University; Dr TimothyHeintz, Marquette University; Dr Herman Hoplin, Syracuse University; Dr Dean James, Embry-Riddle University;
Dr Constance Knapp, Pace University; Dr Mary Ann Robbert, Bentley College; Dr Francis J Van Wetering,University of Nebraska; Dr Joseph Walls, University of Southern California; Dr Stephen C Solosky, NassauCommunity College; Dr Robert Chiang, Syracuse University; Dr Crist Costa, Rhode Island College; Dr Sudesh M.Duggal, Northern Kentucky University; Dr Chang Koh, University of North Carolina, Greensboro; Paul A Seibert,North Greenville College; Neil Dunlop, Vista Community College; Ylber Ramadani, George Brown College; SamuelSambasivam, Azusa Pacific University; Arjan Sadhwani, San Jose State University; Genard Catalano, ColumbiaCollege; Craig Shaw, Central Community College; Lei-da Chen, Creighton University; Linda K Lau, LongwoodUniversity; Anita Lee-Post, University of Kentucky; Lenore Horowitz, Schenectady County Community College;
Dr Scott L Schneberger, Georgia State University; Tony Pollard, University of Western Sydney; Lejla Vrazalic,University of Wollongong; and David Witzany, Parkland College
In some respects, writing books resembles building construction: When 90 percent of the work seems done, 90 cent of the work remains to be done Fortunately for us, we had a great team on our side
per-• How can we possibly pay sufficient homage to Deb Kaufmann’s many contributions? Even our bestsuperlatives don’t begin to paint a proper picture of our professional relationship with DebKaufmann, our developmental editor since the fifth edition Deb has that magic combination of goodjudgment, intelligence, technical skill, and the rare ability to organize and sharpen an author’s writ-ing without affecting its intent or its flow And she does it all with style, class, and humor She is thebest of the best
• After writing so many books and eight editions of this book, we know just how difficult it can be to
transform the authors’ work into an attractive book The production team, both at CourseTechnology (Matt Hutchinson) and GEX Publishing Services (Louise Capulli and Marisa Taylor),have done an excellent job
• We also owe Kate Mason, our product manager, special thanks for her ability to guide this book to asuccessful conclusion Kate’s work touched all of the publication bases, and her managerial skills pro-tected us from those publishing gremlins that might have become a major nuisance Not to mention thefact that her skills in dealing with occasionally cranky authors far exceed those of any diplomat we canthink of And did we mention that Kate is, quite simply, a delightful person?
• Many thanks to Andrea Schein, our copyeditor Given her ability to spot even the smallest cies, we suspect that her middle name is “Thorough.” We can only imagine the level of mental disci-pline required to perform her job and we salute her
discrepan-XXVII
Trang 30We also thank our students for their comments and suggestions They are the reason for writing this book in the firstplace One comment stands out in particular: “I majored in systems for four years, and I finally discovered why when Itook your course.” And one of our favorite comments by a former student was triggered by a question about the chal-lenges created by a real-world information systems job: “Doc, it’s just like class, only easier You really prepared mewell Thanks!”
Last, and certainly not least, we thank our families for the solid home support They graciously accepted the fact thatduring more than a year’s worth of rewriting, there would be no free weekends, rare free nights, and even rarer freedays We owe you much, and the dedication we wrote to you is but a small reflection of the important space youoccupy in our hearts
Carlos Coronel, Steven Morris, and Peter Rob
XXVIII
Trang 33B V
usiness ignette
to store, access, and change data quickly and easily on low-cost computers.Yet, until the
late 1970s, databases stored large amounts of data in a hierarchical structure that was
difficult to navigate and inflexible Programmers needed to know what clients wanted to
do with the data before the database was designed Adding or changing the way the data
was analyzed was a time-consuming and expensive process As a result, you searched
through huge card catalogs to find a library book, you used road maps that didn’t show
changes made in the last year, and you had to buy a newspaper to find information on
stock prices
In 1970, Edgar “Ted” Codd, a mathematician employed by IBM, wrote an article that
would change all that At the time, nobody realized that Codd’s obscure theories would
spark a technological revolution on par with the development of personal computers and
the Internet Don Chamberlin, coinventor of SQL, the most popular computer language
used by database systems today, explains, “There was this guy Ted Codd who had some
kind of strange mathematical notation, but nobody took it very seriously.” Then Ted Codd
organized a symposium, and Chamberlin listened as Codd reduced complicated five-page
programs to one line “And I said, ‘Wow,’” Chamberlin recalls
The symposium convinced IBM to fund System R, a research project that built a
prototype of a relational database and that would eventually lead to the creation of SQL
and DB2 IBM, however, kept System R on the back burner for a number of crucial years
The company had a vested interest in IMS, a reliable, high-end database system that had
come out in 1968 Unaware of the market potential of this research, IBM allowed its staff
to publish these papers publicly
Among those reading these papers was Larry Ellison, who had just founded a small
company Recruiting programmers from System R and the University of California, Ellison
was able to market the first SQL-based relational database in 1979, well before IBM By
1983, the company had released a portable version of the database, grossed over
$5,000,000 annually, and changed its name to Oracle Spurred on by competition, IBM
finally released SQL/DS, its first relational database, in 1980
IBM has yet to catch up By 2007, global sales of relational database management systems
rose to $18.8 billion Oracle captured 48.6% of the market share, more than its two
closest competitors, IBM and Microsoft, combined
Trang 34P review
In this chapter, you will learn:
쐍 The difference between data and information
쐍 What a database is, the various types of databases, and why they are valuable assets fordecision making
쐍 The importance of database design
쐍 How modern databases evolved from file systems
쐍 About flaws in file system data management
쐍 The main components of the database system
쐍 The main functions of a database management system (DBMS)
Good decisions require good information that is derived from raw facts.These raw facts areknown as data Data are likely to be managed most efficiently when they are stored in adatabase In this chapter, you will learn what a database is, what it does, and why it yieldsbetter results than other data management methods.You will also learn about various types
of databases and why database design is so important
Databases evolved from computer file systems Although file system data management isnow largely outmoded, understanding the characteristics of file systems is importantbecause file systems are the source of serious data management limitations In this chapter,you will also learn how the database system approach helps eliminate most of theshortcomings of file system data management
1
Trang 351.1 WHY DATABASES?
Imagine trying to operate a business without knowing who your customers are, what products you are selling, who isworking for you, who owes you money, and whom you owe money All businesses have to keep this type of data andmuch more; and just as importantly, they must have those data available to decision makers when they need them Itcan be argued that the ultimate purpose of all business information systems is to help businesses use information as
an organizational resource At the heart of all of these systems are the collection, storage, aggregation, manipulation,dissemination, and management of data
Depending on the type of information system and the characteristics of the business, these data could vary from a fewmegabytes on just one or two topics to terabytes covering hundreds of topics within the business’s internal and externalenvironment Telecommunications companies such as Sprint and AT&T are known to have systems that keep data ontrillions of phone calls, with new data being added to the system at speeds up to 70,000 calls per second!1Not only
do these companies have to store and manage these immense collections of data, they have to be able to find any givenfact in that data quickly Consider the case of Internet search staple Google While Google is reluctant to disclose manydetails about its data storage specifications, it is estimated that the company responds to over 91 million searches perday across a collection of data that is several terabytes in size Impressively, the results of these searches are availablenearly instantly
How can these businesses process this much data? How can they store it all, and then quickly retrieve just the factsthat decision makers want to know, just when they want to know it? The answer is that they use databases Databases,
as explained in detail throughout this book, are specialized structures that allow computer-based systems to store,manage, and retrieve data very quickly Virtually all modern business systems rely on databases; therefore, a goodunderstanding of how these structures are created and their proper use is vital for any information systemsprofessional Even if your career does not take you down the amazing path of database design and development,databases will be a key component underpinning the systems that you work with In any case, it is very likely that, inyour career, you will be making decisions based on information generated from data Thus, it is important that youknow the difference between data and information
1.2 DATA VS INFORMATION
To understand what drives database design, you must understand the difference between data and information Data
are raw facts The word raw indicates that the facts have not yet been processed to reveal their meaning For example,
suppose that you want to know what the users of a computer lab think of its services Typically, you would begin bysurveying users to assess the computer lab’s performance Figure 1.1, Panel A, shows the Web survey form thatenables users to respond to your questions When the survey form has been completed, the form’s raw data are saved
to a data repository, such as the one shown in Figure 1.1, Panel B Although you now have the facts in hand, theyare not particularly useful in this format—reading page after page of zeros and ones is not likely to provide muchinsight Therefore, you transform the raw data into a data summary like the one shown in Figure 1.1, Panel C Nowit’s possible to get quick answers to questions such as “What is the composition of our lab’s customer base?” In thiscase, you can quickly determine that most of your customers are juniors (24.59%) and seniors (53.01%) Becausegraphics can enhance your ability to quickly extract meaning from data, you show the data summary bar graph inFigure 1.1, Panel D
Information is the result of processing raw data to reveal its meaning Data processing can be as simple as organizing
data to reveal patterns or as complex as making forecasts or drawing inferences using statistical modeling To reveal
meaning, information requires context For example, an average temperature reading of 105 degrees does not mean
1“Top Ten Largest Databases in the World,” Business Intelligence Lowdown, February 15, 2007, http://www.businessintelligencelowdown.com/
Trang 36much unless you also know its context: Is this in degrees Fahrenheit or Celsius? Is this a machine temperature, a bodytemperature, or an outside air temperature? Information can be used as the foundation for decision making Forexample, the data summary for each question on the survey form can point out the lab’s strengths and weaknesses,helping you to make informed decisions to better meet the needs of lab customers.
Keep in mind that raw data must be properly formatted for storage, processing, and presentation For example, in
Panel C of Figure 1.1, the student classification is formatted to show the results based on the classifications Freshman,Sophomore, Junior, Senior, and Graduate Student The respondents’ yes/no responses might need to be converted
to a Y/N format for data storage More complex formatting is required when working with complex data types, such
as sounds, videos, or images
In this “information age,” production of accurate, relevant, and timely information is the key to good decision making
In turn, good decision making is the key to business survival in a global market We are now said to be entering the
FIGURE
1.1
Transforming raw data into information
Trang 37“knowledge age.”2Data are the foundation of information, which is the bedrock of knowledge—that is, the body of
information and facts about a specific subject Knowledge implies familiarity, awareness, and understanding ofinformation as it applies to an environment A key characteristic of knowledge is that “new” knowledge can be derivedfrom “old” knowledge
Let’s summarize some key points:
쐌 Data constitute the building blocks of information
쐌 Information is produced by processing data
쐌 Information is used to reveal the meaning of data
쐌 Accurate, relevant, and timely information is the key to good decision making
쐌 Good decision making is the key to organizational survival in a global environment
Timely and useful information requires accurate data Such data must be properly generated and stored in a format
that is easy to access and process And, like any basic resource, the data environment must be managed carefully Data
management is a discipline that focuses on the proper generation, storage, and retrieval of data Given the crucial
role that data play, it should not surprise you that data management is a core activity for any business, governmentagency, service organization, or charity
1.3 INTRODUCING THE DATABASE
Efficient data management typically requires the use of a computer database A database is a shared, integrated
computer structure that stores a collection of:
쐌 End-user data, that is, raw facts of interest to the end user
쐌 Metadata, or data about data, through which the end-user data are integrated and managed.
The metadata provide a description of the data characteristics and the set of relationships that links the data foundwithin the database For example, the metadata component stores information such as the name of each data element,the type of values (numeric, dates, or text) stored on each data element, whether or not the data element can be leftempty, and so on The metadata provide information that complements and expands the value and use of the data
In short, metadata present a more complete picture of the data in the database Given the characteristics of metadata,
you might hear a database described as a “collection of self-describing data.”
A database management system (DBMS) is a collection of programs that manages the database structure and
controls access to the data stored in the database In a sense, a database resembles a very well-organized electronic
filing cabinet in which powerful software, known as a database management system, helps manage the cabinet’s
contents
1.3.1 Role and Advantages of the DBMS
The DBMS serves as the intermediary between the user and the database The database structure itself is stored as acollection of files, and the only way to access the data in those files is through the DBMS Figure 1.2 emphasizes thepoint that the DBMS presents the end user (or application program) with a single, integrated view of the data in thedatabase The DBMS receives all application requests and translates them into the complex operations required to fulfillthose requests The DBMS hides much of the database’s internal complexity from the application programs and users.The application program might be written by a programmer using a programming language such as Visual Basic.NET,Java, or C#, or it might be created through a DBMS utility program
2Peter Drucker coined the phrase “knowledge worker” in 1959 in his book Landmarks of Tomorrow In 1994, Ms Esther Dyson, Mr George
Trang 38Having a DBMS between the end user’s applications and the database offers some important advantages First, the
DBMS enables the data in the database to be shared among multiple applications or users Second, the DBMS integrates the many different users’ views of the data into a single all-encompassing data repository.
Because data are the crucial raw material from which information is derived, you must have a good method to managesuch data As you will discover in this book, the DBMS helps make data management more efficient and effective Inparticular, a DBMS provides advantages such as:
쐌 Improved data sharing The DBMS helps create an environment in which end users have better access to
more and better-managed data Such access makes it possible for end users to respond quickly to changes intheir environment
쐌 Improved data security The more users access the data, the greater the risks of data security breaches.
Corporations invest considerable amounts of time, effort, and money to ensure that corporate data are usedproperly A DBMS provides a framework for better enforcement of data privacy and security policies
쐌 Better data integration Wider access to well-managed data promotes an integrated view of the organization’s
operations and a clearer view of the big picture It becomes much easier to see how actions in one segment
of the company affect other segments
쐌 Minimized data inconsistency Data inconsistency exists when different versions of the same data appear
in different places For example, data inconsistency exists when a company’s sales department stores a salesrepresentative’s name as “Bill Brown” and the company’s personnel department stores that same person’sname as “William G Brown,” or when the company’s regional sales office shows the price of a product as
$45.95 and its national sales office shows the same product’s price as $43.95 The probability of datainconsistency is greatly reduced in a properly designed database
쐌 Improved data access The DBMS makes it possible to produce quick answers to ad hoc queries From a
database perspective, a query is a specific request issued to the DBMS for data manipulation—for example,
to read or update the data Simply put, a query is a question, and an ad hoc query is a spur-of-the-moment question The DBMS sends back an answer (called the query result set) to the application For example, end
End users
End users
Application request Data
Application
Database structure
DBMS Database Management System
Single Integrated
Trang 39users, when dealing with large amounts of sales data, might want quick answers to questions (ad hoc queries)such as:
- What was the dollar volume of sales by product during the past six months?
- What is the sales bonus figure for each of our salespeople during the past three months?
- How many of our customers have credit balances of $3,000 or more?
쐌 Improved decision making Better-managed data and improved data access make it possible to generate
better-quality information, on which better decisions are based The quality of the information generated
depends on the quality of the underlying data Data quality is a comprehensive approach to promoting the
accuracy, validity, and timeliness of the data While the DBMS does not guarantee data quality, it provides aframework to facilitate data quality initiatives Data quality concepts will be covered in more detail in Chapter
15, Database Administration and Security
쐌 Increased end-user productivity The availability of data, combined with the tools that transform data into
usable information, empowers end users to make quick, informed decisions that can make the differencebetween success and failure in the global economy
The advantages of using a DBMS are not limited to the few just listed In fact, you will discover many more advantages
as you learn more about the technical details of databases and their proper design
1.3.2 Types of Databases
A DBMS can support many different types of databases Databases can be classified according to the number of users,the database location(s), and the expected type and extent of use
The number of users determines whether the database is classified as single-user or multiuser A single-user
database supports only one user at a time In other words, if user A is using the database, users B and C must wait
until user A is done A single-user database that runs on a personal computer is called a desktop database In contrast, a multiuser database supports multiple users at the same time When the multiuser database supports a
relatively small number of users (usually fewer than 50) or a specific department within an organization, it is called a
workgroup database When the database is used by the entire organization and supports many users (more than 50,
usually hundreds) across many departments, the database is known as an enterprise database.
Location might also be used to classify the database For example, a database that supports data located at a single
site is called a centralized database A database that supports data distributed across several different sites is called
a distributed database The extent to which a database can be distributed and the way in which such distribution
is managed are addressed in detail in Chapter 12, Distributed Database Management Systems
The most popular way of classifying databases today, however, is based on how they will be used and on the timesensitivity of the information gathered from them For example, transactions such as product or service sales,payments, and supply purchases reflect critical day-to-day operations Such transactions must be recorded accuratelyand immediately A database that is designed primarily to support a company’s day-to-day operations is classified as
an operational database (sometimes referred to as a transactional or production database) In contrast, a data
warehouse focuses primarily on storing data used to generate information required to make tactical or strategic
decisions Such decisions typically require extensive “data massaging” (data manipulation) to extract information toformulate pricing decisions, sales forecasts, market positioning, and so on Most decision support data are based ondata obtained from operational databases over time and stored in data warehouses Additionally, the data warehousecan store data derived from many sources To make it easier to retrieve such data, the data warehouse structure is quitedifferent from that of an operational or transactional database The design, implementation, and use of datawarehouses are covered in detail in Chapter 13, Business Intelligence and Data Warehouses
Databases can also be classified to reflect the degree to which the data are structured Unstructured data are data
that exist in their original (raw) state, that is, in the format in which they were collected Therefore, unstructured data
exist in a format that does not lend itself to the processing that yields information Structured data are the result of
Trang 40taking unstructured data and formatting (structuring) such data to facilitate storage, use, and the generation ofinformation You apply structure (format) based on the type of processing that you intend to perform on the data.Some data might not be ready (unstructured) for some types of processing, but they might be ready (structured) forother types of processing For example, the data value 37890 might refer to a zip code, a sales value, or a productcode If this value represents a zip code or a product code and is stored as text, you cannot perform mathematicalcomputations with it On the other hand, if this value represents a sales transaction, it is necessary to format it asnumeric.
To further illustrate the structure concept, imagine a stack of printed paper invoices If you want to merely store theseinvoices as images for future retrieval and display, you can scan them and save them in a graphic format On the otherhand, if you want to derive information such as monthly totals and average sales, such graphic storage would not beuseful Instead, you could store the invoice data in a (structured) spreadsheet format so that you can perform the
requisite computations Actually, most data you encounter are best classified as semistructured Semistructured data
are data that have already been processed to some extent For example, if you look at a typical Web page, the dataare presented to you in a prearranged format to convey some information
The database types mentioned thus far focus on the storage and management of highly structured data However,corporations are not limited to the use of structured data They also use semistructured and unstructured data Justthink of the very valuable information that can be found on company e-mails, memos, documents such as proceduresand rules, Web pages, and so on Unstructured and semistructured data storage and management needs are being
addressed through a new generation of databases known as XML databases Extensible Markup Language (XML)
is a special language used to represent and manipulate data elements in a textual format An XML database supports
the storage and management of semistructured XML data
Table 1.1 compares the features of several well-known database management systems
* Supports XML functions only XML data are stored in large text objects.
1.4 WHY DATABASE DESIGN IS IMPORTANT
Database design refers to the activities that focus on the design of the database structure that will be used to store
and manage end-user data A database that meets all user requirements does not just happen; its structure must bedesigned carefully In fact, database design is such a crucial aspect of working with databases that most of this book
is dedicated to the development of good database design techniques Even a good DBMS will perform poorly with abadly designed database
Proper database design requires the designer to identify precisely the database’s expected use Designing atransactional database emphasizes accurate and consistent data and operational speed Designing a data warehousedatabase emphasizes the use of historical and aggregated data Designing a database to be used in a centralized,
3Vendor offers single-user/personal DBMS version.