chapter 3 the database management system concept fundamentals of database management systems, 2 nd...
TRANSCRIPT
Chapter 3Chapter 3The Database Management The Database Management
System ConceptSystem Concept
Fundamentals of Database Management Systems, 2nd ed
by
Mark L. Gillenson, Ph.D.
University of Memphis
John Wiley & Sons, Inc.
3-3-22
Chapter ObjectivesChapter Objectives
Discuss the problems encountered in a Discuss the problems encountered in a nondatabase information systems nondatabase information systems environment.environment.
Discuss the nature of data.Discuss the nature of data.
Define data-related terms such as entity Define data-related terms such as entity and attribute.and attribute.
3-3-33
Chapter ObjectivesChapter Objectives
Define storage-related terms such as field, Define storage-related terms such as field, record, and file.record, and file.
Identify the four basic operations Identify the four basic operations performed on stored data.performed on stored data.
Compare sequential access of data with Compare sequential access of data with direct access of data.direct access of data.
3-3-44
Chapter ObjectivesChapter Objectives
List the five basic principles of the List the five basic principles of the database concept. database concept.
Describe how data can be considered to Describe how data can be considered to be a manageable resource. be a manageable resource.
3-3-55
Chapter ObjectivesChapter Objectives
List the three problems created by data List the three problems created by data redundancy. redundancy.
Describe the nature of data redundancy Describe the nature of data redundancy among many files. among many files.
Explain the relationship between data Explain the relationship between data integration and data redundancy in one integration and data redundancy in one file.file.
3-3-66
Chapter ObjectivesChapter Objectives
State the primary defining feature of a State the primary defining feature of a database management system. database management system.
Explain why the ability to store multiple Explain why the ability to store multiple relationships is an important feature of the relationships is an important feature of the database approach.database approach.
3-3-77
Chapter ObjectivesChapter Objectives
Explain why providing support for such Explain why providing support for such control issues as data security, backup control issues as data security, backup and recovery, and concurrency is an and recovery, and concurrency is an important feature of the database important feature of the database approach. approach.
Explain why providing support for data Explain why providing support for data independence is an important feature of independence is an important feature of the database approach. the database approach.
3-3-88
Data Processing SystemsData Processing Systems
Data was stored in different formats in different Data was stored in different formats in different files.files.
Data was often not shared among different Data was often not shared among different programs that needed it, necessitating the programs that needed it, necessitating the duplication of data in redundant files.duplication of data in redundant files.
Little was understood about file design, resulting Little was understood about file design, resulting in redundant data within individual files.in redundant data within individual files.
3-3-99
Data Processing SystemsData Processing Systems
Files often could not be rebuilt after being Files often could not be rebuilt after being damaged by a software error or a damaged by a software error or a hardware failure.hardware failure.
Data was not secure and was vulnerable Data was not secure and was vulnerable to theft or malicious mischief by people to theft or malicious mischief by people inside or outside of the company.inside or outside of the company.
3-3-1010
Data Processing SystemsData Processing Systems
Programs were usually written in such a Programs were usually written in such a manner that if the way that the data was manner that if the way that the data was stored changed, the program had to be stored changed, the program had to be modified to continue working.modified to continue working.
Changes in everything from access Changes in everything from access methods to tax tables required methods to tax tables required programming changes.programming changes.
3-3-1111
Data Before Database ManagementData Before Database ManagementRecords and FilesRecords and Files
Entity - a “thing” or “object” in our environment Entity - a “thing” or “object” in our environment that we want to keep track of.that we want to keep track of.
Entity set - A collection of entities of the same Entity set - A collection of entities of the same type (e.g., all of the company’s employees).type (e.g., all of the company’s employees).
3-3-1212
Records and FilesRecords and Files
Attribute - a property of, a characteristic of, or a Attribute - a property of, a characteristic of, or a fact that we know about an entity.fact that we know about an entity.
Some attributes have unique values within an Some attributes have unique values within an entity set.entity set.
3-3-1313
Records and FilesRecords and Files
Record - each row of a structure like aboveRecord - each row of a structure like above
Fields - the columns, representing the factsFields - the columns, representing the facts
File - the entire structureFile - the entire structure
keyfield
3-3-1414
Records and FilesRecords and Files
Record type - Record type - a structural description of each and a structural description of each and every record in the fileevery record in the file
Record occurrence / Record instance - a specific Record occurrence / Record instance - a specific record of the salesperson filerecord of the salesperson file
3-3-1515
Retrieving and Manipulating Retrieving and Manipulating DataData
Four fundamental operations can be performed on Four fundamental operations can be performed on stored data:stored data:
Retrieve or Read - looking at a record’s contents without Retrieve or Read - looking at a record’s contents without changing itchanging it
Insert - adding a new record to the file, as when a new Insert - adding a new record to the file, as when a new salesperson is hiredsalesperson is hired
Delete - deleting a record from the file, as when a salesperson Delete - deleting a record from the file, as when a salesperson leaves the companyleaves the company
Update - changing one or more of a record’s field valuesUpdate - changing one or more of a record’s field values
3-3-1616
Data Retrieval MethodData Retrieval Method
Sequential access - the retrieval of all or a Sequential access - the retrieval of all or a portion of the records of a file one after another, portion of the records of a file one after another, in some sequence, starting from the beginning, in some sequence, starting from the beginning, until all of the required records have been until all of the required records have been retrieved.retrieved. Physical sequential access - records are retrieved, Physical sequential access - records are retrieved,
one after the other, just as they are stored on the disk one after the other, just as they are stored on the disk device.device.
Logical sequential access - records are retrieved in an Logical sequential access - records are retrieved in an order based on the values of one or a combination of order based on the values of one or a combination of the fields.the fields.
3-3-1717
Data Retrieval MethodData Retrieval Method
Direct Access - the retrieval of a single record of Direct Access - the retrieval of a single record of a file or a subset of the records of a file based a file or a subset of the records of a file based on one or more values of a field or a on one or more values of a field or a combination of fields in the file.combination of fields in the file. a crucial concept in information systems todaya crucial concept in information systems today
requires hardware storage device that will requires hardware storage device that will accommodate direct accessaccommodate direct access
requires software that will take advantage of the requires software that will take advantage of the hardware’s capabilities and store and retrieve the hardware’s capabilities and store and retrieve the data in such a way that it accomplishes direct access.data in such a way that it accomplishes direct access.
3-3-1818
The Database ConceptThe Database Concept
1. Data as a Manageable Resource1. Data as a Manageable Resource
2. Data Integration and Data Redundancy2. Data Integration and Data Redundancy
3. Multiple Relationships3. Multiple Relationships
4. Data Control Issues4. Data Control Issues
5. Data Independence5. Data Independence
3-3-1919
The Database ConceptThe Database Concept
Data as a Manageable Resource - The Data as a Manageable Resource - The creation of a data-centric environment in creation of a data-centric environment in which a company’s data can truly be which a company’s data can truly be thought of as a significant corporate thought of as a significant corporate resource. A key feature of this resource. A key feature of this environment is the ability to share data environment is the ability to share data among those inside and outside of the among those inside and outside of the company who require access to it. company who require access to it.
3-3-2020
The Database ConceptThe Database Concept
Data Integration and Data Redundancy - The Data Integration and Data Redundancy - The ability to achieve data integration while at the ability to achieve data integration while at the same time storing data in a nonredundant same time storing data in a nonredundant fashion. This, alone, is the central, defining fashion. This, alone, is the central, defining feature of the database approach.feature of the database approach.
Multiple RelationshipsMultiple Relationships - The ability to store data - The ability to store data representing entities involved in multiple representing entities involved in multiple relationships without introducing data relationships without introducing data redundancy or other structural problems. redundancy or other structural problems.
3-3-2121
The Database ConceptThe Database Concept
Data Control Issues - Data Control Issues - The establishment of The establishment of an environment that manages certain data an environment that manages certain data control issues, such as data security, control issues, such as data security, backup and recovery, and concurrency backup and recovery, and concurrency control.control.
Data IndependenceData Independence - The establishment of - The establishment of an environment that permits a high degree an environment that permits a high degree of data independence.of data independence.
3-3-2222
Data as a Manageable Data as a Manageable ResourceResource
Information systems environment:Information systems environment: HardwareHardware NetworksNetworks Applications softwareApplications software Systems softwareSystems software PeoplePeople DataData
3-3-2323
Data as a Manageable Data as a Manageable ResourceResource
Historically, data has not been the highest Historically, data has not been the highest priority concern.priority concern.
As the operational, tactical, and strategic As the operational, tactical, and strategic corporate levels became more dependent corporate levels became more dependent on information systems, data increasingly on information systems, data increasingly became recognized as an important became recognized as an important corporate resource.corporate resource.
3-3-2424
Data as a Manageable Data as a Manageable ResourceResource
The corporate community became The corporate community became increasingly convinced that a firm’s data increasingly convinced that a firm’s data could provide a significant competitive could provide a significant competitive advantage to the firm.advantage to the firm.
It became clear that data would have to be It became clear that data would have to be managed in an organized way.managed in an organized way.
3-3-2525
Data as a Manageable Data as a Manageable ResourceResource
3-3-2626
Data as a Manageable Data as a Manageable ResourceResource
Needed a Needed a software utilitysoftware utility that could that could manage and protect data.manage and protect data.
Data could be a critical Data could be a critical corporate corporate resourceresource..
Out of this need was born the database Out of this need was born the database management system.management system.
3-3-2727
Data as a Manageable Data as a Manageable ResourceResource
Reengineering - data is aggressively used Reengineering - data is aggressively used to redesign business processes.to redesign business processes.
Electronic commerce - a database at the Electronic commerce - a database at the heart of every web site; allows companies heart of every web site; allows companies and customers to conduct business.and customers to conduct business.
ERP systems - collections of application ERP systems - collections of application programs build around a central database.programs build around a central database.
3-3-2828
Data Integration and Data Data Integration and Data RedundancyRedundancy
Data integration - the ability to tie together Data integration - the ability to tie together pieces of related data within an pieces of related data within an information system.information system.
Data redundancy - the same fact about the Data redundancy - the same fact about the business environment is stored more than business environment is stored more than once within an information system.once within an information system.
3-3-2929
Data Redundancy - ProblemsData Redundancy - Problems
Redundant data takes up a great deal of Redundant data takes up a great deal of extra disk space. extra disk space.
If the redundant data has to be updated, it If the redundant data has to be updated, it takes additional time to do so. This can be takes additional time to do so. This can be a major performance issue.a major performance issue.
There is the potential for data integrity There is the potential for data integrity problems.problems.
3-3-3030
Data IntegrityData Integrity
Refers to the accuracy of the data.Refers to the accuracy of the data.
Inaccurate data leaves the whole Inaccurate data leaves the whole information system of limited value.information system of limited value.
3-3-3131
Data Redundancy,Data Redundancy,Data IntegrityData Integrity
When all copies of redundant data are not When all copies of redundant data are not updated consistently, a data integrity problem updated consistently, a data integrity problem exists.exists.
3-3-3232
Three Files with Redundant Three Files with Redundant DataData
3-3-3333
Three Files with a Data Three Files with a Data Integrity ProblemIntegrity Problem
3-3-3434
General General Hardware Hardware Company Company FilesFiles
3-3-3535
General Hardware Company General Hardware Company Combined FileCombined File
CustomerNumber
CustomerName
SalespersonNumber
HQ City SalespersonNumber
SalespersonName
Commission%
Yearof Hire
3-3-3636
AnomaliesAnomalies
Typically occur in poorly structured files.Typically occur in poorly structured files.
Problems arise when two different kinds of Problems arise when two different kinds of data, like salesperson and customer data data, like salesperson and customer data are merged into one file.are merged into one file.
3-3-3737
AnomaliesAnomalies Deletion Anomaly - e.g, if you delete a customer and that Deletion Anomaly - e.g, if you delete a customer and that
record was the only one for a salesperson, the record was the only one for a salesperson, the salesperson’s data is gone.salesperson’s data is gone.
Insertion Anomaly - e.g., General Hardware cannot add Insertion Anomaly - e.g., General Hardware cannot add data about a new salesperson the company just hired data about a new salesperson the company just hired until she is assigned at least one customer.until she is assigned at least one customer.
Update Anomaly - redundant data in the database file Update Anomaly - redundant data in the database file must be updated each place it exists when it changes.must be updated each place it exists when it changes.
3-3-3838
Database Management Database Management SystemSystem
A software utility for storing and retrieving A software utility for storing and retrieving data that gives the end-user the data that gives the end-user the impression that the data is well integrated impression that the data is well integrated even though the data can be stored with even though the data can be stored with no redundancy at all.no redundancy at all.
3-3-3939
Multiple Relationships - Multiple Relationships - Horizontal SolutionHorizontal Solution
3-3-4040
Multiple Relationships - Multiple Relationships - Vertical SolutionVertical Solution
3-3-4141
Data Control IssuesData Control Issues
Data securityData security
Backup and RecoveryBackup and Recovery
Concurrency ControlConcurrency Control
3-3-4242
Computer SecurityComputer Security
A very broad topicA very broad topic Protecting the physical hardware Protecting the physical hardware
environmentenvironment Defending against hacker attacksDefending against hacker attacks Encrypting data transmitted over networksEncrypting data transmitted over networks Educating employees on the importance of Educating employees on the importance of
protecting the company’s dataprotecting the company’s data … … and many moreand many more
3-3-4343
Backup and RecoveryBackup and Recovery
Data can be lost or corrupted in any of a Data can be lost or corrupted in any of a variety of ways:variety of ways: a disaster such as a fire, a hurricane, or an a disaster such as a fire, a hurricane, or an
earthquakeearthquake hackershackers computer virusescomputer viruses poorly written application programspoorly written application programs unintentional errorunintentional error
3-3-4444
Concurrency ProblemConcurrency Problem
Updates to a database can interfere with Updates to a database can interfere with each other in such a way that the resulting each other in such a way that the resulting data values will be incorrect.data values will be incorrect.
A database management system must be A database management system must be designed to protect its databases from designed to protect its databases from such an eventuality.such an eventuality.
3-3-4545
Data IndependenceData Independence
Data Dependence - if for any reason the storage Data Dependence - if for any reason the storage characteristics of the data had to be changed, characteristics of the data had to be changed, the application program itself had to be modified, the application program itself had to be modified, often extensively.often extensively.
Data Independence - to have a data storage and Data Independence - to have a data storage and programming environment in which as many programming environment in which as many types of changes in the data structure as types of changes in the data structure as possible would not require changes in the possible would not require changes in the application programs that use them.application programs that use them.
3-3-4646
Major DBMS ApproachesMajor DBMS Approaches
Hierarchical - navigationalHierarchical - navigational
Network - navigationalNetwork - navigational
Relational - became commercially viable in Relational - became commercially viable in about 1980.about 1980.
Object-oriented - useful for a variety of niche Object-oriented - useful for a variety of niche applications.applications.
3-3-4747
Hierarchical & NetworkHierarchical & Network
Called navigational approaches because Called navigational approaches because of the way that programs have to of the way that programs have to “navigate” through hierarchies and “navigate” through hierarchies and networks of data to find needed data.networks of data to find needed data.
Developed in the 1960s and 1970s.Developed in the 1960s and 1970s.
Somewhat similar in structure.Somewhat similar in structure.
3-3-4848
Hierarchical & NetworkHierarchical & Network
Suitable only for mainframe computersSuitable only for mainframe computers
were an elegant solution to the were an elegant solution to the redundancy/integration problem at the timeredundancy/integration problem at the time
Complex, difficult to workComplex, difficult to work
Now considered legacy systemsNow considered legacy systems
3-3-4949
Relational DatabaseRelational Database
Became commercially viable in about Became commercially viable in about 19801980
Soon became the preferred DBMS Soon became the preferred DBMS approach and it has remained so ever approach and it has remained so ever since.since.
3-3-5050
Object-orientedObject-oriented
Has proven useful for a variety of niche Has proven useful for a variety of niche applications applications
It is interesting to note that some of the It is interesting to note that some of the key object-oriented database concepts key object-oriented database concepts have found their way into some of the have found their way into some of the mainstream relational DBMSs and some mainstream relational DBMSs and some are described as taking a hybrid are described as taking a hybrid object/relational approach to database.object/relational approach to database.
3-3-5151
“Copyright 2004 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without express permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for distribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages caused by the use of these programs or from the use of the information contained herein.”