Você está na página 1de 32

CIS 360

Introduction to Databases
Professor: Yili (Kevin) Hong

Data
entry

The Information
Architecture of an
Organization
Transactiona
l Database
Stores realtime
transactional
data

Data
extraction

Analytical
Data Store
Stores
historical
transactional
and summary
data

Data interpretation,
visualization, communication

Week 1B

Data
analysis

Intro to Databases
Objectives

Learn the difference between data and


information
Learn what a database is, the different types and
why they are valuable tools for decision making
How modern databases evolved from basic file
systems
Flaws in the file system data management
Main components of a database system

Week 1B

It all
starts
with
data
Gatherin
g

Storing

Data
Retrievin Interpreti
ng
g
Week 1B

Almost every
business
action
requires at
least one of
these!

Data versus information

Data
Discrete,
unorganize
d, raw facts

Week 1B

Informat
ion
The
transformat
ion of those
facts into
meaning

Data 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 of knowledge

Week 1B

Data vs. Information


(contd)

Data: building blocks of information


Information produced by processing data
Information used to reveal meaning in
data
Accurate, relevant, timely information is
the key to good decision making
Good decision making is the key to
organizational survival
Data management: focuses on proper
generation, storage, and retrieval of data

Week 1B

What is a 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

Week 1B

Types of Databases

Databases can be classified according to:

Single-user database supports only one


user at a time

Number of users
Database location(s)
Expected type and extent of use

Desktop database: single-user; runs on PC

Multiuser database supports multiple users


at the same time

Workgroup and enterprise databases

Week 1B

10

Types of Databases (contd)

Centralized database: data located at a


single site
Distributed database: data distributed
across several different sites
Operational database: supports a
companys day-to-day operations

aka. Transactional database

Data warehouse: stores data used for


tactical or strategic decisions

aka. Analytical data store

Week 1B

11

Advantages Why
Databases?

Databases solve many of the problems


encountered in data management

Used in almost all modern settings involving


data management:
Business
Research
Administration

Important to understand how databases


work and interact with other applications

Week 1B

12

Database Management System (DBMS) is the


intermediary between the user and the database

Database structure stored as file collection


Can only access files through the DBMS

DBMS enables data to be shared


DBMS integrates many users views of the data

Week 1B

13

Advantages

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

Week 1B

14

A brief history of data


management

Data storage and


retrieval prior to the era
of digital computers
File systems typically
composed of collection
of file folders, each
tagged and kept in
cabinet

Organized by expected
use

Contents of each file


folder are logically
related
Manual file systems

Served as a data
repository for small data

15

A brief history of data


management
Data storage in the early days of digital

computers using text files (AKA flat files)


Computerized file systems

Data processing (DP) specialist converted computer


file structure from manual system
Wrote software that managed the data
Designed the application programs
ID Number First Name Last Name Department
4 characters8 characters 8 characters 8 characters

Employees

Bitstream from
file stored on
digital tape drive

Note truncation of lengthy


data

16
16

A brief history of data


management

Customers

1960s and 70s brought


improvements in hardware and
storage approaches

Invoices

Random Access Memory (RAM)


Improved sorting algorithms
Indexing schemes to speed up
processing and integrate multiple
files
DataBase
Management
Computer
program (or Systems
a DBMS)
(DBMS)matches invoices with customers by
searching the Invoice file on the
Customer_ID index
Monthly
Statement

17

A brief history of data


management

By the 1980s, several database


architectures were commonly available

Indexed Sequential Access Method


(ISAM)

Hierarchical Model and Network


Model

Flat files with separate indexes; no DBMS

Data objects are linked by pre-defined


Parent-to-Child pointers; fast and
inflexible approach

Relational Model

Data linked at run-time to form

18
18

A brief history of data


management

By the 2000s
faster
processor
speeds and
cheaper
hardware
prices allowed
relational
databases to
dominate the
business world

Microsoft Access: A common relational


database
19
19

Why more than one table?

Every reservation
has a passenger
and a flight
Passengers and
flights have an ID
number
Split the details off
into separate tables

This is good because:

Reservation

FlightID

Flight

AircraftID

ZipCode

Price

City
State

DatePurchased

FlightID

Name
Street

Name

1 PassengerID

PassengerID
SeatID

FlightNumber
DepartureCity
ArrivalCity
ArrivalTime

Aircraft Seat

Aircraft

DepartureTime

Information is
entered and stored
once
Minimizes
redundancy
Week
1B

Passenger

ReservationID

AircraftID
Type
Capacity

1 SeatID
1

n AircraftID
RowNumber
SeatNumber
Class

Data Redundancy

File system structure makes it difficult to


combine data from multiple sources

Organizational structure promotes storage


of same data in different locations

Vulnerable to security breaches

Islands of information

Data stored in different locations is


unlikely to be updated consistently
Data redundancy: same data stored
unnecessarily in different places

Week 1B

22

Data Redundancy (contd)

Data inconsistency: different and


conflicting versions of same data occur at
different places
Data anomalies: abnormalities when all
changes in redundant data are not made
correctly

Update anomalies
Insertion anomalies
Deletion anomalies

Week 1B

23

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

Week 1B

24

The Database System Environment


(contd.)

Hardware: all the systems physical


devices
Software: three types of software required

Operating system software


DBMS software
Application programs and utility software (GUI
tools, e.g., MySQL Workbench)

Week 1B

25

The Database System Environment


(contd)

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

Week 1B

26

DBMS Functions

Most functions are 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 and removes
27
Week 1Bstructural and data dependency

DBMS Functions (contd)

Data transformation and presentation

DBMS transforms data entered to conform to


required data structures
DBMS transforms physically retrieved data to
conform to users logical expectations

Security management

DBMS creates a security system that enforces


user security and data privacy
Security rules determine which users can
access the database, which items can be
accessed, etc.

Week 1B

28

DBMS Functions (cont'd.)

Multi-user access control

DBMS uses sophisticated algorithms to ensure


concurrent access does not affect integrity

Backup and recovery management

DBMS provides backup and data recovery to


ensure data safety and integrity
Recovery management deals with recovery of
database after a failure
Critical to preserving databases integrity

Week 1B

29

DBMS Functions (cont'd.)

Data integrity management

DBMS promotes and enforces integrity rules


Minimizes redundancy
Maximizes consistency
Data relationships stored in data dictionary
used to enforce data integrity
Integrity is especially important in transactionoriented database systems

Week 1B

30

DBMS Functions (cont'd.)

Database access languages and


application programming interfaces

DBMS provides access through a query


language
Query language is a nonprocedural language
Structured Query Language (SQL) is the de
facto query language
Standard supported by majority of DBMS
vendors

Note: non-procedural language requires the programmer to


specify what the program should do, rather than (as with a
31
Week 1B
procedural language) providing the sequential steps indicating

Data
entry
Transactiona
l Database
Stores realtime
transactional
data

Data
extraction

Data
analysis
Analytical
Data Store
Stores
historical
transactional
and summary
data

Data interpretation,
visualization, communication

Week 1B

32

Você também pode gostar