0% found this document useful (0 votes)
677 views10 pages

Data Base Architecture

The document discusses the architecture of database management systems (DBMS). It describes the three levels of abstraction in DBMS architecture: the external level, conceptual level, and internal level. The external level defines how users view data, the conceptual level provides a logical view of data independent of physical storage, and the internal level deals with physical storage of data on disk or memory. The document also discusses how mappings between these levels provide data independence, the use of data dictionaries to store metadata, and data manipulation languages to interface with users.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
677 views10 pages

Data Base Architecture

The document discusses the architecture of database management systems (DBMS). It describes the three levels of abstraction in DBMS architecture: the external level, conceptual level, and internal level. The external level defines how users view data, the conceptual level provides a logical view of data independent of physical storage, and the internal level deals with physical storage of data on disk or memory. The document also discusses how mappings between these levels provide data independence, the use of data dictionaries to store metadata, and data manipulation languages to interface with users.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 10

DBM

DATA BASE
ARCHITECHTURE
DBMS
Roll #s
1314,1322,1312,1310
submitted to Ma’m Sara
Mehmood G.C
University Faisalabad
DBMS [DATA BASE ARCHITECHTURE]

The Database Approach


A database system is a computer-based system to record and maintain information. The
information concerned can be anything of significance to the organisation for whose use
it is intended.
The contents of a database can hold a variety of different things. To make database
design more straight-forward, databases contents are divided up into two concepts:
 Schema
 Data
The Schema is the structure of data, whereas the Data are the "facts". Schema can be
complex to understand to begin with, but really indicates the rules which the Data must
obey.

DBMSs do not all conform to the same architecture.


 The three-level architecture forms the basis of modern database architectures.
 this is in agreement with the ANSI/SPARC study group on Database Management
Systems.
 ANSI/SPARC is the American National Standards Institute/Standard Planning
Three level database architecture:
The objective of the three-level architecture is to separate the users’ view(s) of the
database from the way that it is physically represented
1. The external level :
2. The conceptual level :
3. The internal level

10
DBMS [DATA BASE ARCHITECHTURE]

External View Level:


 A user is anyone who needs to access some portion of the data. They may range
from application programmers to casual users with adhoc queries. Each user has a
language at his/her disposal.
 The application programmer may use a high level language ( e.g. COBOL) while
the casual user will probably use a query language.
 Regardless of the language used, it will include a data sublanguage DSL which is
that subset of the language which is concerned with storage and retrieval of
information in the database and may or may not be apparent to the user.
 A DSL is a combination of two languages:
o A data definition language (DDL) - provides for the definition or
description of database objects
o A data manipulation language (DML) - supports the manipulation or
processing of database objects.
 Each user sees the data in terms of an external view: Defined by an external
schema, consisting basically of descriptions of each of the various types of
external record in that external view, and also a definition of the mapping between
the external schema and the underlying conceptual schema.
Conceptual View Level:
 An abstract representation of the entire information content of the database.
 It is in general a view of the data as it actually is, that is, it is a `model' of the
`realworld'.
 It consists of multiple occurrences of multiple types of conceptual record, defined
in the conceptual schema.
 To achieve data independence, the definitions of conceptual records must involve
information content only.
o Storage structure is ignored
o Access strategy is ignored
 In addition to definitions, the conceptual schema contains authorisation and
validation procedures.
Internal View Level:
 The internal view is a low-level representation of the entire database consisting of
multiple occurrences of multiple types of internal (stored) records.
 It is however at one remove from the physical level since it does not deal in terms
of physical records or blocks nor with any device specific constraints such as
cylinder or track sizes. Details of mapping to physical storage is highly
implementation specific and are not expressed in the three-level architecture.
 The internal view described by the internal schema:
o Defines the various types of stored record
o What indices exist
o How stored fields are represented
o What physical sequence the stored records are in
o In effect the internal schema is the storage structure definition.

10
DBMS [DATA BASE ARCHITECHTURE]

Mappings:
The process to convert a request (from external level) and the result between view levels
is called mapping. The mapping defines the correspondence between three view levels.
The mapping description is also stored in data dictionary. The DBMS is responsible for
mapping between these three types of schemas. There are two types of mapping.
 
1. External-Conceptual mapping
2. Conceptual-Internal mapping

 The conceptual/internal mapping:


defines conceptual and internal view correspondence
specifies mapping from conceptual records to their stored counterparts
 The external/conceptual mapping:
defines a particular external and conceptual view correspondence
A change to the storage structure definition means that the conceptual/internal mapping
must be changed accordingly, so that the conceptual schema may remain invariant,
achieving physical data independence.
A change to the conceptual definition means that the conceptual/external mapping must
be changed accordingly, so that the external schema may remain invariant, achieving
logical data independence.

DATA INDEPENDENCE:

10
DBMS [DATA BASE ARCHITECHTURE]

The disjointing of data descriptions from the application programs (or user-interfaces)
that uses the data is called data independence. Data independence is one of the main
advantages of DBMS. The three-schema architecture provides the concept of data
independence, which means that upper-levels are unaffected by changes to lower-levels.
The three schemas architecture makes it easier to achieve true data independence. There
are two kinds of data independence.
 Physical data independence
 The ability to modify the physical scheme without causing application
programs to be rewritten.
 Modifications at this level are usually to improve performance.

 Logical data independence


 The ability to modify the conceptual scheme without causing application
programs to be rewritten.
Usually done when logical structure of database is altered.
 Logical data independence is harder to achieve as the application
programs are usually heavily dependent on the logical structure of the
data. An analogy is made to abstract data types in programming
languages.
Data Dictionary/Directory Systems:
The Data Dictionary/Directory System (DD/DS), consists of utilities and systems
necessary to catalog, document, manage, and use metadata (data about data). An example
of metadata is the following definition: a six-character long alphanumeric string, for
which the first character is a letter of the alphabet and each of the remaining five
characters is an integer between 0 and 9; the name for the string is "employee ID" . The
DD/DS utilities make use of special files that contain the database schema. (A schema,
using metadata, defines the content and structure of a database.) This schema is
represented by a set of tables resulting from the compilation of Data Definition Language
(DDL) statements. The DD/DS is normally provided as part of a DBMS but is sometimes
available from alternate sources. In the management of distributed data, distribution
information may also be maintained in the network directory system. In this case, the
interface between the DD/DS and the network directory system would be through the
API of the network services component on the platform.
In current environments, data dictionaries are usually integrated with the DBMS, and
directory systems are typically limited to a single platform. Network directories are used
to expand the DD/DS realms. The relationship between the DD/DS and the network
directory is an intricate combination of physical and logical sources of data.
 Data Definition Language (DDL):
 Used to specify a database scheme as a set of definitions expressed in a DDL
 DDL statements are compiled, resulting in a set of tables stored in a special
le called a data dictionary or data directory.
 The data directory contains metadata (data about data)
 The storage structure and access methods used by the database system are
speci ed by a set of definitions in a special type of DDL called a data storage and
definition language.

10
DBMS [DATA BASE ARCHITECHTURE]

 basic idea: hide implementation details of the database schemes from the
users.
 Data Manipulation Language (DML)
 Data Manipulation is:
o Retrieval of information from the database
o insertion of new information into the database
o deletion of information in the database
o modification of information in the database
 A DML is a language which enables users to access and
manipulate data.
 The goal is to provide ecient human interaction with the system.
 There are two types of DML:
 Non-Procedural DML:
A high-level or non-procedural DML allows the user to specify what data is
required without specifying how it is to be obtained. Many DBMSs allow high-
level DML statements either to be entered interactively from a terminal or to be
embedded in a general-purpose programming language.

The end-users use a high-level query language to specify their requests to


DBMS to retrieve data. Usually a single statement is given to the DBMS to
retrieve or update multiple records. The DBMS translates a DML statement into
a procedure that manipulates the set of records. The examples of non-procedural
DMLs are SQL and QBE (Query-By-Example) that are used by relational
database systems. These languages are easier to learn and use. The part of a
non-procedural DML, which is related to data retrieval from database, is known
as query language.

Procedural DML:
A low-level or procedural DML allows the user, i.e. programmer to specify
what data is needed and how to obtain it. This type of DML typically retrieves
individual records from the database and processes each separately. In this
language, the looping, branching etc. statements are used to retrieve and process
each record from a set of records. The programmers use the low-level DML.
Data modeling:
The purpose of Data Modelling is to aid the understanding of the data and its semantics
(meaning). Different users will have different perspectives of the data, and so, these
perspectives need to be designed and understood. Data modelling allows independent
analysis of the data, irrespective of how it is physically stored and represented. Because
of this distancing of the data model from the physical storage system, data models can be
applied to any platform. Building data models based on a common syntax that is widely
understood means that the data model and design can be understood by many more
individuals than just the designer.
Logical Data Model

Logical database design has the aim of creating a data model that is completely
independent from any particular DBMS or software/hardware platform. A conceptual
10
DBMS [DATA BASE ARCHITECHTURE]

model is typically needed before the logical model is constructed. If the system is a
particularly large one, it is often the case that individual logical models are constructed
for each user view or area within the business. These separate models are then merged
into a global logical data model.
An example logical data model of a simple library system is shown below:

Conceptual Data Model

The conceptual model purely documents the data and information within the business
and how it is used. The logical model is different from the conceptual model in that it
takes into consideration the relational or object-oriented theory which will be used to
store the data. In some cases, the conceptual data model may be the same as the logical
data model.

An example conceptual model is shown below. It is based on the same system as


modelled in the logical data model above. Note that extra entities / relations have been
added to enable the information and relationships to be stored in a relational database.
 Record based data models:
• Named so because the database is structured in fixedformat
records of several types.
• Each record type defines a fixed number of fields, or
attributes.
• Each field is usually of a fixed length (this simplifies
the implementation).
• The three most widely accepted models are the
relational, network, and hierarchical data model.
 Hierarchical Databases/data model:
 The hierarchical data model organizes data in a tree structure. There is a hierarchy
of parent and child data segments. This structure implies that a record can have
repeating information, generally in the child data segments. Data in a series of
records, which have a set of field values attached to it. It collects all the instances
of a specific record together as a record type. These record types are the
equivalent of tables in the relational model, and with the individual records being
the equivalent of rows. To create links between these record types, the
hierarchical model uses Parent Child Relationships. These are a 1:N mapping
between record types. This is done by using trees, like set theory used in the
relational model, "borrowed" from maths. For example, an organization might
store information about an employee, such as name, employee number,
department, salary. The organization might also store information about an
employee's children, such as name and date of birth. The employee and children
data forms a hierarchy, where the employee data represents the parent segment
and the children data represents the child segment. If an employee has three
children, then there would be three child segments associated with one employee
segment. In a hierarchical database the parent-child relationship is one to many.
This restricts a child segment to having only one parent segment. Hierarchical

10
DBMS [DATA BASE ARCHITECHTURE]

DBMSs were popular from the late 1960s, with the introduction of IBM's
Information Management System (IMS) DBMS, through the 1970s.

 Relational Datamodel:
 (RDBMS - relational database management system) A database based on the
relational model developed by E.F. Codd. A relational database allows the
definition of data structures, storage and retrieval operations and integrity
constraints. In such a database the data and relations between them are organised
in tables. A table is a collection of records and each record in a table contains the
same fields.

 Properties of Relational Tables:


  Values Are Atomic
  Each Row is Unique
  Column Values Are of the Same Kind
  The Sequence of Columns is Insignificant
  The Sequence of Rows is Insignificant
  Each Column Has a Unique Name

Certain fields may be designated as keys, which means that searches for specific
values of that field will use indexing to speed them up. Where fields in two
different tables take values from the same set, a join operation can be performed
to select related records in the two tables by matching values in those fields.
Often, but not always, the fields will have the same name in both tables. For
example, an "orders" table might contain (customer-ID, product-code) pairs and a
"products" table might contain (product-code, price) pairs so to calculate a given
customer's bill you would sum the prices of all products ordered by that customer
by joining on the product-code fields of the two tables. This can be extended to
joining multiple tables on multiple fields. Because these relationships are only
specified at retreival time, relational databases are classed as dynamic database
management system. The RELATIONAL database model is based on the
Relational Algebra.

10
DBMS [DATA BASE ARCHITECHTURE]

 Network data 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.

Example of a Network Model.


The network model's original inventor was Charles Bachman, and it was developed into a
standard specification published in 1969 by the CODASYL Consortium.
HISTORY
In 1969, the Conference on Data Systems Languages (CODASYL) established the first
specification of the network database model. This was followed by a second publication
in 1971, which became the basis for most implementations. Subsequent work continued
into the early 1980s, culminating in an ISO specification, but this had little influence on
products.

10
DBMS [DATA BASE ARCHITECHTURE]

Importance of network data model:


The chief argument in favour of the network model, in comparison to the hierarchic
model, was that it allowed a more natural modeling of relationships between entities.
Although the model was widely implemented and used, it failed to become dominant for
two main reasons. Firstly, IBM chose to stick to the hierarchical model with semi-
network extensions in their established products such as IMS and DL/I. Secondly, it was
eventually displaced by the relational model, which offered a higher-level, more
declarative interface. Until the early 1980s the performance benefits of the low-level
navigational interfaces offered by hierarchical and network databases were persuasive for
many large-scale applications, but as hardware became faster, the extra productivity and
flexibility of the relational model led to the gradual obsolescence of the network model in
corporate enterprise usage.

Refrence:
1. Aho, A. V., B.W. Kernighan, and P. J.Weinberger [1988]. The AWK
programming
Language, Addison-Wesley, Reading, Mass.
2. Astrahan, M. M., et al. [1976]. “System R: a relational approach to data manage-
ment,” ACM Trans. on Database Systems 1:2, pp. 97–137.
3. Chamberlin, D. D., et al. [1976]. “SEQUEL 2: a unified approach to data
definition,
manipulation, and control,” IBM J. Research and Development 20:6, pp. 560–575.
4. Codd, E. F. [1970]. “A relational model for large shared data banks,” Comm.
ACM
13:6, pp. 377–387.
5. Batini, Carol, Stefano Ceri, and Shamkant B. Navathe. Conceptual Database
Design: an Entity-Relationship Approach.
Redwood City, California 94065: The Benjamin/Cummings Company; Inc., 1992. 1-
470.
6. Celko, Joe. SQL FOR SMARTIES: Advanced SQL Programming. 3rd ed. San
Francisco California 94111: Morgan Kaufmann
Publications, 2005. 1-838.
7. Stonebraker, M., E. Wong, P. Kreps, and G. Held [1976]. “The design and imple-
mentation of INGRES,” ACM Trans. on Database Systems 1:3, pp. 189–222.
8. Ullman, J. D. [1988]. Principles of Database and Knowledge-Base Systems (two
volumes) Computer Science Press, New York.

10

You might also like