Chapter 1: Introduction
Part 1: Relational databases
1.2
Chapter 1: Introduction
1.1
Database-System Applications
1.2
1.3
View of Data
1.4
Database Languages
1.5
Relational Databases
1.6
Database Design
1.7
1.8
1.9
Transaction Management
1.3
Database Applications:
Banking: transactions
1.4
In the early days, database applications were built directly on top of file
systems
1.5
1.6
Files supported by OS
Branch name
account
account
custimer
account
Account number
1.7
Security problems
1.8
Levels of Abstraction
Physical level: describes how a record (e.g., customer) is stored.
Logical level: describes data stored in database, and the relationships among
the data.
1.9
Data Levels
1.10
View of Data
An architecture for a database system
1.11
Physical Data Independence the ability to modify the physical schema without
In general, the interfaces between the various levels and components should
be well defined so that changes in some parts do not seriously influence others.
1.12
Data Models
A collection of tools for describing
Data
Data relationships
Data semantics
Data constraints
Relational model
Entity-Relationship data model (mainly for database design)
Object-based data models (Object-oriented and Object-relational)
Semistructured data model (XML)
Other older models:
Network model
Hierarchical model
1.13
1.14
1.15
street
city
amount
Lowerly
Maple
Queens
900
Shiver
North
Bronx
556
Shiver
North
Bronx
647
Hodges
SideHill
Brooklyn
801
Hodges
SideHill
Brooklyn
647
Is-part-of relationship
ISA relationship
1.16
OR Data Model
name
street
city
amount
Lowerly
Maple
Queens
900
Shiver
North
Bronx
556
Shiver
North
Bronx
647
Hodges
SideHill
Brooklyn
801
Hodges
SideHill
Brooklyn
647
1.17
<Bib>
XML data
OEM Model
1.18
Maple Queens
Shiver
Amount
records
900
North
556
1.19
Bronx
647
647
801
data model
Procedural user specifies what data is required and how to get those data
1.20
Database schema
Integrity constraints
Authorization
1.21
Relational Model
Columns
Rows
1.22
1.23
SQL
SQL: widely used non-procedural language
Chapters 3, 4 and 5
1.24
1.25
Database Design?
Is there any problem with this design?
1.26
Design Approaches
Normalization Theory (Chapter 8)
1.27
1.28
1.29
XML has become the basis for all new generation data interchange formats.
A wide variety of tools is available for parsing, browsing and querying XML
documents/data
1.30
Storage Management
Storage manager is a program module that provides the interface between the
low-level data stored in the database and the application programs and queries
submitted to the system.
Issues:
Storage access
File organization
1.31
Query Processing
1. Parsing and translation
2. Optimization
3. Evaluation
1.32
Equivalent expressions
Cost difference between a good and a bad way of evaluating a query can be
enormous
1.33
a consistent (correct) state despite system failures (e.g., power failures and
operating system crashes) and transaction failures.
1.34
1. read(A)
2. A := A 50
3. write(A)
4. read(B)
5. B := B + 50
6.
write(B)
Two people P1 and P2 are using two company debit cards for business
1.35
Data-Warehouse (DW)
1.36
1.37
Database Architecture
The architecture of a database systems is greatly influenced by
the underlying computer system on which the database is running:
Centralized
Client-server
Parallel (multi-processor)
Distributed
1.38
Figure 1.06
1.39
Database
1.40
Database Users
Users are differentiated by the way they expect to interact with the system
Application programmers interact with system through DML calls
Sophisticated users form requests in a database query language
Specialized users write specialized database applications that do not fit into
Nave users invoke one of the permanent application programs that have
Examples, people accessing database over the web, bank tellers, clerical
staff
1.41
Database Administrator
Coordinates all the activities of the database system; the database administrator
Schema definition
1.42
1.43
1990s:
Early 2000s:
Later 2000s:
1.44
End of Chapter 1
1.45
Figure 1.02
1.46
Figure 1.04
1.47