Professional Documents
Culture Documents
CH-1 (I) Introduction To DBMS
CH-1 (I) Introduction To DBMS
Database System
y p , 6th Ed.
Concepts,
©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Database System Concepts - 6th Edition 1.2 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
Generally DBMS contains information about a particular
enterprise
Collection of interrelated data
Set of programs that provide a way to store and retrieve
th ddata
the t th
that th convenient
t iis bboth i t andd efficient
ffi i t to
t use
Database System Concepts - 6th Edition 1.3 ©Silberschatz, Korth and Sudarshan
Database System Concepts - 6th Edition 1.4 ©Silberschatz, Korth and Sudarshan
Database Management System (DBMS)
1.1 Database Applications(cont…)
Digital Libraries for management and delivery of large
textual and multimedia data.
E-commerce- integration of heterogeneous information
sources for business
b activity such
h as online
l shopping,
h
booking of holiday, consulting doctors
Databases
D t b can
n be
b very
r large.
l r it touch
t u h all
ll aspects
p t off our
ur
lives
Goals of DBMS
Storing and retrieving data efficiently and effectively
To ensure security and avoid the problem
Concurrency control
Database System Concepts - 6th Edition 1.5 ©Silberschatz, Korth and Sudarshan
(Cont.)
1 3 1 Levels of Abstraction
1.3.1
Physical level: lowest level of abstraction which
describes how a record (e
(e.g.,
g customer) is actually stored
stored.
Describes complex low level data structures in detail.
Logical level: describes what data are stored in database
database,
and the relationships exist among the data.
type instructor = record
ID : string; name : string;
dept_name
p _ g salaryy : integer;
: string; g
end;
Database System Concepts - 6th Edition 1.9 ©Silberschatz, Korth and Sudarshan
View of Data
View level: highest level of abstraction and application programs
hide details of data types. Views can also hide information (such
as an employee’s
employee s salary) for security purposes
purposes. Simplify the
interaction of user and the system during data manipulation
Database System Concepts - 6th Edition 1.11 ©Silberschatz, Korth and Sudarshan
Cont ….
Instance – the actual content of the database at a
particular point in time
Analogous to the value of a variable
Physical Data Independence
The ability to modify the physical schema without
changing the logical schema
Applications depend on the logical schema
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.
Database System Concepts - 6th Edition 1.12 ©Silberschatz, Korth and Sudarshan
1.3.3 Data Models
A collection of conceptual tools for describing
Data, Data relationships
Data semantics and Data constraints
1) Relational model
Use a collection of tables to represent both data and
the relationship among those data.
An example of record based model in which the database
is structured in fixed format records of several types.
2) EEntity-Relationship
tit R l ti hi model
d l (mainly
( i l for
f database
d t b ddesign)
i )
Use a collection of basic objects, called entity and
relationship among these objects
objects.
Entity is a real world object that is distinguishable
from other objects.
Entity set is a collection of entity.
Database System Concepts - 6th Edition 1.13 ©Silberschatz, Korth and Sudarshan
Cont….
3) Object-based data models (Object-oriented and Object-
relational)
Object-oriented data model is seen as extending of E-R
model with the notions of encapsulation, method and
object identity
identity.
Object-Relation model combines the concept of object
oriented and relational data model.
4) Semi-structured data model (XML)
Permits the specification of data where individual data
items of the same type may have different sets of
attributes.
5) Other older models: tied closely to the underlying
implementation and complicated task of modeling.
Network model
Hierarchical model
Database System Concepts - 6th Edition 1.14 ©Silberschatz, Korth and Sudarshan
Relational Model
Relational model (Chapter 2)
Columns
Example of tabular data in the relational model
Rows
Database System Concepts - 6th Edition 1.15 ©Silberschatz, Korth and Sudarshan
Database System Concepts - 6th Edition 1.16 ©Silberschatz, Korth and Sudarshan
Cont….
1.4.1 Data Definition Language (DDL)
Specification notation for defining the database schema
Used to specify storage structure and access method used
the database by a set of statement found in the special DDL
called data storage and definition.
Like any programming language it gets as input some
iinstruction
t ti statement
t t t andd generates
t some output
t t which
hi h
placed in the data dictionary, which contains metadata.
Database schema
Integrity constraints
Primary key (ID uniquely identifies instructors)
Referential integrity (references constraint in SQL)
A h i
Authorization
i
Database System Concepts - 6th Edition 1.17 ©Silberschatz, Korth and Sudarshan
Cont….
Data dictionary is special type of table that can only
accessed and updated by the database system itself.
Generally DDL used to define
Domain constraints: domain of possible must be
associated
i d with
i h every attribute
ib (int,
(i char,
h ddate/time)
/ i )
Referential integrity: to ensure that the values that
appear in one relation for a given set of attributes
also appear in certain set of another relation.
Assertions: this is any condition that the database must
always satisfy. Example domain constraints and
referential integrity is special form of assertions.
Authorization: in which user of database are
differentiated in the base of the data access right they
Example, read,
have Example
have. read insert,
insert update,
update delete
authorization.
Database System Concepts - 6th Edition 1.18 ©Silberschatz, Korth and Sudarshan
1.5 Database Design
The process of designing the general structure of the
database:
CConceptual
l DDesign
i – transforming
f i the
h specification
ifi i
requirements to conceptual schema
Logical Design – Deciding on the database schema
schema.
Database design requires that we find a “good”
collection of relation schemas.
Business decision – What attributes should we record
in the database?
Computer Science decision – What relation schemas
should we have and how should the attributes be
di t ib t d among th
distributed the various
i relation
l ti schemas?
h ?
Physical Design – Deciding on the physical layout of
the database
Database System Concepts - 6th Edition 1.19 ©Silberschatz, Korth and Sudarshan
Database Design?
Is there any problem with this design?
Database System Concepts - 6th Edition 1.20 ©Silberschatz, Korth and Sudarshan
The Entity-Relationship Model
Models an enterprise as a collection of entities and
relationships
Entity: a “thing” or “object” in the enterprise that
is distinguishable from other objects (person, bank
accounts) and Described by a set of attributes.
attributes
Entity set: a set of all entities of the same type
R l ti
Relationship:
hi an association
i ti among several
l entities
titi
Represented diagrammatically by an entity-relationship
diagram:
Database System Concepts - 6th Edition 1.22 ©Silberschatz, Korth and Sudarshan
XML: Extensible Markup Language
Defined by the WWW Consortium (W3C)
Originally
O i i ll iintended
t d d as a ddocument
t markup
k llanguage not
t a
database language
The ability to specify new tags
tags, and to create nested tag
structures made XML a great way to exchange data, not just
documents
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
Database System Concepts - 6th Edition 1.23 ©Silberschatz, Korth and Sudarshan
Database System Concepts - 6th Edition 1.24 ©Silberschatz, Korth and Sudarshan
1.7 DBMS Architecture
1) Physical DBMS Architecture
Defines the software components used to process and enter
data, and how these software components are related and
interconnected.
Database System Concepts - 6th Edition 1.25 ©Silberschatz, Korth and Sudarshan
Cont ….
ELEMENTS OF A DATABASE MANAGEMENT SYSTEM
The major components of a DBMS are explained below:
DML Precompiled: It converts DML statement embedded in an
application program to normal procedure calls in the host
language.
language
DDL Compiler: The DDL compiler converts the data definition
statements into a set of tables.
tables
File Manager: Manages the allocation of space on disk storage
and the data structure used to represent information stored on
disk.
Database Manager: Convert user's queries coming directly via
the
h query processor or iindirectly
di l via
i an application
li i program
from the user's logical view to the physical file system. Also
performs the tasks of enforcing constraints to maintain the
consistency and integrity of the data as well as its security.
Database System Concepts - 6th Edition 1.26 ©Silberschatz, Korth and Sudarshan
Cont ….
ELEMENTS OF A DATABASE MANAGEMENT SYSTEM
Query Processor: used to interpret the online user's query
and convert it into an efficient series of operations in a
form capable of being sent to the data manager for
execution. It uses the data dictionary to find the
structure of the relevant portion of the database and uses
this information in modifying the query and preparing an
optimal plan to access the database.
Database Administrator: Responsible for overall management
off ddata
t resources
r ur in an
n organization
r ni ti n inincluding
ludin maintaining
int inin
corporate wide data definitions and standards.
Data Dictionary: Keeping a track of all the available names
that are used and the purpose for which they were used
becomes more and more difficult.
Database System Concepts - 6th Edition 1.27 ©Silberschatz, Korth and Sudarshan
Database System Concepts - 6th Edition 1.28 ©Silberschatz, Korth and Sudarshan
1.7 Database Users and Administrators
There are four different types of database-system users,
differentiated by the way they expect to interact with the
system:
DBA (Database Administrator): is responsible for
authorizing
th i i tto access ththe ddatabase,
t b tto monitoring
it i it its use
and for acquiring software and hardware resources as
needed.
Generally DBA are do the following tasks:
Schema definitions
Storage structure and access method definitions
Schema and physical organization modifications
Granting authorization for data access
Routine maintainance( regularly backing up database
database,
ensure enough free disk space)
Database System Concepts - 6th Edition 1.29 ©Silberschatz, Korth and Sudarshan
Cont…
Database Designer: responsible to select appropriate
structure for represent and store the data. Before select
the structure ,Designer
Designer will meet all the database users
and find out all the requirements which they want to
fulfill. After collect all the requirement it comes with
their design and structure and this work is completed
before database implementation.
End
E d UUsers: These
Th are:
1)Casual Users: These are the users who communicate
with the database for little period of time.
time They are
occasionally used the database. So these are the
temporary users.
2) Parametric Or Naive Users: These are the users who
communicate with the database for a regular period.
Th i main
Their i jjobb is
i to constantly
l querying
i andd updating
d i
the database using standard queries
Database System Concepts - 6th Edition 1.30 ©Silberschatz, Korth and Sudarshan
Cont…
3) Sophisticated End Users: These are engineers,
scientists, business analysts who are familiarize with
the database and when they want to use the database,
they used it regularly and when they don’t want then
they are temporally used .
4)Stand alone users: These are the users who maintain
their ppersonal database using
g ready
y made software which
is available in the market easily and provide the menu
based interface through which they can easily used the
database.
database
System Analysts and Application Programmers: System analysts
find out the requirements of parametric end users and
develop all the analysis for canned transaction through
which they can meet all the requirements of parametric
users. Application programmers implement these analysis
as programs. These are especially Software engineers.
Database System Concepts - 6th Edition 1.31 ©Silberschatz, Korth and Sudarshan
End of Chapter 1
Database System Concepts - 6th Edition 1.32 ©Silberschatz, Korth and Sudarshan