database principles: fundamentals of design...
TRANSCRIPT
1
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Database Principles: Database Principles: Fundamentals of Design, Fundamentals of Design,
Implementation, and ManagementImplementation, and ManagementTenth EditionTenth Edition
MDM NUR RAZIA BINTI MOHD SURADIMDM NUR RAZIA BINTI MOHD SURADI019019--39328463932846
[email protected]@unisel.edu.my
1
Chapter 1File System and Database
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
IntroductionIntroduction Good decisions require good information
derived from raw facts Data is managed most efficiently when
stored in a database Databases evolved(to change or develop
slowly) from computer file systems Understanding file system characteristics
is important
2
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Data vs. InformationData vs. Information Data are raw facts Information is the result of processing
raw data to reveal meaning Information requires context to reveal
meaning Raw data must be formatted for storage,
processing, and presentation Data are the foundation of information,
which is the bedrock(core) of knowledge
2
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Data vs. Information (continued)Data vs. Information (continued)
Accurate, relevant, timely information is the key to good decision making
Good decision making is the key to organizational survival
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Introducing the Database and the Introducing the Database and the DBMSDBMS Database: shared, integrated computer
structure that stores a collection of :-◦ End-user data: raw facts of interest to
the end user◦ Metadata: data about data
Metadata provides description of data characteristics and relationships in data
Database management system(DBMS): collection of programs◦ Manage structure and control access to data
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Role and Advantages of the DBMSRole and Advantages of the DBMS
DBMS is the intermediary between the user and the database
Database structure is stored as file collection
Access database through the DBMS DBMS enables data to be shared DBMS integrates many users’ views of the
data
3
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Role and Advantages of the DBMS Role and Advantages of the DBMS (continued)(continued)
Advantages of a DBMS: Improved data sharing Improved data securityBetter data integrationMinimized data inconsistency (different versions of the same data appear in different places) Improved data access Improved decision making Increased end-user productivity
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Types of DatabasesTypes of Databases
Databases can be classified according to:i. Number of usersii. Database location(s)iii. Expected type and extent of use
4
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
1.1.Number of usersNumber of users
Single-user database supports only one user at a timeDesktop database – single-user, runs on PC
Multiuser database supports multiple users at the same timeWorkgroup database supports a small numberEnterprise database supports a large number
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
2. Database location(s)2. Database location(s)
Centralized database: data located at a single site
Distributed database: data distributed across several different sites
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
3. Expected type and extent of 3. Expected type and extent of useuse
Operational database: supports a company’s day-to-day operationsTransactional or production database
Data warehouse: stores data used for tactical or strategic decisions
5
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Why Database Design is ImportantWhy Database Design is Important
Database design focuses on design of database structure used for end-user data Designer must identify database’s expected use
Well-designed database: Facilitates(assist) data management Generates accurate and valuable information
Poorly designed database: Causes difficult-to-trace errors
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Historical Roots: Files and File Historical Roots: Files and File SystemsSystems
Manual File System File systems typically composed of
collection of file folders, each tagged and kept in a filing cabinet.
6
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Historical Roots: Files and File Historical Roots: Files and File Systems (continued)Systems (continued)
Contents of each file folder logically related Manual system served as a data repository for
small data collections◦ Cumbersome(hard to manage) for large collections
Data processing (DP) specialist converted computer file structure from manual system◦ Wrote software that managed the data◦ Designed the application programs
Initially, computer files systems resembled(similar to) manual systems
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
17
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
18
7
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Problems with File System Data Problems with File System Data ManagementManagement
1. File system is an improvement over manual system File systems used for more than two decades Understanding the shortcomings of file systems aids in
development of modern databases
2. Even simple file system retrieval task required extensive programming Ad hoc queries impossible Changing existing structure difficult
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Problems with File System Data Problems with File System Data Management (continued)Management (continued)
3. Security features difficult to program Often omitted in file system environments
4. Summary of file system limitations: Requires extensive programming – the number of file
systems expand. Each file system have their own user. Can not perform ad hoc queries System administration complex and difficult Difficult to make changes to existing structures Security features likely to be inadequate
5. Data Redundancy same data stored unnecessarily in different places
8
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Data RedundancyData Redundancy File system structure makes it difficult to
combine data from multiple sourcesVulnerable to security breaches
Organizational structure promotes storage of same data in different locations Islands of information
Data stored in different locations is unlikely to be updated consistently
Data redundancy: same data stored unnecessarily in different places
22
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Data Redundancy (continued)Data Redundancy (continued)
Data inconsistency: different and conflicting versions of same data occur at different places
Data anomalies: abnormalities when all changes in redundant data not made correctly◦ Update anomalies ◦ Insertion anomalies◦ Deletion anomalies
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Database SystemsDatabase Systems
Database system consists of logically related data stored in a single logical data repository◦ May be physically distributed among multiple
storage facilities DBMS eliminates most of file system’s
problems
9
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
The Database System EnvironmentThe Database System Environment
Database system: defines and regulates (direct according to rule or law) the collection, storage, management, use of data
Five major parts of a database system: Hardware Software People ProceduresData
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
10
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
The Database System The Database System Environment (continued)Environment (continued)
Hardware: all the system’s physical devices Software: three types of software required:◦ Operating system software◦ DBMS software◦ Application programs and utility software
People: all users of the database system:◦ System and database administrators◦ Database designers◦ Systems analysts and programmers◦ End users
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
The Database System Environment The Database System Environment (continued)(continued)
Procedures: instructions and rules that govern the design and use of the database system
Data: the collection of facts stored in the database
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
DBMS FunctionsDBMS Functions
1. Most functions transparent to end users2. Data dictionary management3. Data storage management4. Data transformation and presentation5. Security management6. Multiuser access control7. Backup and recovery management
11
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
DBMS Functions (continued)DBMS Functions (continued)
8. Data integrity management9. Database access languages and
application programming interfaces10. Database communication interfaces
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Managing the Database Managing the Database SystemSystem Database system provides a framework
in which strict procedures and standards enforced
Database system enables more sophisticated use of the data
Data structures created within the database and their relationships determine effectiveness
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Managing the Database Managing the Database System (continued)System (continued)
Disadvantages of database systems:◦ Increased costs◦ Management complexity: involved technology,
resources◦ Maintaining currency◦ Vendor dependence: technology investment,
training◦ Frequent upgrade/replacement cycles:
hardware/ software upgrades, training
12
© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.© 2013 Cengage Learning. All Rights Reserved. This edition is intended for use outside of the U.S. only, with content that may be dif ferent f rom the U.S. Edition. May not be scanned, copied, duplicated, or posted to a publicly accessible website, in whole or in part.
Questions Questions &&
DiscussionDiscussion