0% found this document useful (0 votes)
13 views153 pages

Chapter 1

Information technology

Uploaded by

cherinet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views153 pages

Chapter 1

Information technology

Uploaded by

cherinet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 153

Fundamental of Database

Management Systems
What the course is about?
 These days, organizations are considering
data as one important resource like
finance, human resource and time.
 The management of these resources needs
special attention and development strategy.
 Due to this reason it is considered that
databases are essential to every business.
Cont…
 They are used to maintain internal
records, to present data to customers
and clients on the World-Wide-Web,
and to support many other
commercial processes.
 Databases are likewise found at the
core of many modern organization’s
information systems.
Cont…
 Databases are at the heart of modern
commercial Information systems
application development.
 Their use extends beyond this to
many applications and environments
where large amounts of data must be
stored for efficient update and
retrieval.
Cont…
 Database system is about
 Organization of data
 Efficient retrieval of data
 Reliable storage of data
 Maintaining consistent data
 Making useful information for decision
making
Thus
 This course is designed to equip
students with the theoretical and
practical skill in
 understanding,
 designing,
 developing,
 administering and managing a database
system in an organization.
High level schematic view of the
course-DB systems
Conceptual Design

Logical Design

Physical Design

Implementation
References
 A practical Approach to DBS : Thomas
M.Connoly
 An Introduction to Database System: C.J.
Date
 Fundamentals of Database System :
Elmasri and Navathe
 Database System Concepts:H.F. Korth &
A.Silberscatz
 Modern Database Management:Jeffrey A.
Hoffer
 Effective DBS : Alexander Glydasch
Chapter One

Introductory Concepts
Agenda (chapter one)
 Overview of Database System
(DBS)
 File-Based Systems
 Database Approach
 Advantages of Database Approach
Overview of Database
System (DBS)

What is a database?
How it fits into the broader
information management picture?
The “big” picture
 System Concepts (system and
systems thinking)
 Organizations (as a big system have
many subsystems)
 Information Systems- definition,
functions and components
 Data/information- are core
Cont…
 Information system
development- phases,
methodologies
 Process, data, logic – modeling
 The focus might be on the process
or on objects
 But still data is important
Cont…
 All approaches of information system
developments, one way or another,
have mechanism to design the data,
process and business logic in the
organization
 The focus here is on the principles of
designing and developing the data in
the organization
What is a Database?

 A structured collection of related data


 A filing cabinet, an address book, a
telephone directory, a timetable, etc.
 Google and your email is a database
 School Student Information System
Cont…
 Database is a collection of information, usually,
kept in a list, on a particular subject
 A database is a storage space for
content / information (data)
 DB is used
 To manipulate information so that it can be sorted and/or
searched.
 To make record keeping and tracking fast and efficient.
Data vs. Information

 Data – a collection of facts made up of text,


numbers and dates:
Murray 35000 7/18/86

 Information - the meaning given to data in the


way it is interpreted:
Mr. Murray is a sales person whose annual
salary is $35,000 and whose hire date is
July 18, 1986.
But what is data? And where is
it now?
 Data is factual information
about objects and concepts, such
as:
• measurements
• statistics
 You can find it in:
 filing cabinets, spreadsheets, folders,
ledgers, lists, colleagues’ memories,
piles of papers on your desk
What is the Ultimate purpose of
a database system?

Is to transform and
manage
Data Information Knowledge Action

Data driven decision making


What does “managing
data/information” mean?
 Making information work for us

 Making information useful

 Avoiding "accidental disorganisation”

 Making information easily accessible


and integrated with the rest of our
work
Basic Definitions
 Database:
 A collection of related data.
 Data:
 Known facts that can be
recorded and have an implicit
meaning.
 Mini-world:
 Some part of the real world
about which data is stored in
a database.
 Database Management
System (DBMS):
 A software package/ system
to facilitate the creation and
maintenance of a
computerized database.
 Database System:
 The DBMS software together
with the data itself.
Sometimes, the applications
are also included.
Basic Database Concepts

 Table Name: Barry Harris


 A set of related records College: Medicine
Tel: 392-5555
 Record
– A collection of data Name: Barry Harris
College: Medicine
about an individual item Tel: 392-5555
 Field
– A single item of data Name: Barry Harris
common to all records
An Example of a Table

Fields

Records
Name GatorLink Phone College
Abebe Hailu 392-3900 Pharmacy
Hanna Ambelu 392-5555 Medicine
Hailu Zemecha 846-5656 Informatics
A RECORD

Is a single electronic index card.


Record
One row in Excel
A FIELD

(category) is the place where one item of


information is recorded; the smallest part of
the database.
Fields
Where are DB Systems used ?
 Backend for CBIS applications
 Student record System
 Backend for large Websites
 Google
 Backend for Web services
 Amazon
Databases everywhere!

 Because of the versatility of databases,


we find them powering all sorts of projects:
 A web site that is capturing registered users
 A client tracking application for social service
organisations
 A medical record system for a health care facility
 A collection of word processed documents
 A system that issues airline reservations
WHO USES DATABASES?

Almost everyone:
Business
Doctors
Teachers
Students
Database Applications

•Banking: all transactions


•Airlines: reservations, schedules
•Universities: registration, grades
•Sales: customers, products, purchases
•Manufacturing: production, inventory,
orders, supply chain
•Human resources: employee records,
salaries, tax deductions
Data Handling Approaches
 Data management passes through the
different levels of development along with
the development in technology and
services.
 These levels could best be described by
categorizing the levels into three levels of
development.
 Even though there is an advantage and a
problem overcome at each new level, all
methods of data handling are in use to
some extent.
Cont…
 The major three levels are;
 Manual Approach
 Traditional File Based Approach
 Database Approach
Manual Approach
 data storage and retrieval follows the
primitive and traditional way of
information handling
 cards and paper are used for the
purpose.
 The data storage and retrieval will be
performed using human labour.
 Files for as many event and objects as
the organization has are used to store
information.
Cont…
 Each of the files containing various kinds of
information is labelled and stored in one ore
more cabinets.
 The cabinets could be kept in safe places for
security purpose based on the sensitivity of the
information contained in it.
 Insertion and retrieval is done by searching first
for the right cabinet then for the right the file
then the information.
 One could have an indexing system to facilitate
access to the data
Cont…
 Limitations of the Manual approach
 Prone to error
 Difficult to update, retrieve, integrate
 You have the data but it is difficult to
compile the information
 Limited to small size information
 Cross referencing is difficult
Cont…
 An alternative approach of data
handling is a computerized way of
dealing with the information.
 The computerized approach could
also be either decentralized or
centralized base on where the data
resides in the system
Traditional File Based Approach
 After the introduction of Computer
for data processing to the business
community, the need to use the
device for data storage and
processing increase.
 There were, and still are, several
computer applications with file based
processing used for the purpose of
data handling.
Cont…
 Even though the approach evolved
over time, the basic structure is still
similar if not identical.
 File based systems were an early
attempt to computerize the manual filing
system.
 This approach is the decentralized
computerized data handling method.
Cont…
 A collection of application programs perform
services for the end-users.
 In such systems, every application program that
provides service to end users define and manage
its own data
 Such systems have number of programs for
each of the different applications in the
organization.
 Since every application defines and manages its
own data, the system is subjected to serious
data duplication problem.
Cont…
 File, in traditional file based
approach, is a collection of
records which contains logically
related data
Cont…
 As business application become more
complex
 demands more flexible and
 reliable data handling methods
 Limitations of the Traditional File Based
approach
 Separation or Isolation of Data: Available
information in one application may not be
known.
 Limited data sharing
 Lengthy development and maintenance time
Cont…
 Duplication or redundancy of data
 Data dependency on the application
 Incompatible file formats between
different applications and programs
creating inconsistency.
 Fixed query processing which is defined
during application development
Graphical Representation of File
Based System
Cont…
 The limitations for the traditional file
based data handling approach arise
from two basic reasons.
 Definition of the data is embedded in the
application program which makes it difficult
to modify the database definition easily.
 No control over the access and
manipulation of the data beyond that
imposed by the application programs.
Cont…
 The most significant problem
experienced by the traditional file
based approach of data handling is
the “update anomalies”. We have
three types of update anomalies;
 Modification Anomalies: a problem
experienced when one ore more data
value is modified on one application
program but not on others containing
the same data set.
Cont…
 Deletion Anomalies: a problem encountered
where one record set is deleted from one
application but remain untouched in other
application programs.
 Insertion Anomalies: a problem experienced
when ever there is new data item to be
recorded, and the recording is not made in all
the applications. And when same data item is
inserted at different applications, there could be
errors in encoding which makes the new data
item to be considered as a totally different
object.
Database Approach
 Following a famous paper written by
Ted Codd in 1970, concepts and
development approach of database
systems changed significantly.
 Codd proposed that database systems
should present the user with a view of
data organized as tables called
relations.
 Behind the scenes, there might be a
complex data structure that allowed
rapid response to a variety of queries.
Cont…
 But, unlike the user of earlier database
systems, the user of a relational
system would not be concerned with
the storage structure.
 Queries could be expressed in a very
high-level language, which greatly
increased the efficiency of database
programmers.
 The database approach emphasizes the
integration and sharing of data
throughout the organization.
Cont…
 Thus in Database Approach
 Database is just a computerized record
keeping system or a kind of electronic
filing cabinet.
 Database is a repository for collection of
computerized data files.
 Database is a shared collection of
logically related data designed to meet
the information needs of an organization.
Cont…
 Since it is a shared corporate resource,
the database is integrated with minimum
amount of or no duplication.
 Database is a collection of logically
related data where these logically related
data comprises entities, attributes,
relationships, and business rules of an
organization's information.
Cont…
 In addition to containing data required
by an organization, database also
contains
 a description of the data which called as
“Metadata” or
 “Data Dictionary” or
 “Systems Catalogue” or
 “Data about Data”.
Cont…
 Since a database contains information
about the data (metadata), it is called a
self descriptive collection on integrated
records.
 The purpose of a database is to store
information and to allow users to
retrieve and update that information on
demand.
 Database is deigned once and used
simultaneously by many users.
Cont…
 Unlike the traditional file based approach in
database approach there is program data
independence.
 That is the separation of the data definition
from the application.
 Thus the application is not affected by
changes made in the data structure and file
organization.
 Each database application will perform the
combination of: Creating database,
Reading, Updating and Deleting data.
Benefits of the database
approach
 Data can be shared: two or more users
can access and use same data instead of
storing data in redundant manner for each
user.
 Improved accessibility of data: by using
structured query languages, the users can
easily access data without programming
experience.
 Redundancy can be reduced: isolated
data is integrated in database to decrease
the redundant data stored at different
applications.
Cont…
 Quality data can be maintained: the
different integrity constraints in the
database approach will maintain the quality
leading to better decision making
 Inconsistency can be avoided:
controlled data redundancy will avoid
inconsistency of the data in the database to
some extent.
 Transaction support can be provided:
basic demands of any transaction support
systems are implanted in a full scale DBMS.
Cont…
 Integrity can be maintained: data at
different applications will be integrated
together with additional constraints to
facilitate shared data resource.
 Security majors can be enforced: the
shared data can be secured by having
different levels of clearance and other data
security mechanisms.
 Improved decision support: the
database will provide information useful for
decision making.
Cont…
 Standards can be enforced: the different
ways of using and dealing with data by
different unite of an organization can be
balanced and standardized by using
database approach.
 Compactness: since it is an electronic
data handling method, the data is stored
compactly (no voluminous papers).
 Speed: data storage and retrieval is fast as
it will be using the modern fast computer
systems.
Cont..
 Less labour: unlike the other data
handling methods, data maintenance will
not demand much resource.
 Centralized information control: since
relevant data in the organization will be
stored at one repository, it can be
controlled and managed at the central
level.
Graphical Representation of
Database System
Limitations and risk of
Database Approach
 Introduction of new professional and
specialized personnel.
 Complexity in designing and
managing data
 Cost and risk during conversion from
the old to the new system
 High cost to be incurred to develop
and maintain the system
Cont…
 Complex backup and recover services
from the users perspective
 Reduced performance due to
centralization and data independency
 High impact on the system when
failure occurs to the central system.
Database Management
System(DBMS)
 Database Management System (DBMS)
is a Software package used for
providing
 EFFICIENT,
 CONVENIENT and
 SAFE MULTI-USER (many people/programs
accessing same database, or even same
data, simultaneously)storage of and access
to MASSIVE amounts of
 PERSISTENT (data outlives programs that
operate on it) data.
Cont…
 A DBMS also provides
 a systematic method for creating,
updating, storing, retrieving data in a
database.
 the service of controlling data access,
enforcing data integrity, managing
concurrency control, and recovery.
Cont…
 Having this in mind, a full scale DBMS
should at least have the following services
to provide to the user
 Data storage, retrieval and update in the
database
 A user accessible catalogue (metadata)
 Transaction support service: ALL or NONE
transaction, which minimize data inconsistency
Cont…
 Concurrency Control Services:
access and update on the database by
different users simultaneously should be
implemented correctly.
 Recovery Services: a mechanism for
recovering the database after a failure
must be available.
Cont…
 Authorization Services (Security): must
support the implementation of access and
authorization service to database
administrator and users.
 Support for Data Communication: should
provide the facility to integrate with data
transfer software or data communication
managers.
 Integrity Services: rules about data and
the change that took place on the data,
correctness and consistency of stored data,
and quality of data based on business
constraints.
Cont…
 Services to promote data independency
between the data and the application
 Utility services: sets of utility service
facilities like
 Importing data
 Statistical analysis support
 Index reorganization
 Garbage collection
Cont…
 Typical DBMS Functionality (simply)
 Define a particular database;
 Construct or Load the initial database
 Manipulate the database;
 Process and Share for a set of concurrent
users and application programs

Slide 1- 67
Cont…
 Other features:
 Protection or Security measures
 “Active” processing to take internal
actions on data
 Presentation and Visualization of data
 Maintaining the database and associated
programs
Database languages
 A DBMS is software package used to
design, manage, and maintain databases.
 Each DBMS should have facilities to define
the database, manipulate the content of
the database and control the database.
 These facilities will help the designer, the
user as well as the database administrator
to discharge their responsibility in
 designing,
 using and
 managing the database.
Cont…
 The two major categories of
languages are
 Data Definition Language
(DDL)
 Data Manipulation Language
(DML)
Cont…
 Data Definition Language (DDL):
 Language used to define each data
element required by the organization.
 Commands for setting up schema or the
intension of database
 These commands are used to setup a
database, create, delete and alter table
with the facility of handling constraints
Cont…
 Allows DBA or user to describe and
name entities, attributes and
relationships required for the
application.
 Specification notation for defining the
database schema
Example: create table account (
account_number char(10),
branch_name char(10),
balance integer)
Cont…
 Some more command examples:
 CREATE - to create objects in the database
 ALTER - alters the structure of the database
 DROP - delete objects from the database
 TRUNCATE - remove all records from a
table, including all spaces allocated for the
records are removed
 COMMENT - add comments to the data
dictionary
 RENAME - rename an object
Cont…
 Data Manipulation Language
(DML):
 Is a core command used by end-users
and programmers to store, retrieve, and
access the data in the database e.g. SQL
 Since the required data or Query by the
user will be extracted using this type of
language, it is also called "Query
Language"
Cont…
 Data Manipulation Language
(DML):
 Is a core command used by end-users
and programmers to store, retrieve, and
access the data in the database e.g. SQL
 Since the required data or Query by the
user will be extracted using this type of
language, it is also called "Query
Language"
Cont…
 Provides basic data manipulation
operations on data held in the
database.
 Language for accessing and
manipulating the data organized by
the appropriate data model
Cont…
 E.g. find the name of the customer with
customer-id 192-83-7465
select customer.customer-
name
from customer
where customer.customer-id =
‘192-83-7465’
Cont…
 Some more command examples:
 SELECT - retrieve data from the a database
 INSERT - insert data into a table
 UPDATE - updates existing data within a table
 DELETE - deletes all records from a table, the space
for the records remain
 CALL - call a PL/SQL or Java subprogram
 LOCK TABLE - control concurrency
Cont…
 Still one can consider additional
DB languages called; Data Control
Language (DCL)
 Database is a shared resource that
demands control of data access and
usage.
 The database administrator should have
the facility to control the overall
operation of the system.
Cont…
 Data Control Languages are commands
that will help the Database Administrator
to control the database.
 The commands include commands like
granting privileges to access the
database or particular object within the
database and to store or remove
database transactions
Cont…
 Some examples of Data Control
Language (DCL) statements.
 GRANT - gives user's access privileges to
database
 REVOKE - withdraw access privileges
given with the GRANT command
Cont…
 Fourth Generation Language
(4GL)
 Query Languages
 Forms Generators
 Report Generators
 Graphics Generators
 Application Generators
One more thing related with Database
systems Architecture-components
 The DBMS is software package that helps to
design, manage, and use data using the
database approach.
 Taking a DBMS as a system, one can
describe it with respect to it environment or
other systems interacting with the DBMS.
 The DBMS environment has five
components.
 To design and use a database, there will be
the interaction or integration of Hardware,
Software, Data, Procedure and People.
Cont…
 Hardware:
 are components that one can touch and
feel.
 These components are comprised of
various types of
 personal computers,
 mainframe or any server computers to be
used in multi-user system,
 network infrastructure, and
 other peripherals required in the system.
Cont…
 Software:
 Collection of commands and programs
used to manipulate the hardware to
perform a function.
 These include components like the DBMS
software, application programs,
operating systems, network software,
language software and other relevant
software
Cont…
 Data:
 Since the goal of any database system is
to have better control of the data and
making data useful, Data is the most
important component to the user of the
database.
 There are two categories of data in any
database system: that is Operational
and Metadata.
Cont…
 Operational data is the data actually
stored in the system to be used by the
user.
 Metadata is the data that is used to store
information about the database itself.
 The structure of the data in the
database is called the schema, which
is composed of the Entities,
Properties of entities, and relationship
between entities.
Cont…
 People:
 those people in the organization that are
responsible or play a role in designing,
implementing, managing, administering
and using the resources in the database.
 This component includes group of people
with high level of knowledge about the
database and the design technology to
other with no knowledge of the system
except using the data in the database.
Roles in Database Environment
 Roles in database environment will be at
different levels of database design and
development
 As it is one component in most information
system development tasks, there are
several steps in designing a database
system.
 Here more emphasis is given to the design
phases of the system development life
cycle.
Cont…
 Accordingly the major steps in database
design are;
 Planning: that is identifying information gap in
an organization and propose a database solution
to solve the problem.
 Analysis: that concentrates more on fact
finding about the problem or the opportunity.
Feasibility analysis, requirement determination
and structuring, and selection of best design
method are also performed at this phase
Cont…
 Design: in database designing more
emphasis is given to this phase.
 The phase is further divided into three
sub-phases.
 Conceptual
 Logical
 Physical
Conceptual Design

Logical Design

Physical Design
Cont…
 Conceptual Design
 concise description of the data, data
type, relationship between data and
constraints on the data.
 There is no implementation or
physical detail consideration.
 Used to elicit and structure all
information requirements
Cont…
 Conceptual design is the process of
constructing a model of the
information used in an enterprise,
independent of any physical
considerations.
 It is the source of information for the
logical design phase.
 Mostly uses an Entity Relationship
Model to describe the data at this
level.

Cont…
 After the completion of Conceptual
Design one has to go for refinement of
the schema, which is verification of
Entities, Attributes, and Relationships
Cont…
 Logical Design:
 a higher level conceptual abstraction
with selected specific data model to
implement the data structure.
 It is particular DBMS independent
and with no other physical
considerations.
Cont…
 Logical design is the process of
constructing a model of the
information used in an enterprise
based on a specific data model
(e.g. relational, hierarchical or
network or object), but
independent of a particular DBMS
and other physical considerations.
Cont…
 It includes Normalization process
 Collection of Rules to be maintained
 Discover new entities in the process
 Revise attributes based on the rules
and the discovered Entities
Cont…
 Physical Design:
 physical implementation of the upper
level design of the database with
respect to internal storage and file
structure of the database for the
selected DBMS.
 To develop all technology and
organizational specification.
Cont…
 Physical design is the process of
producing a description of the
implementation of the database on
secondary storage. -- defines
specific storage or access methods
used by database
Cont…
 It Describes the storage structures
and access methods used to achieve
efficient access to the data.
 Tailored to a specific DBMS system --
Characteristics are function of DBMS
and operating systems
 Includes estimate of storage space
Cont…
 Implementation: the testing and
deployment of the designed database
for use.
 Operation and Support:
administering and maintaining the
operation of the database system and
providing support to users.
Cont…
 As people are one of the components
in DBMS environment,
 there are group of roles played by
different stakeholders at the different
levels of the designing and operation of
a database system
 DB Administrator
 DB designer
 Application programmer and system
analyst
 User
Cont…
 As people are one of the components
in DBMS environment,
 there are group of roles played by
different stakeholders at the different
levels of the designing and operation of
a database system
 DB Administrator
 DB designer
 Application programmer and system
analyst
 User
Cont…
 Database Administrator (DBA)
 Responsible to oversee, control and
manage the database resources (the
database itself, the DBMS and other
related software)
 Authorizing access to the database
 Coordinating and monitoring the use of
the database
Cont…
 Responsible for determining and
acquiring hardware and software
resources
 Accountable for problems like poor
security, poor performance of the system
 Involves in all steps of database
development
Cont…
 Further classifications of this role
in big organizations having huge
amount of data and user
requirement.
 Data Administrator (DA)
 Database Administrator (DBA)
Cont..
 Data Administrator (DA)
 is responsible on management of data
resources.
 Involves in database planning,
development, maintenance of
standards policies and procedures at
the conceptual and logical design
phases.
Cont…
 Database Administrator (DBA)
 is more technically oriented role.
Responsible for the physical
realization of the database.
 Involves in physical design,
implementation, security and
integrity control of the database.
Cont…
 DataBase Designer (DBD)
 Identifies the data to be stored and
choose the appropriate structures
to represent and store the data.
 Should understand the user
requirement and should choose
how the user views the database.
Cont…
 Involve on the design phase before
the implementation of the database
system.
 We have two distinctions of
database designers, one involving
in the logical and conceptual design
and another involving in physical
design.
Cont…
 Logical and Conceptual DBD
 Identifies data (entity, attributes and
relationship) relevant to the organization
 Identifies constraints on each data
 Understand data and business rules in the
organization
 Sees the database independent of any data
model at conceptual level and consider one
specific data model at logical design phase.
Cont…
 Physical DBD
 Take logical design specification as input
and decide how it should be physically
realized.
 Map the logical data model on the specified
DBMS with respect to tables and integrity
constraints. (DBMS dependent designing)
 Select specific storage structure and access
path to the database
 Design security measures required on the
database
Cont.
 DBAs, DBD, DB developers the
bedrock of the information
economy

• DBMS R&D represents a broad,


fundamental branch of the science
of computation
Cont…
 Application Programmer and
Systems Analyst
 System analyst determines the user
requirement and how the user wants to
view the database.
 The application programmer implements
these specifications as programs; code,
test, debug, document and maintain the
application program.
Cont…
 Determines the interface on how to
retrieve, insert, update and delete data
in the database.
 The application could use any high level
programming language according to the
availability, the facility and the required
service.
Cont…
 End Users
 Workers, whose job requires accessing the
database frequently for various purpose. There
are different group of users in this category.
 Naïve Users:
 Sizable proportion of users
 Unaware of the DBMS
 Only access the database based on their access level
and demand
 Use standard and pre-specified types of queries.
Cont…
 Sophisticated Users
 Are users familiar with the structure of the
Database and facilities of the DBMS.
 Have complex requirements
 Have higher level queries
 Are most of the time engineers, scientists,
business analysts, etc
Cont…
 Casual Users
 Users who access the database
occasionally.
 Need different information from the
database each time.
 Use sophisticated database queries to
satisfy their needs.
 Are most of the time middle to high level
managers.
Database Architecture
 DBMSs do not all confirm to the same
architecture.
 The three-level architecture forms the
basis of modern database
architectures.
 Agreement with the ANSI/SPARC
((American national Standards Institute- standards
planning and requirement committee) study
group
on Database Management Systems.
3 Level ANSI/SPARC Architecture

• Proposed to support DBMS


characteristics of:
• Program-data independence.
• Support of multiple views of
the data
Cont…
 Three levels of abstractions in
describing data
 For better understanding of
DB functionalities
 Made databases more
independent of application
 Became a standard for the
organisation of DBMS
Cont…
 The architecture divides into
three general levels:
1. External-user
2. Conceptual-logical
3. Internal-physical
The Three Levels of DBS Architecture:
ANSI-SPARC DB Architecture
Cont…
 External Level:
 Users' view of the database.
 concerned with the way individual users
see the data
 Describes that part of database that is
relevant to a particular user.
 Different users have their own customized
view of the database independent of other
users.
Cont…
 Conceptual Level:
 Community view of the database.
 Describes what data is stored in database
and relationships among the data
 can be regarded as a community user
view ­a formal description of data of
interest to the organisation, independent
of any storage considerations.
Cont…
 Internal Level:
 Physical representation of the database on
the computer.
 Concerned with the way in which the
data is actually stored
 Storage spacing allocation for data
 Record description for storage
 Describes how the data is stored in the
database.
Schema for the level

 External (Sub) Schema


 defines the external view of data
as seen by a user or program
 Conceptual Schema
 defines the logical view of data
as seen by all users and programs
 Physical (Internal) Schema
 defines the physical view of data
as seen by a DBMS
The purpose and origin of the
Three-Level database architecture
 All users should be able to access same data.
 Since the database is having a shared data
feature where all the data is stored in one
location and all users will have their own
customized way of interacting with the data.
 A user's view is unaffected or immune to
changes made in other views.
 Since the requirement of one user is
independent of the other, a change made in
one user’s view should not affect other users.
Cont…
 Users should not need to know physical
database storage details.
 As there are naïve users of the system,
 hardware level or physical details should be a
black-box for such users.
 DBA should be able to change database
storage structures without affecting the
users' views.
 A change in file organization, access
method should not affect the structure of
the data which in turn will have no effect on
the users.
Cont…
 Internal structure of database should be
unaffected by changes to physical aspects of
storage.
 DBA should be able to change conceptual
structure of database without affecting all
users.
 In any database system, the DBA will have
the privilege to change the structure of the
database,
 like adding tables,
 adding and deleting an attribute,
 changing the specification of the objects in
the database.
ANSI-SPARC Architecture and
Database Design Phases
Example
Three-schema architecture

•Different people
have different
views of the
database…these
are the external
schema
•The internal
schema is the
underlying design
and
implementation
Developing the three-tiered architecture
Example: University Database
View 1 View 2 View 3
 Conceptual schema:
 Students(sid: string, name: string,
login: string, age: integer, gpa:real) Conceptual Schema
 Courses(cid: string, cname:string,
credits:integer) Physical Schema
 Enrolled(sid:string, cid:string,
grade:string)
 External Schema (View): DB
 Course_info(cid:string,enrollment:integer)
 Physical schema:
 Relations stored as unordered files.
 Index on first column of Students.
External Layer
View View View

Conceptual Layer
Base Tables

Physical Layer

Stored Tables ...


Physical View
• The DBMS must know
– exact physical location
database
– precise physical structure

Employee record
A.B.C. De Silva |222, Galle Road, Colombo |
Name (20 characters) Address (40 characters)

650370690V|Senior Lecturer
NID (10 char) Designation (15 char)
Logical View
• The user/application must
know
database
– existence
– logical reference Employee

NID 650370690V Name A.B.C. De Silva

Designation Senior Lecturer

Address 222, Galle Road, Colombo


Table

Conceptual Layer
Table

• The conceptual model is a logical


representation of the entire contents of
the database.
• The conceptual model is made up of base
tables.
• Base tables are “real” in that they contain
physical records.
External View
• The user/application see
– authorised data
– own format database

Lecturer
Name A.B.C. De Silva

Department Dept. of Computer Science

Designation Senior Lecturer Age 35


External View cont.
• External Views Allows to
– hide unauthorised data
e.g. salary, date of birth
– provide user view
e.g. view employee name, designation,
department data taken from employee and
department files
– derive new attributes
e.g. age derived from date of birth
External View cont.
• External Views Allows to
– change unit of measurement
e.g. show age in years or months
– define security levels
e.g. update access to employee file
read-only to department file
View

External Layer
View

• The external model represents how data is


presented to users.
• It is made up of view tables. View tables
are "virtual"-- they do not exist in physical
storage, but appear to a user as if they did
Data Independence
 This is a prime advantage of a database
 In conventional systems applications are
data-dependent
 For example, if a file is stored in indexed
sequential form then an application must
know
 that the index exists
 the file sequence (as defined by the index), and
Cont…
 The internal structure of the
application will be built around this
knowledge.
 If, for example, the file was to be
replaced by another file with different
indexing structure major
modifications would have to be made
to the application.
cont...
 Such an application is data-dependent
 it is undesirable to allow applications to be
data-dependent
 the DBA must have the freedom to change
storage structure or access strategy in
response to changing requirements without
having to modify existing applications.
 Data independence can be defined as ‘The
immunity of applications to change in
storage structure and access strategy’.
Cont…
 Data independence is the ability to
change the schema at one level of the
database system without changing
the schema at the next higher level.
There are two types
 Logical data independence
 Physical data independence
Data Independence

 Applications insulated from View 1 View 2 View 3


how data is structured and
stored.
Conceptual Schema
 Logical data independence:
Protection from changes in
Physical Schema
logical structure of data.
 Physical data independence:
Protection from changes in
physical structure of data.
DB
Cont…
 Logical Data Independence:
 Refers to immunity of external schemas to
changes in conceptual schema.
 Conceptual schema changes e.g.
addition/removal of entities should not require
changes to external schema or rewrites of
application programs.
 The capacity to change the conceptual schema
without having to change the external schemas
and their application programs
Cont…
 The internal structure of the
application will be built around this
knowledge.
 If, for example, the file was to be
replaced by another file with different
indexing structure major
modifications would have to be made
to the application.
Chapter Summary
 Data are at the center of
organizational functions
 Information systems are important in
data handling
 Data handling- manual, file based,
database approach
 Databases are important components
of an information system
 In Computer based information systems
Next on

DBMS Architecture

You might also like