2. Introduction
Definition A database management system (DBMS) is a
general-purpose software system that facilitates the process
of defining, constructing, and manipulating databases for
various applications.
Definition A database is a collection of related data.
Definition Data are known facts that can be recorded and
that have implicit meaning.
Definition File processing systems are business computer
systems which store groups of records in separate files & used
to process business records & produce information.
- www.EbooksAdda.in -
2
3. Introduction
DBMS
File Processing Systems
Data redundancy &
inconsistency
Reduced by ensuring a
physical piece of data is
available to all
programs
Data is often duplicated
causing higher storage and
access cost, poor data integrity,
and data inconsistency
Accessing data
Allow flexible access to Allow pre-determined access
data (e.g., using queries to data (i.e., complied programs);
for data retrievals)
application programs are
dependent on file formats
Concurrent access
Designed to coordinate
multiple users accessing
the same data at the
same time
Designed to allow a file to be
accessed by two programs
concurrently only if both
programs have read-only
access to the file
Data security &
integrity
High, enforced
Loose, not enforced
- www.EbooksAdda.in -
3
4. Data Abstraction
Provides an abstract view of data
Physical level: the lowest level of abstraction
describes the storage structure of data.
Conceptual level: the next-higher level of abstraction
describes the logical structure of the database.
View level: the highest level of abstraction describes
part of the entire database. Many views are
provides for the same database.
- www.EbooksAdda.in -
4
5. Database Terminology
Database Schema or Conceptual View: describes the
overall structure of the entire database
Database Instance: describes the content of the database
Scheme = Type, Instance = Value of a variable
- www.EbooksAdda.in -
5
6. Data Independence
The capacity to change the scheme definition at one level w/o
having to change the scheme definition at the next higher
level
Physical data independence: capacity to change the
physical schema w/o having to rewrite the application
programs
Logical data independence: capacity to change the
conceptual schema w/o having to rewrite the application
programs
logical data independence is more difficult to achieve than
physical data independence
- www.EbooksAdda.in - 6
7. Data Models
Describe relationships among data, data semantics, integrity
& semantic constraints
I. Object-Based Logic Models
describe data at the conceptual & view levels
DB is structured in variable-length records
provide flexible structuring capabilities
allow explicit specifications of data constraints
widely used data models: Entity-Relationship & Object-Oriented
II. Record-Based Logical Models
describe data at the conceptual & view levels
DB is structured in fixed-format records of different types
three widely used data models: Relational, Hierarchical, &
Network.
- www.EbooksAdda.in - 7
8. Entity-Relationship (E-R) Model
An Object-Based Model
A graphical structure (Chapter 2)
Widely used in database design
Consists of real world objects called entities & relationships
among entities
An entity is an distinguishable object w/ a set of attributes
Entity set is a set of entities of the same type
Relationship set is a set of relationships of the same type
Mapping cardinalities represent the associations among
different entities
- www.EbooksAdda.in -
8
11. The Object-Oriented Model
An Object-Based Model
Object identity (object-based) vs. value identity (record-based)
A collection of objects w/ unique identities
Objects can be simple/complex
Objects can be made up of other objects
Objects contain methods, codes operated on objects
An operation/function that can be performed on objects of
particular classes
Provide “public interface” for objects of a particular class
Classes consist of objects
Correspond to abstract data type (ADT)
Users can define their own classes
Only way to operate on an object by means of operators defined
Message passing for accessing data in different objects
- www.EbooksAdda.in Apply a given method to a given object by sending11message
a
14. The Relational Model
A Record-Based Model
Data are organized & stored into 2-dimensional tables
(called relations)
Flexible to use and easy to understand
A relational database scheme consists of a number of
relation schemes of the form R(A1, A2, …, An),
where R is a relation name and Ai, 1 < i < n, is
an attribute name.
- www.EbooksAdda.in -
14
15. The Relational Model
Relational term
Informal equivalents
Relation
Table
Tuple
Row/Record
Cardinality
# rows
Attribute
Column/Field
Degree
# columns
Domain
Set of legal values
Primary key
Unique identifier
- www.EbooksAdda.in -
15
16. The Relational Database Model
NAME
S#
STATUS
CITY
London
Paris
etc.
Domains
Primary Key
S
Relation
S#
SNAME
S1
S2
S3
S4
S5
STATUS
Smith
Jones
Blake
Clark
Adams
20
10
30
20
30
CITY
London
Paris
Paris
London
Athens
Tuples
Attributes
Degree
- www.EbooksAdda.in -
16
C
a
r
d
i
n
a
l
i
t
y
17. Data Definition Languages
(DDL) & Data Manipulation
Languages (DML)
DDL
Declares the DB schema and compiles the schema into tables
DML
Access/Manipulate (retrieve, insert, delete, & modify) the DB
Procedural (or descriptive): specify what is needed & how to
get it
Non-procedural (or declarative): specify what is needed but
not how to get it
- www.EbooksAdda.in -
17
18. Thank You !
For More:
Visit Us @
www.ebooksadda.in
www.technotz.info
- www.EbooksAdda.in -
18