Chapter One - Database System[1]
Chapter One - Database System[1]
Chapter 1
Database Systems
Objectives
2
Objectives (continued)
8
9
Role and Advantages of the DBMS
(continued)
• Advantages of a DBMS:
– Improved data sharing
– Improved data security
– Better data integration
– Minimized data inconsistency
– Improved data access
– Improved decision making
– Increased end-user productivity
10
Types of Databases
• Databases can be classified according to:
– Number of users
– Database location(s)
– Expected type and extent of use
• Single-user database supports only one user
at a time
– Desktop database – single-user, runs on PC
• Multiuser database supports multiple users at
the same time
– Workgroup database supports a small number
– Enterprise database supports a large number
11
Types of Databases (continued)
15
1.4 Historical Roots: Files and File Systems
22
Problems with File System Data
Management (continued)
• Security features difficult to program
– Often omitted in file system environments
• Summary of file system limitations:
– Requires extensive programming
– Can not perform ad hoc queries
– System administration complex and difficult
– Difficult to make changes to existing structures
– Security features likely to be inadequate
23
Structural and Data Dependence
• Structural dependence: access to a file
dependent on its own structure
– All file system programs must be modified to
conform to a new file structure
• Structural independence: change file
structure without affecting data access
• Data dependence: data access changes when
data storage characteristics change
• Data independence: data storage
characteristics do not affect data access
24
Structural and Data Dependence
(continued)
• Practical significance of data dependence is
difference between logical and physical format
• Logical data format: how human views the
data
• Physical data format: how computer must
work with data
• Each program must contain:
– Lines specifying opening of specific file type
– Record specification
– Field definitions
25
Field Definitions and
Naming Conventions
• Storing customer name as single field is a
liability
– Better record definition breaks fields into
component parts
• Selecting proper field names important; field
names are descriptive
– With proper naming conventions, file structure
becomes self-documenting
– Some software places restrictions on length of
field names
• Each record should have unique identifier
26
27
Data Redundancy
• File system structure makes it difficult to
combine data from multiple sources
– Vulnerable to security breaches
• Organizational structure promotes storage of
same data in different locations
– Islands of information
• Data stored in different locations unlikely to be
updated consistently
• Data redundancy: same data stored
unnecessarily in different places
28
Data Redundancy (continued)
29
1.6 Database 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
• Current generation stores data structures,
relationships between structures, access paths
– Takes care of defining, storing, managing all
access paths and components
30
31
The Database System Environment
32
33
The Database System 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
34
The Database System Environment
(continued)
• Procedures: instructions and rules that govern
the design and use of the database system
• Data: the collection of facts stored in the
database
• Database systems created and managed at
different levels of complexity
• Database solutions must be cost-effective as
well as tactically and strategically effective
• Database technology already in use affects
selection of a database system
35
DBMS Functions
• Most functions transparent to end users
– Can only be achieved through the DBMS
• Data dictionary management
– DBMS stores definitions of data elements and
relationships (metadata) in a data dictionary
– DBMS looks up required data component
structures and relationships
– Changes automatically recorded in the
dictionary
– DBMS provides data abstraction, removes
structural and data dependency
36
37
Figure 1.8
DBMS Functions (continued)
38
39
DBMS Functions (continued)
41
DBMS Functions (continued)
42
DBMS Functions (continued)
43
DBMS Functions (continued)
45
Managing the Database System:
A Shift in Focus (continued)
• Disadvantages of database systems:
– Increased costs
– Management complexity
– Maintaining currency
– Vendor dependence
– Frequent upgrade/replacement cycles
46
Summary
47
Summary (continued)
• Metadata is data about data
• Database design defines the database
structure
– Well-designed database facilitates data
management, generates valuable information
– Poorly-designed database leads to bad decision
making, organizational failure
• Databases evolved from manual and
computerized file systems
– In a file system, data stored in independent files
• Each requires its own management program
48
Summary (continued)
49
Summary (continued)
50