DATA BASE
USERS ,DATABASE
LANGUAGES AND
DATA MODELS
Author: POONAM SHARMA
DATABASE USERS
A primary goal of a database
system is to retrieve information
from database and store new
information in the database.
People who work with a database
can be categorized as
◦ database users
◦ database administrators.
Author: POONAM SHARMA
DATABASE USERS
There are four different types of database-system users,
differentiated by the way they expect to interact with the
system.
Naive users :-These are unsophisticated users who
interact with the system by invoking one of the
application programs that have been written previously.
Application programmers :- These are
computer professionals who write application programs.
Application programmers can choose from many tools
to develop user interfaces.
Author: POONAM SHARMA
DATABASE USERS (Cont..)
Sophisticated users:- They interact
with the system without writing programs. Instead, they
form their requests in a database query language.
They submit each such query to a query processor,
whose function is to break down DML statements into
instructions that the storage manager understands.
Specialized users :-These are
sophisticated users who write specialized database
applications that do not fit into the traditional data-
processing framework.
Author: POONAM SHARMA
DBA
The person who has central control over the system is
called a database administrator (DBA). The functions of
a DBA include:
◦ Schema definition
◦ Storage structure and access-method definition.
◦ Granting of authorization for data access.
◦ Routine maintenance
Author: POONAM SHARMA
DATA MODELS
Data Model:
◦ A set of concepts to describe the structure of a
database, the operations for manipulating these
structures, and certain constraints that the database
should obey.
Data Model Structure and Constraints:
◦ Constructs are used to define the database structure
◦ Constructs typically include elements (and their data
types) as well as groups of elements (e.g. entity,
record, table), and relationships among such groups
◦ Constraints specify some restrictions on valid data;
these constraints must be enforced at all times
Author: POONAM SHARMA
Data Models (continued)
Data Model Operations:
◦ These operations are used for specifying
database retrievals and updates by referring to
the constructs of the data model.
◦ Operations on the data model may include
basic model operations (e.g. generic insert,
delete, update) and user-defined operations
(e.g. compute_student_gpa, update_inventory)
Author: POONAM SHARMA
Categories of Data Models
Conceptual (high-level, semantic) data models:
◦ Provide concepts that are close to the way many users
perceive data.
(Also called entity-based or object-based data models.)
Physical (low-level, internal) data models:
◦ Provide concepts that describe details of how data is stored
in the computer.
Implementation (representational) data models:
◦ Provide concepts that fall between the above two, used by
many commercial DBMS implementations (e.g. relational
data models used in many commercial systems).
Author: POONAM SHARMA
Some Data Models
Network Model
Hierarchical Model
Entity Relationship Model
Relational Model
Object-oriented Data Models
Object-Relational Models
Author: POONAM SHARMA
Network Model
The network model is a database model conceived
as a flexible way of representing objects and their
relationships.
Its distinguishing feature is that the schema, viewed
as a graph in which object types are nodes and
relationship types are arcs, is not restricted to being
a hierarchy or lattice.
The network model's original inventor was Charles
Bachman, and it was developed into a standard
specification published in 1969 by
the CODASYL Consortium.
Author: POONAM SHARMA
Network Model
(Advantages)
◦ Network Model is able to model
complex relationships.
◦ Can handle most situations for
modeling using record types and
relationship types.
◦ Language is navigational; uses
constructs like FIND, FIND member,
FIND owner, FIND NEXT within set,
etc.
Programmers can do optimal navigation
through the database.
Author: POONAM SHARMA
Network Model
Disadvantages:
◦ Navigational and procedural nature
of processing
◦ Database contains a complex array
of pointers that thread through a set
of records.
Little scope for automated “query
optimization
Author: POONAM SHARMA
Hierarchical Data Model
A hierarchical database model is a data model in
which the data is organized into a tree-like structure.
The structure allows representing information using
parent/child relationships: each parent can have many
children, but each child has only one parent (also known
as a 1-to-many relationship).
Initially implemented in a joint effort by IBM
and North American Rockwell around 1965.
Resulted in the IMS (Information
Management System) family of systems.
Author: POONAM SHARMA
Hierarchical Model (Cont..)
Advantages:
◦ Simple to construct and operate
◦ Corresponds to a number of natural
hierarchically organized domains, e.g.,
organization (“org”) chart
◦ Language is simple:
Uses constructs like GET, GET UNIQUE, GET NEXT,
GET NEXT WITHIN PARENT, etc.
Disadvantages:
◦ Navigational and procedural nature of
processing
◦ Database is visualized as a linear arrangement
of records
◦ Little scope for "query optimization"
Author: POONAM SHARMA
Object-oriented Data
Models
In OO model, relationships are represented by
reference via object identifier(OID). OID here is a
internal system identifier rather than user defined
attribute.
Object-Relational Models:
◦ The object-relational data model combines
features of the object-oriented data model and
relational data model.
◦ Introduced in the latest versions of Oracle-10i, DB2,
and SQL Server and other DBMSs.
Author: POONAM SHARMA
DATABASE LANGUAGES
Data Definition Language (DDL): Used by the DBA and
database designers to specify the conceptual schema of a
database.
For instance, the following statement in the SQL language
defines the account table:
create table account(account-number
char(10),balance integer)
In addition, it updates a special set of tables
called the data dictionary or data
directory.
A data dictionary contains metadata—that
is, data about data. The schema of a
table is an example of metadata.
Author: POONAM SHARMA
DML
Data manipulation is:-
◦ The retrieval of information stored in the
database
◦ The insertion of new information into the
database
◦ The deletion of information from the database
◦ The modification of information stored in the
database
Author: POONAM SHARMA
DML (Cont..)
A data-manipulation language (DML) is a
language that enables users to access or
manipulate data as organized by the
appropriate data model.
There are basically of two types:
◦ Procedural DMLs:-These require a user to specify
what data are needed and how to get those data.
◦ Declarative DMLs (also referred to as
nonprocedural DMLs):- These require a user to
specify what data are needed without specifying
how to get those data.
Author: POONAM SHARMA