2. Overview
n Introduction to DBMS
n Purpose
n Problems with conventional systems
n Advantages of database
n Different Data Models
n Hierarchical
n Networks
n Relational
n Object Oriented
n Object Relational
3. Data
n Is any name,place,animal or thing
n Two types of data are stored within a
database:
n User data: Data that must be stored by
an organization.
n System data: Data the database needs to
manage user data to manage itself. This
is also termed metadata, or the data
about data.
4. What Is A Database?
n “A set of information held in a
computer”
n “One or more large structured sets of
persistent data, usually associated with
software to update and query the data”
n “A collection of data arranged for ease
and speed of search and retrieval”
5. Database Systems
n A database system consists of
n Data (the database)
n Software
n Hardware
n Users
6. Database Management
Systems
n A database management system (DBMS)
manages the data in a database.
n A DBMS is a collection of programs that
enables the users to create and maintain a
database.
n A DBMS also enables data to be shared;
information system users and managers can
get more information value from the same
amount of data when data sharing occurs.
7. Database Management
Systems
n A database is a collection of information
n A database management system
(DBMS) is the software than controls
that information
n Examples:
n Oracle
n DB2 (IBM)
n MS SQL Server
n MS Access
n Ingres
n PostgreSQL
n MySQL
8. Purpose of Database Systems
Database management streamlines
application development.
n Reduces data redundancy
n Ensures data integrity
9. Problems with conventional
systems
n No sharing
n Data isolation
n Diffused responsibilities
n Poor coordination
n Data redundancy
n Weak integrity
10. DBMS While in Action
naive casual
users users programmers DBA
canned schema
appl.
program query command
program
DBMS
Operating System
11. Advantages of the Database
Approach
n Control of data redundancy
n Data consistency
n Greater informational gain, more information
from the same amount of data
n Sharing data, organizational resource (i.e.,
shared resource)
n Improved data integrity, validity and
consistency
n Improved access and security
n Enforcement of standards
12. Advantages of the Database
Approach
n Economy of scale, centralization and
consolidation
n Balancing of conflicting requirements, DBA
oversees data and data definitions
n Improved data accessibility and
responsiveness
n Increased productivity
n Improved maintenance through data
independence
n Increased currency
n Improved backup and recovery services
13. The Foundation
n of any database environment is a robust
database design
n the design uses data models to specify the
design
n data independence requirement stipulates
typically three models
n three `classical’ models have been very
popular
n two more are emerging as strong contenders
14. 1. Hierarchical Model
Tree Structure Diagram course record type
link
module student
faculty book test assign perf attend fee
session
15. Hierarchical Model
n The hierarchical data model organizes data in
a tree structure
n Data in a series of records, which have a set
of field values attached to it. It collects all the
instances of a specific record together as a
record type
n To create links between these record types,
the hierarchical model uses Parent Child
Relationships
16. Hierarchical Database
pgdst95
pgdst95 record instances
pgdst95
pgdst95
trees pgdst95
db
db XX
db
db XXX
db
ps
ps korth test1 asgn1
korth test1 asgn1 65 65 1-Y 3600
1-Y 3600
ps
ps korth test1 asgn1
korth test1 asgn1 65
65 1-Y 3600
1-YY 3600
ps korth test1 asgn1 65 1-
1-Y 3600
s1
s1
s1
s1
Database
s1
17. 2. Network (CODASYL) Model
record type
Data Structure Diagram
course set type
c_m c_s
module student
m_f s_f
faculty
m_b m_t m_a fee
f_s test assign
book s_p s_a
m_s t_p a_p
perf
session
ss_a
attend
18. Network Model
n In 1971, the Conference on Data Systems
Languages (CODASYL) formally defined the
network model.
n A set consists of an owner record type, a set
name, and a member record type.
n the network model permitted the modeling of
many-to-many relationships in data
19. Network Database record instances
course
course
course
course
course set instances
c_m c_s
student
student
module
module
module student
student
student
student
faculty module
faculty
faculty
faculty
faculty m_f s_f
faculty
m_t m_a fee
fee
m_b fee
fee fee
f_s test assign
book
book test
test assign s_p
assign s_a
book m_s test
t_p
assign
a_p
perf
perf
perf
session
session
session perf
perf Database
session
session
ss_a
attend
attend
20. 3. Relational Model
table
course module student
attributes
faculty book test assign
perf attend fee session
21. Relational Model
n A relational database allows the definition of
data structures, storage and retrieval
operations and integrity constraints.
n In such a database the data and relations
between them are organised in tables.
n A table is a collection of records and each
record in a table contains the same fields.
24. Object-Oriented Model
n Object DBMSs extend the semantics of the
C++, Smalltalk and Java object programming
languages to provide full-featured database
programming capability, while retaining
native language compatibility.
n A major benefit of this approach is the
unification of the application and database
development into a seamless data model and
language environment.
26. Object Relational Model
n Object/relational database management
systems (ORDBMSs) add new object storage
capabilities to the relational systems at the
core of modern information systems.
n These new facilities integrate management of
traditional fielded data, complex objects such
as time-series and geospatial data and
diverse binary media such as audio, video,
images, and applets.
27. Object Relational Model
Faster data integrity enforcement
CREATE TABLE Employee
New data types
(Code code_type,
Name CHAR(30),
Emp_dept dept_type,
Faster join
birth_ date date,
join_ date date,
skills set_of skill_type,
method promote(): function prom);
Intuitive and natural model
28. Summary
n Databases
n Advantages of databases
n Different Data Models
n Hierarchical
n Networks
n Relational
n Object Oriented
n Object Relational