M1 introDB
M1 introDB
M1 introDB
Database Systems
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
.
Learning Objectives
• The difference between data and information
• What a database is, the various types of databases,
and why they are valuable assets for decision 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)
Why Databases?
• Databases solve many of the problems encountered
in data management
• Used in almost all modern settings involving data
management:
• Business
• Research
• Administration
• Example
• I have access to data, so I can check the last name of customer with ID
10001
• I have access to information: I can find the customer who has paid the
most among all services in year 2015.
• I can extract knowledge: by applying data analytics, I can find
correlations between products and use these correlations for
recommendation.
Data versus Information
Data Information
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
6
Database &
Management Systems
(DBMS)
Introducing the Database
• Database: shared, integrated computer structure
that stores a collection of:
• End-user data: raw facts of interest to end user
• Metadata: data about data
• Provides description of data characteristics and relationships in
data
• Complements and expands value of data
• Database management system (DBMS): collection
of programs
• Manages structure and controls access to data
10
Role and Advantages of the
DBMS (cont’d.)
• 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
• Number of users:
• Single-user database supports only one user at a time
• Desktop database: single-user; runs on PC
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
19
Figure 1.8 - A Simple File System
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
20
Before the Age of Databases? File Systems!
(cont.)
c) File System Redux: Modern Tools
• Microsoft Excel
• Widely used by business users
• Users have become so adept at working with
spreadsheets, they tend to use them to complete
tasks for which spreadsheets are not appropriate –
database substitute
Evolution of File System Data Processing
Extensive programming
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
23
More problems: (a) Structural and Data
Dependence
• Structural dependence: access to a file is dependent
on its own structure
• All file system programs must be modified to conform to a
new file structure
• Versus Structural Independence: change file structure
without affecting data access
Update Anomalies
Insertion Anomalies
Deletion Anomalies
Data Anomalies
Modification anomaly
- Change the address for employee 519 – has to be done for all rows
- What if this employee address is in another table – has to be done for
all tables
Data Anomalies
Deletion anomaly
- Dr. Giddens is not teaching ENG-206 this semester
- We could lose the hire date if we remove this row to reflect current
faculty and their courses
Data Anomalies
Insertion anomaly
- We can record the details of any faculty member who teaches at least
one course in 2007
- We cannot record the details of a newly hired faculty member who
has not yet been assigned to teach any courses
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, and access paths
• Also defines, stores, and manages all access paths and
components
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
31
The Database System
Environment
• Database system: defines and regulates the
collection, storage, management, use of data
• Five major parts of a database system:
• Hardware
• Software
• People
• Procedures
• Data
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
33
The Database System Environment
• 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
• Procedures: instructions and rules that govern the design and
use of the database system
• Data: the collection of facts stored in the database
Security management
• Enforces user security and data privacy
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
36
DBMS Functions
Multiuser access control
• Sophisticated algorithms ensure that multiple users can access the
database concurrently without compromising its integrity
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
38
Disadvantages of Database Systems
Increased costs
Management complexity
Maintaining currency
Vendor dependence
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use.
39
40
©2017 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part, except for use as permitted in a license
distributed with a certain product or service or otherwise on a password-protected website or school-approved learning management system for classroom use. 31