College of Social Science and Humanities Department of Geographic Information Science

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Fundamental of Database Management

System
(ITCs2062 -3CrHr, 5ECTS)
………………………………………………………………………………………...……………………….....
Assosa University
College of Social Science and Humanities
Department of Geographic Information
Year II
Semester Science
II
Chapter Two: Database System
Architecture

Compiled By Girmaw A.
Academic Year 2015E.C/2022 G.C
GIS
1
Chapter Two
2. Database System Architecture
…………………………...…………………………………….……………………………………..

Learning Objectives :at the end of the class, you should


be able to:
Understanding Data model, Schemas, and Instances?
Over view of data models
Describe database Architecture and Data
Independence
Understanding Database Language and Interface
Classification of DBMS
2
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.
✓ i.e., it is a collection of concepts that can be used to describe
the structure of the database including data types,
relationships and the constraints that apply on the data.
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 always enforced.
3
Data Models (Con… )
…………………………………………………………………………………….……………

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).

4
Data Models (Con… )
…………………………………………………………………………………….……………
Supports communication between the users and database
designers.
The major use of data model is to understand the meaning of
the data and to facilitate communication about the user
requirements.
A data model must posses the following characteristics so that
the best possible data representation can be obtained.
I. Diagrammatic representation of the data model.
II. Simplicity in designing i.e., Data and their relationships can
be expressed and distinguished easily.
III.Application independent, so that different applications can
share it.
IV.Data representation must be without duplication.
V. Bottom-up approach must be followed.
VI.Consistency and structure validation must be maintained.
5
Types of Data Models
…………………………………………………………………………………….……………
Various data models can be divided into three categories, such as
I. Record Based Data Models : These models represent data by using
the record structures. These data models can be further categorized
into three types:
A. Hierarchical Data Model
B. Network Data Model
C. Relational Data Model.
II. Object Based Data Models : These models are used in describing
the data at the logical and user view levels. These models allow the
users to implicitly specify the constraints in the data.
A. Entity Relationship Model (ER-Model)
B. Object Oriented Model
C. Semantic Data Model
D. Functional Data Model.

6
Types of Data Models(Con….)
…………………………………………………………………………………….……………
III. Physical Data Models : These models provide the concepts
that describes the details of how the data is stored in the
computer along with their record structures, access paths and
ordering.

a) Unifying Model.

b) Frame Memory Model.

7
Which Data Models to Use?
…………………………………………………………………………………….……………
A data model describe the logical Organization of data along
with operations that manipulate the data.
We have large number of data models, the one which is best
for the Organization depends upon the following factors:
▪Is the database too small or too big?

▪What are the costs involved?

▪The volume of daily transactions that will be done?

▪The estimated number of queries that will be made from the


database by the organization to enquire about the data?

▪The data requirements of the organization using it?

8
Categories of Data Models
…………………………………………………………………………………….……………
Data models can be categorized into three major categories
according to the types of concepts they use to describe the database
structure. These are:
❖ 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.
✓ These are usually specified in an ad-hoc manner through
DBMS design and administration manuals.
❖ 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).
9
Schemas versus Instances
…………………………………………………………………………………….……………
Database Schema: A schema is plan of the database that give
the names of the entities and attributes and the relationship
among them.
✓ Schema is the overall description of the database. The basic
structure of how the data will be stored in the database is
called schema.
Schema Diagram: An illustrative display of (most aspects of)
a database schema.
✓ A schema diagram displays only some aspects of a schema,
such as the names of record types and data items, and some
types of constraints.
Schema Construct: A component of the schema or an object
within the schema, e.g., STUDENT, COURSE.

10
Schemas versus Instances(Con…)
…………………………………………………………………………………….……………
Database Instance :
✓ The actual data stored in a database at a particular moment
in time.
✓ It contains all the properties that the schema describes as data
values.
✓ Also called database instance (or occurrence or snapshot).
✓ The term instance is also applied to individual database
components, e.g., record instance, table instance, entity
instance.
✓ The data in the database at a particular moment of time
is called an instance or a database state.
✓ The instances can be changed by certain CRUD
operations as like addition, deletion of data.
✓ It may be noted that any search query will not make any
kind of changes in the instances 11
Example of Database Schema diagram
…………………………………………………………………………………….……………

12
Example of a database state
…………………………………………………………………………………….……………

13
The Three-Schema Architecture
…………………………………………………………………………………….……………
There are three types of schemas in DBMS:
Internal/physical schema, conceptual/logical schema, and
External/view schema.

In this architecture, schemas can be defined at the following


three levels

❖ The internal level has an internal schema, which describes


the physical storage structure of the database.

❖ The internal schema uses a physical data model and describes


the complete details of data storage and access paths for the
database( i.e Typically uses a physical data model.)
14
The Three-Schema Architecture(Con…)
…………………………………………………………………………………….……………
❖ The conceptual level has a conceptual schema, which
describes the structure of the whole database for a community
of users.
❖ The conceptual schema hides the details of physical storage
structures and concentrates on describing entities, data
types, relationships, user operations, and constraints.
❖ Uses a conceptual or an implementation data model.
❖ External schemas at the external level to describe the various
user views.
❖ Usually uses the same data model as the conceptual schema.
❖ each external schema is typically implemented using a
representational data model, possibly based on an external
schema design in a high-level data model.

15
The Three-Schema Architecture(Con…)
--------------------------------------------------------------------------------------------------------------------------

Figure: The three-schema architecture


16
The Three-Schema Architecture(Con…)
--------------------------------------------------------------------------------------------------------------------------
✓ The three schemas are only descriptions of data; the stored data that
actually exists is at the physical level only.
✓ Programs refer to an external schema and are mapped by the DBMS to
the internal schema for execution.
▪ i.e the DBMS must transform a request specified on an external
schema into a request against the conceptual schema, and then into a
request on the internal schema for processing over the stored database.

✓ Data extracted from the internal DBMS level is reformatted to


match the user’s external view (e.g., formatting the results of an
SQL query for display in a Web page)
✓ The processes of transforming requests and results between levels
are called mappings.
17
Database Architecture
…………………………………………………………………………………….……………
Database architecture describes how a database management system
(DBMS) will be integrated with your application.
When designing a database architecture, you must make decisions
that will change how your applications are created.
The basic client/server architecture is used to deal with a large
number of PCs, web servers, database servers and other
components that are connected with networks.
The client/server architecture consists of many PCs and a
workstation which are connected via the network.
DBMS architecture depends upon how users are connected to the
database to get their request done.

18
Database Architecture (Con…)
--------------------------------------------------------------------------------------------------------------------------
Database architecture can be seen as a single tier or multi-tier.
But logically, database architecture is of two types like: 2-tier
architecture and 3-tier architecture.
1-Tier Architecture
✓ In this architecture, the database is directly available to the user.
✓ It means the user can directly sit on the DBMS and uses it.
✓ Any changes done here will directly be done on the database itself. It
doesn't provide a handy tool for end users.
✓ The 1-Tier architecture is used for development of the local
application, where programmers can directly communicate with the
database for the quick response.

19
Database Architecture (Con…)
--------------------------------------------------------------------------------------------------------------------------
2-Tier Architecture
✓ The 2-Tier architecture is same as basic client-server.
✓ In the two-tier architecture, applications on the client end can
directly communicate with the database at the server side.
✓ For this interaction, API's like: ODBC, JDBC are used.
✓ The user interfaces and application programs
are run on the client-side.
✓ The server side is responsible to provide the
✓ functionalities like: query processing and transaction management.
✓ To communicate with the DBMS, client-side
application establishes a connection with the server side.
20
Database Architecture (Con…)
--------------------------------------------------------------------------------------------------------------------------
3-Tier Architecture
✓ The 3-Tier architecture contains another layer between the
client and server.
✓ In this architecture, client can't directly communicate with the
server.
✓ The application on the client-end interacts with an application
server which further communicates with the database system.
✓ End user has no idea about the existence of the database
beyond the application server.
✓ The database also has no idea about
any other user beyond the application.
✓ The 3-Tier architecture is used in
case of large web application.

21
Data Independence
…………………………………………………………………………………….……………
Data independence can be explained using the three-schema
architecture.
Data independence refers characteristic of being able to
modify the schema at one level of the database system without
altering the schema at the next higher level
We can defined the two types of data independence:
Logical Data Independence:
✓ The capacity to change the conceptual schema without
having to change the external schemas and their associated
application programs.
✓ For example: adding/modifying/deleting new attribute
✓ It used to separate the external level from the conceptual
view.
22
Data Independence(Con…)
…………………………………………………………………………………….……………
✓ Logical data independence occurs at the user interface level.
Physical Data Independence:
✓ The capacity to change the internal schema without having
to change the conceptual schema.
✓ Allows to provide logical description of the database
without need of specify physical structure.
✓ For example, the internal schema may be changed when
certain file structures are reorganized, or new indexes are
created to improve database performance.
✓ It used to separate conceptual levels from the internal
levels.

23
Data Independence (Con…)
--------------------------------------------------------------------------------------------------------------------------

24
Database Language and Interface
--------------------------------------------------------------------------------------------------------------------------
❖ The DBMS provides different languages and interfaces for each
category of users to express database queries and updating.
❖ The following five languages are available to specify different
schemas.
1. Data Definition Language (DDL): It is used to specify a database
conceptual schema using set of definitions. It supports the definition or
declaration of database objects.
2. Storage Definition Language (SDL): It is used to specify the
internal schema in the database. The storage structure and access
methods used by the database system is specified by the specified set of
SDL statements.
3. View Definition Language (VDL): It is used to specify user’s views
and their mappings to the conceptual schema. But generally, DDL is
used to specify both conceptual and external schemas in many DBMS’s.
❖ There are two views of data the
▪Logical View—that is perceived by the programmer and
▪Physical View—data stored on storage devices.
25
Database Language (Con…)
--------------------------------------------------------------------------------------------------------------------------
4. Data Manipulation Language (DML):
✓ It provides a set of operations to support the basic data
manipulation operations on the data held in the database.
✓ It is used to query, update or retrieve data stored in a database.
✓ The part of DML that provide data retrieval is called query
language.
❖ The DML is of the two types :
i. Procedural DML: It allows the user to tell the system what data
is needed and how to retrieve it.
▪Retrieve data one record-at-a-time;
▪Constructs such as looping are needed to retrieve multiple
records, along with positioning pointers.
ii. Non-procedural DML: It allows the user to state what data are
needed, rather than how it is to be retrieved.
▪For example, the SQL relational language.
▪Are “set”-oriented and specify what data to retrieve rather than
how to retrieve it.
▪Also called declarative languages.
26
Database Language (Con…)
--------------------------------------------------------------------------------------------------------------------------
5. Fourth-Generation Language (4-GL).
✓ It is a compact, efficient and non-procedural programming
language used to improve the efficiency and productivity of the
DBMS.
✓ In this, the user defines what is to be done and not how it is to be
done.
✓ The 4-GL has the following components in it. These are :
I. Query languages
II. Report
III. Spread sheets
IV. Database languages
V. Application generators
VI. High level languages to generate application program.

27
DBMS Interfaces
--------------------------------------------------------------------------------------------------------------------------
❖ A database management system (DBMS) interface is a user interface
that allows for the ability to input queries to a database without using
the query language itself.
❖ User-friendly interfaces provided by DBMS may include the
following:
1. Menu-Based Interfaces
✓ These interfaces present the user with lists of options (called
menus) that lead the user through the formation of a request.
✓ Most popular is pull-down menu
✓ It is for Web Clients or Browsing
2. Forms-Based Interfaces
✓ Displays a form to each user.
✓ Users can fill out all of the form entries to insert new data
✓ Designed and programmed for the naive users
28
DBMS Interfaces (Con…)
--------------------------------------------------------------------------------------------------------------------------
3. Graphical User Interface
✓ Displays a schema to the user in diagrammatic form.
✓ The user then can specify a query by manipulating the diagram.
✓ It utilize both menus and forms.
✓ It use a pointing device such as mouse, to pick a certain part of the
displayed schema diagram.
4. Natural language Interfaces
✓ It accept request written in English or some other language and
attempt to understand them.
✓ It has own schema and dictionary of important words.
✓ Refer to them while interpret the request.
✓ If the interpretation is successful, the interface generates a
high-level query corresponding to the natural language and
submits it to the DBMS for processing.
29
DBMS Interfaces (Con…)
--------------------------------------------------------------------------------------------------------------------------
✓ otherwise a dialogue is started with the user to clarify any provided
condition or request.
5. Speech Input and Output
✓ The Speech input is detected using predefined words and used to set
up the parameters that are supplied to the queries.
✓ For output, a similar conversion from text or numbers into speech
takes place.
6. Interfaces for DBA
✓ Most database system contains privileged commands that can
be used only by the DBA’s staff.
✓ These include commands for creating accounts, setting system
parameters, granting account authorization, changing a
schema, reorganizing the storage structures of a databases.

30
Classification of Database Management Systems
--------------------------------------------------------------------------------------------------------------------------
Several criteria used to classify DBMS
I. Based on Data model
II. Based on number of user
III. Based on sites or Data distribution
IV. Based on Cost of Database
V. Based on accessed or usage

31
Classification of DBMS(Con….)
--------------------------------------------------------------------------------------------------------------------------
Based on the data model used
❖ Legacy: Network, Hierarchical.
❖ Currently Used: Relational, Object-oriented, Object-
relational, Entity-Relationship Model, semi-data model,
❖ Recent Technologies: Key-value storage systems, NOSQL
systems: document based, column-based, graph-based and
key-value based.
❖ Native XML DBMSs.
Other classifications(the Number of Users)
❖ Single-user system (the DB system that can be used by a
single use at a time or typically used with personal
computers).
❖ multiple user system(The database system that can be used
by multiple users at a time. most DBMS )
32
Classification of DBMS(Con….)
--------------------------------------------------------------------------------------------------------------------------
Based of database distribution
❖ Centralized (uses a single computer with one database).
multiple users still the DBMS software and the data both are
stores on a single computer site.
❖ Distributed (multiple computers, multiple DBs). These
computer sites are connected via a computer network.
Variations of Distributed DBMSs (DDBMSs):
❖ Homogeneous DDBMS:- This type of a DDBMS has the same
DBMS software at all the distributed sites.
❖ Heterogeneous DDBMS: This type of DDBMS has different
DBMS software for different sites.

33
Classification of DBMS(Con….)
--------------------------------------------------------------------------------------------------------------------------
❖ It is It is also possible to develop middleware software to
access several autonomous preexisting databases stored under
heterogeneous DBMSs
❖ This lead to a Federated or Multi database Systems
✓ Participating Databases are loosely coupled with high degree
of autonomy.
✓ Distributed Database Systems have now come to be known as
client-server-based database systems because:
They do not support a totally distributed environment, but
rather a set of database servers supporting a set of clients.

34
Classification of DBMS(Con….)
--------------------------------------------------------------------------------------------------------------------------
Other classifications(The Type of Use)
❖ Production or Transactional Database Systems.
❖ Decision Support Database Systems.
❖ Data Warehouses.
Other classifications(Database Site Locations)
❖ Centralized database systems.
❖ Parallel database systems.
❖ Distributed database systems.
❖ Client/Server database systems.

35
--------------------------------------------------------------------------------------------------------------------------

36

You might also like