Beruflich Dokumente
Kultur Dokumente
V View of Data
V Data Models
V Data Definition Language
V Data Manipulation Language
V Transaction Management
V Storage Management
V Database Administrator
V Database Users
V Overall System Structure
V Rollection of interrelated data
V Set of programs to access the data
V DBMS contains information about a
particular enterprise
V DBMS provides an environment that is both
O and O to use.
V Database Applications:
× Banking: all transactions
× Airlines: reservations, schedules
× Universities: registration, grades
× Sales: customers, products, purchases
× Manufacturing: production, inventory, orders, supply chain
× Human resources: employee records, salaries, tax deductions
V
n the early days, database applications
were built on top of file systems
V Drawbacks of using file systems to store
data:
× Data redundancy and inconsistency
J Multiple file formats, duplication of information in different files
× Difficulty in accessing data
×
ntegrity problems
J
ntegrity constraints (e.g. account balance > 0) become part of
program code
J Hard to add new constraints or change existing ones
V Drawbacks of using file systems (cont.)
× Atomicity of updates
J ½ailures may leave database in an inconsistent state with partial updates
carried out
J E.g. transfer of funds from one account to another should either
complete or not happen at all
× Roncurrent access by multiple users
J Roncurrent accessed needed for performance
J Uncontrolled concurrent accesses can lead to inconsistencies
J E.g. two people reading a balance and updating it at the same time
× Security problems
V Database systems offer solutions to all the
above problems
V Users
V Application programmer
V End-users
V Database Administrator
V Software
V Hardware
V Data
V Roordinates all the activities of the
database system; the database
administrator has a good
understanding of the enterpriseǯs
information resources and needs.
V Database administrator's duties
include:
× Storage structure and access method definition
× Schema and physical organization modification
× Granting user authority to access the database
× Specifying integrity constraints
× Monitoring performance and responding to changes in
requirements
V eduction in data redundancy
V eduction in
nconsistency
V Sharing of data
V Enforcement of standards
V
mprovement in data security
V Maintenance of data integrity
V Better interaction with users
V Efficient system
V Problems Associated with Rentralization
V Rost of Software
V Rost of Hardware
V Romplexity of Backup and ecovery
V Ê
V A data model is a "description" of both a
container for data and a methodology for
storing and retrieving data from that
container
V Hierarchical data model
V elational Model
Program 3 Meta-Data
DATABASE
Program 1
Meta-
Program 2 Data Data
Program 3
elationships were implemented by physical
pointers (called Dzsetsdz) which allowed records
to be connected in different files. O O
databases allow only one parent set;
ks allow several. These permit
efficient processing but the sets must be
constructed on data entry and cannot be
rearranged later.
elational models implement relationships
with matched data values in related files
(called primary and foreign keys). Any
attributes can be matched. The connection is
established at retrieval so interconnections
can be developed as needed.
p
Each file can have only one parent. To implement a second ³parent´ (COLLEGE) we have to implement a
shadow copy.
p
Each file can have several parents. Both SECTION and COLLEGE are ³parent´ files..
p
p
p COLLEGE-KEY
COLLEGE-KEY
Each file can have several parents. Both SECTION and COLLEGE are ³parent´ files..
V Ô
× Person, place, thing or event about which we wish
to keep data
V 2
× property of an entity
V
× an association among entities (entity records)
V Physical level describes how a record (e.g.,
customer) is stored.
V Logical level: describes data stored in database,
and the relationships among the data.
customer =
: string;
s : string;
Oy : integer;
;
V View level: application programs hide details of
data types. Views can also hide information
(e.g., salary) for security purposes.
An architecture for a database system
V Similar to types and variables in programming languages
V p
* the logical structure of the database
× e.g., the database consists of information about a set of customers and accounts and
the relationship between them)
× Analogous to type information of a variable in a program
×
: database design at the physical level
×
: database design at the logical level
V
* the actual content of the database at a particular point in time
× Analogous to the value of a variable
V
Ê
* the ability to modify the physical schema
without changing the logical schema
× Applications depend on the logical schema
×
n general, the interfaces between the various levels and components should be well
defined so that changes in some parts do not seriously influence others.
V 2 c ll cti ft ls f r scri i
× ÷ata
× ÷ata r lati s i s
× ÷ata s a tics
× ÷ata c strai ts
V Ô tity-R lati s i ÷l
V Rlati al ÷l
V t r ÷ls:
× w jct-wri t÷ w÷l
× si-str ct r÷ ÷ata w÷ls
× l÷r w÷ls: t wrk w÷l a ÷ irarc ical w÷l
Example of schema in the entity-relationship model
V E- model of real world
× Entities (objects)
J E.g. customers, accounts, bank branch
× elationships between entities
J E.g. Account A-101 is held by customer Johnson
J elationship set
s associates customers with accounts
V idely used for database design
× Database design in E- model usually converted to design in the relational
model (coming up next) which is used for storage and processing
Attributes