You are on page 1of 30

Chapter Two

Database system
concepts and
architecture
Fundamentals Database Systems 1
Data models, Schemas, and
Instances
• A data model—a collection of concepts
that can be used to describe the structure of
a database
• Structure of a database we mean the data
types, relationships, and constraints that apply
to the data.

Fundamentals Database Systems 2


Importance of data model
• Can facilitate interaction among the
designer, the applications programmer,
and the end user
• Improved understanding of the organization
for which the database design is developed.
• Relatively simple representation, usually
graphical, of complex real-world data
structures
Fundamentals Database Systems 3
Categories of Data Models
• High-level or conceptual data models
• provide concepts that are close to the way many
users perceive data .
• low-level or physical data models
• provide concepts that describe the details of
how data is stored on the computer storage
media.

Fundamentals Database Systems 4


• representational (or implementation) data
models
• which provide concepts that may be easily
understood by end users but that are not too far
removed from the way data is organized in
computer storage.

Fundamentals Database Systems 5


• In data models the description of a database
is called the database schema and is
represented using schema diagram
• The data in the database at a particular
moment in time is called a
• database state or snapshot or current set of
occurrences or instances in the database.
• Example: University database Schema
diagram for the
Fundamentals Database Systems 6
Schema
constructs

Fundamentals Database Systems 7


Three-Schema Architecture
• To help achieve the characteristics
• self-describing, nature of a database
• insulation of programs and data
• support of multiple user views.
• Three-schema architecture was proposed.
• In this architecture, schemas can be defined
at the following three levels:

Fundamentals Database Systems 8


Three Schema Architecture
Fundamentals Database Systems 9
• The internal level has an internal schema,
which describes the physical storage
structure of the database.
• The internal schema uses a physical data model
• The conceptual level has a conceptual
schema, which describes the structure of
the whole database for a community of
users.
• concentrates on describing entities, data types,
relationships, user operations, and constraints.
• Usually, a representational data model is used
to describe the conceptual schema when a
Fundamentals Database Systems 10
database system is implemented.
• The external or view level includes a
number of external schemas or user views.
• Each external schema describes the part of the
database that a particular user group is
interested in and hides the rest of the database
from that user group.
• Implemented using a representational data
model
Fundamentals Database Systems 11
Data Independence
• Data independence is the capacity to change
the schema at one level of a database
system without having to change the
schema at the next higher level.
• We can define two types of data
independence:
• Logical data independence
• Physical data independence
Fundamentals Database Systems 12
• Logical data independence is the capacity
to change the conceptual schema without
having to change external schemas or
application programs.
• Physical data independence is the capacity
to change the internal schema without
having to change the conceptual schema
• for example, by creating additional access
structures—to improve the performance of
retrieval or update.

Fundamentals Database Systems 13


Database language
• If there is no strict separation of levels is
maintained, Data definition language
(DDL) is used by the database
administrator (DBA) and by database
designers to define both conceptual and
internal schemas for the database
• In most DBMSs the DDL is also used to
define external schemas.
Fundamentals Database Systems 14
• Data manipulations such as
• retrieval, insertion, deletion, and modification
• are done through a set of operations or a
language called the data manipulation
language (DML).
• Other languages such as
• DCL -Data Control Language: for granting
and revoking privileges and
• DQL -Data Query Language: for retrieval of
data are also included as database languages
Fundamentals Database Systems 15
DBMS Interfaces
• DBMS interface is the abstraction of pieces
of functionality of a DBMS
• A DBMS interface hides the
implementation of the functionality of the
component it encapsulate

Fundamentals Database Systems 16


Working Principle of a Database Interface
(Source:http://www.gitta.info/DBSysConcept/en/html/DBLanguages_learningObject2.html)
Fundamentals Database Systems 17
• Menu-Based Interfaces for Web Clients
or Browsing:
• These interfaces present the user with lists of
options (called menus) that lead the user
through the formulation of a request.
• There is no need to memorize the specific
commands and syntax of a query language.

Fundamentals Database Systems 18


• Forms-Based Interfaces:
• A forms-based interface displays a form to each
user.
• Users can fill out all of the form entries to
insert new data, or they can fill out only certain
entries, in which case the DBMS will retrieve
matching data for the remaining entries.
• SQL* Forms and Oracle Forms are some of
examples of forms based interfaces.
Fundamentals Database Systems 19
• Graphical User Interfaces:
• A GUI typically displays a schema to the user
in diagrammatic form. The user then can
specify a query by manipulating the diagram. In
many cases, GUIs utilize both menus and
forms.

Fundamentals Database Systems 20


• Natural Language Interfaces:
• These interfaces accept requests written in
English or some other language and attempt to
understand them.
• A natural language interface usually has its own
schema, which is similar to the database
conceptual schema, as well as a dictionary of
important words.

Fundamentals Database Systems 21


• If the interpretation is successful, the interface
generates a high-level query corresponding to
the natural language request and submits it to
the DBMS for processing; otherwise, a
dialogue is started with the user to clarify the
request.

Fundamentals Database Systems 22


• Speech Input and Output:
• use of speech as an input query and speech as
an answer to a question or result of a request.
• Example: Applications with limited
vocabularies such as inquiries for telephone
directory, flight arrival/departure, etc.

Fundamentals Database Systems 23


• Interfaces for Parametric Users:
• Systems analysts and programmers design and
implement a special interface for each known
class of naive users.
• Usually a small set of abbreviated commands is
included, with the goal of minimizing the
number of keystrokes required for each request.
Example: programming function keys

Fundamentals Database Systems 24


• Interfaces for the DBA:
• Most database systems contain privileged
commands that can be used only by the DBA
staff.
• These include commands for creating accounts,
setting system parameters, granting account
authorization, changing a schema, and
reorganizing the storage structures of a
database.
Fundamentals Database Systems 25
Classification of Database
Management Systems
• The first criterion to categorize DBMSs is
based on the data model:
• relational, object, object-relational, hierarchical,
network, and other.
• The second criterion used to classify
DBMSs is the number of users supported
by the system.

Fundamentals Database Systems 26


• Single-user systems support only one user at a
time and are mostly used with PCs.
• Multiuser systems, which include the majority
of DBMSs, support concurrent multiple users.
• The third criterion is the number of sites
over which the database is distributed.

Fundamentals Database Systems 27


• A DBMS is centralized if the data is stored at a
single computer site.
• A centralized DBMS can support multiple
users, but the DBMS and the database reside
totally at a single computer site.
• A distributed DBMS (DDBMS) can have the
actual database and DBMS software distributed
over many sites, connected by a computer
network.
Fundamentals Database Systems 28
• Distributed DBMS can be
• Homogeneous : DDBMSs use the same DBMS
software at all the sites,
• Heterogeneous: DDBMSs can use different
DBMS software at each site.

Fundamentals Database Systems 29


• Other criteria is
• Based on cost
• Free (open-source) DBMS
• Eg. PostgreSQL and MySQL
• Licensed
• Based on purpose od the DB
• general purpose
• special purpose eg. Online transaction processing
(OLTP) systems,
Fundamentals Database Systems 30

You might also like