Professional Documents
Culture Documents
Systems
5. Atomicity problems
- Failures may leave database in an
inconsistent state with partial updates
carried out. E.g., transfer of funds from
one account to another should either
complete or not happen at all.
Database Systems Vs File
Systems ( Why DBMS?)
6. Concurrent-access anomalies
- Needed for system performance and
usability
- Uncontrolled concurrent accesses can lead
to inconsistencies. E.g. two people reading
a balance and updating it at the same time.
Database Systems Vs File
Systems ( Why DBMS?)
1. Microsoft Access
2. FoxPro
3. dBase
Some Commercial Database
Management Systems
1. Oracle
2. Microsoft SQL Server
3. IBM DB2/DB2UDB
4. Informix
5. Sybase
6. MySQL
7. Ingress
8. Postgre SQL
Goals/Purposes of DBMS
The primary goal of a DBMS is to provide an
environment that is both convenient and efficient for
people to use in retrieving and storing information.
Database systems are designed to manage large
bodies of information. Management of data
involves both defining structures for storage of
information and providing mechanisms for
manipulation of information.
Goals/Purposes of DBMS
For Example:
create table customer (
customer_id varchar(10),
customer_name varchar
(35), customer_street
varchar (20),
salary number (10,2));
Data Abstraction
3. View level: The highest level of
abstraction describes only part of the entire
database. Computer users see a set of
application programs that hide details of data
types. Several views of database are defined
and users see these views. In addition to
hiding details, the views also provide a
security mechanism to prevent users from
accessing certain part of the database.
Data Abstraction
Instances and Schemas
Schemas are:
1. Physical schema: Describes the database
design at physical level
2. Logical schema: Describes the database
design at logical level
3. View schema: Describes the database design
at view level
Instances and Schemas
Instances: Databases change over time as
information is inserted and deleted. The
collection of information stored in the
database at a particular moment is called an
instance of the database. While executing, each
variable of a programming language has a
particular value at a given instant. The values of
the variable in a program at a point in time
correspond to an instance of the database
schema.
Instances and Schemas
Relationship: A relationship is an
association among several entities. A
depositor relationship associates a customer
with each account that he or she has.
The set of all entities of the same type and
the set of all relationships of the same type
are termed an entity set and relationship
set, respectively
Data Models
Data Models
B. Other Models:
B. 1. Object-oriented data model: Drawing
increasing attention. It can be seen as
extending of E-R model with notions of
encapsulation, methods (functions) and
object identity.
B. 2. Object-relational data model:
Combines the features of object-oriented
data model and relational data model.
Data Models
C. 2. Hierarchical model
A Hierarchical Database for a Human Resources
System
Hierarchical and Network DBMS
Network DBMS:
• Depicts data logically as many-to-many
relationships
1. View definition
2. Transaction control
3. Embedded SQL and dynamic SQL
4. Integrity definition
5. Authority definition
Database Languages
General format:
A transaction is a collection of
operations that performs a single logical
function in a database application
_ e.g., deposit, withdrawal, transfer
between accounts
A – Atomicity, C – Consistency, I –
Isolation, D - Durability
Transaction Management
Transaction-management component
ensures that the database remains in a
consistent (correct) state despite system
failures (e.g., power failures and
operating system crashes) and
transaction failures
_ e.g., system crash cannot wipe out
“committed” transactions
Transaction Management
Concurrency-control manager
controls the interaction among the
concurrent transactions, to ensure the
consistency of the database
_ e.g., two users accessing the same
bank account cannot “corrupt” the
system or withdraw more than allowed
Database System Structure
Components include:
1. DDL interpreter
2. DML compiler
3. Query evaluation engine
Thank
You