0% found this document useful (0 votes)
9 views44 pages

DBMS Intro 1

The document discusses a syllabus for a database management system course. It covers topics like data modeling, SQL, relational data model, normalization, transaction processing, and database security. It also provides learning objectives and expected outcomes of the course.

Uploaded by

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

DBMS Intro 1

The document discusses a syllabus for a database management system course. It covers topics like data modeling, SQL, relational data model, normalization, transaction processing, and database security. It also provides learning objectives and expected outcomes of the course.

Uploaded by

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

MAHARAJA SURAJMAL INSTITUTE

Department of Computer Applications

Database
management system
(BCA-108)

Mr. S.P. Chauhan


Asst. Prof. & Hostel Warden

S.P. Chauhan 1
Syllabus
Unit 1
Introduction: An overview of database management system, database system Vs file
system, Characteristics of database approach, DBMS architecture , data models, schema
and instances, data independence. Data Modeling using Entity Relationship Model: Entity,
Entity types, entity set, notation for ER diagram, attributes and keys, Concepts of
composite, derived and multivalued attributes, Super Key, candidate key, primary key,
relationships, relation types, weak entities, enhanced E-R and object modeling, Sub
Classes, Super classes, inheritance, specialization and generalization.
Unit 2
Introduction to SQL: Overview , Characteristics of SQL. Advantage of SQL, SQL data
types and literals. Types of SQL commands: DDL, DML, DCL. Basic SQL Queries.
Logical operators: BETWEEN, IN, AND, OR and NOT. Null Values: Disallowing Null
Values, Comparisons Using Null Values. Integrity constraints: Primary Key, Not NULL,
Unique, Check, Referential key, Introduction to Nested Queries, Correlated Nested Queries,
Set-Comparison Operators, Aggregate Operators: The GROUP BY and HAVING Clauses,
Joins: Inner joins, Outer Joins, Left outer, Right outer, full outer joins, Overview of views
and indexes.
S.P. Chauhan 2
Syllabus
Unit 3
Relational Data Model: Relational model terminology domains, Attributes, Tuples,
Relations, characteristics of relations, relational constraints domain constraints, key
constraints and constraints on null, relational DB schema. Codd’s Rules. Relational
algebra: Basic operations selection and projection, Set Theoretic operations Union,
Intersection, set difference and division, Join operations: Inner, Outer, Left outer, Right
outer and full outer join. ER to relational Mapping: Data base design using ER to
relational language. Data Normalization: Functional dependencies, Armstrong’s
inference rule, Normal form up to BCNF.
Unit 4
Transaction processing and Concurrency Control: Definition of Transaction,
Desirable ACID properties, Definition of concurrency, lost update, dirty read and
incorrect summary problems due to concurrency, overview of serializability, serializable
and non serializable transactions.
Elementary concepts of Database security: system failure, Backup and Recovery
Techniques, authorization and authentication
S.P. Chauhan 3
Text/ Reference Books
• [T1] R. Elmarsi and SB Navathe, “Fundamentals of Database Systems”, Pearson,5th Ed.
• [T2] Singh S.K., “Database System Concepts, design and application”, Pearson
Education
• [RB] Abraham Silberschatz, Henry Korth, S. Sudarshan, “Database Systems Concepts”,
6th Edition, McGraw Hill, 2010.
[*]: ITL Education Solution Limited, “Introduction to Database Systems”, Pearson
[**]: ITL Education Solution Limited, “Express Learning Database Management
Systems”, Pearson
[***]: IVAN BAYROS, “SQL, PL/SQL The Programming Language of ORACLE”, BPB
Publication (For SQL/ Unit – 2)

S.P. Chauhan 4
LEARNING OBJECTIVES
The paper aims to introduce the concept of Back end, data storage in computers,
design of a DBMS, Queries to construct database, store and retrieve data from the
database. The objective of this course is to provide following:
1. Understanding of the requirement of database management System for
storing data and its advantages over file management system.
2. Designing the database conceptually, physically and finally implementing the
creation of database for any application.
3. Learning of queries in SQL for creating database and performing various
operations for manipulating data in the database.
4. Knowledge of database utilities i.e. backup, recovery, transaction processing.

S.P. Chauhan 5
Course Outcomes
Following are the outcomes:
1. Understand the DBMS concepts with detailed architecture characteristics.
2. E – R Data Model & conceptual database design.
3. Describe different database languages and learn various data models, along
with the related terminologies .
4. Explore Structure Query Language and try to implement DDL, DML and DCL
along with operators, use of joins, nested query, use of views and Indexes &
Integrity Constraints
5. Describe Relational Data Model, explain Codd’s Rules, Relational Algebra, Set
theory operations and the concept of functional dependencies and
normalization
6. Acquire Knowledge about Transaction Processing, concurrency problems, and
its controlling techniques, Database backup and recovery and security.
S.P. Chauhan 6
DBMS
• A data base system has become essential part in computer science as well as in
management, because in any organization, it requires accurate and reliable data for
effective decision making and also exert the centralized control of database and
prevent unauthorized user from accessing the data and ensures the privacy of data.
• What is data?
• Data are the facts or figure, which have some meaning, can be recorded and suitable
for processing.
OR
• Data can also be defined as representation of facts, fig, concepts or instructions in a
formal manner which is suitable for understanding, processing and can be stored.
• Representation of data:- Any data can be represented by using
i. Alphabets ( A -----Z OR a----z)
ii. Digits ( 0-----9)
iii. Special characters ( +, -, @, # & etc.)
S.P. Chauhan 7
DBMS Data Item / Field
• A simple example of database:- (ABC) Value
Data Item / Field
Name S.No Emp. code Emp Name DTOB Address Basic Sal

1. E001 A 3/3/76 Delhi 60000


2. E002 B 4/5/76 Meerut 50000 File
3. E004 C 6/6/79 MSI 60000
Record 4. E005 D 9/5/80 MSIT 57000

• Data Item/ Filed Value:-


It is set of characters, used together for representing the value of particular data
element.
• Data Item/ Filed Name:-
The name give to each data item.
• Record:-
A record is the collection of related data eg record of any employee is (S.No, Emp
Code, Emp Name, DTOB, Address, Basic Sal). S.P. Chauhan 8
DBMS
Database
• Bit:- Bit represents 0 OR 1 i.e. smallest unit of data
• Byte:- A byte represents the collection of 8 bits & form a
Files/ Tables character that may be an alphabet, special character or digit.
• Field:- Logical grouping of bytes or character forms field.
• Record:- Logical grouping of related fields forms a record.
Record
• File/Table:- A file is a collection of logical records i.e. An
associated group of records is a file. Files may be of three types.
Field i. File containing text is called text file
ii. File containing program is a program file.
iii. File containing data is a data file.
Byte/ Char
• Database:- Logical grouping of Files/ Tables form database i.e.
collection od data.
Bit : 0 OR 1

S.P. Chauhan 9
Data & Information
• Data:-
Data are the facts or figure, which have some meaning, can be recorded and suitable
for processing.
• Information:-
Information is the processed data on which decisions and actions are based. So
information can be defined as the organized and classified data to provide the
meaning full values to the receiver.

Data Process Information

• Data Processing:-
It is the step by step refinement of data to get out desired information. OR
Manipulating data through operations like classification, sorting, merging,
calculating and summarizing so as to provide the desired output

S.P. Chauhan 10
Data & Information
Characteristics of Information:-
i. Accuracy:- If it is value it should be accurate and if it is statement, it truly reflect
the situation.
ii. Form:- The Information should be provided to user in the form so that that it
should be useful and best understood by him.
iii. Relevance:- It refers to the current utility of information in decision making or
problem solving.
iv. Time lineless:- It means that information should be made available when it is
needed for a particular purpose with in minimum time.
v. Completeness:- Information should be complete. More completeness of the
information more its value.
vi. Purpose:- Information must have purpose at the time when it is transmitted to a
person, otherwise it is simply a data.
vii. Reliability:- The information must be reliable.
viii. Validity:- It measure the closeness of the information to the purpose. S.P. Chauhan 11
Database
• Database:-
A data base is a collection of related data or information in the form of files so that
it is available to many users for different purpose. i.e. Database is a mechanism that
is used to store data/information, so that users can store data in organized manner
and hence it is easy to retrieve information.
The content of the data base is obtained by combining data from all different
sources in an organization. So that data are available to all users and redundant
data can be eliminated or at least minimized. A data base can be of any size and
varying complexity.
• Database System:-
A database system is basically a computerized record keeping system i.e. it is a
computerized system whose over all purpose is to maintain information and make
available on demand. The data base system has four major components:
i. Data:- Data are the facts or figure, which have some meaning, can be recorded
and suitable for processing.
S.P. Chauhan 12
Database
• Database System:-
ii. Hardware:- It consists of mainly two things:
a. Secondary Storage:- It consists of disks drums etc on which data base reside
magnetic disk are also used for this purpose.
b. The hardware processor associated & associated main memory which are used
to support the execution of database system.
iii. Software:- It is the interface which act as a layer between the physical database
and the users of the system. It is also known as database management system
(DBMS). All the request from users are handed by DBMS.
iv. User:- Here we consider three different type of users:
a. Application programmer:- These users are responsible for writing application
program that uses database. The operation and control fun are also designed
by the application programmer by using computer languages.
b. End users:- These are the users who interacts with the system from on line
work stations or terminals. These end users can access database from
S.P. Chauhan 13
Database
• Database System:-
iv. User:- Here we consider three different type of users:
a. Application programmer:- These users are responsible for writing application
program that uses database. The operation and control fun are also designed
by the application programmer by using computer languages.
b. End users:- These are the users who interacts with the system from on line
work stations or terminals. These end users can access database from
terminals.
c. Database administrator:- This is the user who is responsible to control the
database using existing function.
• Data Base Management System:-
DBMS is a general purpose s/w system that facilitates the process of Defining,
Constructing and Maintaining databases for various applications. i.e. A DBMS is a
collection of program that enables users to create and maintain database.
S.P. Chauhan 14
Data Base Management System
• Data Base Management System:-
 Defining database involves specifying the field names, their data
types/structures and constraints for the data to be stored in database.
 Constructing the database is the process of storing the data itself on some
storage medium that is controlled by the DBMS.
 Manipulating a database includes some functions such as retrieve specific data,
updating data and generating reports from the data.

User SQL
Request
DBMS Database
Information
User

 Data base store information in computer readable form & DBMS is a set of
programs that enables storing, modifying and extracting information from a
database. It also provide user to add, delete, access, modify the data stored in
database. S.P. Chauhan 15
FMS Vs DBMS
• File Management System:-
“In file management system data is stored in the form of files and a number of
application programs are written by programmer to add, modify, delete and
retrieve data to and from appropriate file. New application programs are written/
added as and when need arises. The operations like insertion, deletion & updations
can be done by application programmer.” FMS crashes when cross-referencing &
processing of information from different file is carried out. This system has a
number of disadvantages.
i. Data Redundancy & Inconsistency:-
As the application programs are developed by different programmers, the same
information can be duplicated in several places i.e. Redundancy of data. The
various copy of same data may no longer agree. This may leads to data
inconsistency.
ii. Data Isolation:-
As data are scattered in various files and may be in different formats. So it is very
difficult to write new application programs.
S.P. Chauhan 16
FMS Vs DBMS
• File Management System:-
iii. Integrity Problems:-
As we apply certain consistency constraints on our data base. Eg. As the balance
of a bank account may never fall below a prescribed amount (Rs. 500). To apply
this constraint we write an application program accordingly. When new
constraint are added it is difficult to change program. The problem become more
complex when constraints involve several data items from different files.
iv. Atomicity problem:-
Consider a program to transfer Rs 500 from A/C A to A/C B. If the system failure
occur during the execution of the program. It is possible that Rs. 500 was
removed from A/C A but was not credit to A/C B resulting an inconsistent
database. So the operation of funds transfer must be atomic. It must happen
completely or not at all.” It is difficult to ensure this property in a conventional
file management system.

S.P. Chauhan 17
FMS Vs DBMS
• File Management System:-
v. Concurrent Access anomalies:-
Consider a bank account contain Rs. 1000 if two users withdraw funds (say Rs.
150 & Rs. 300) from this account at about same time. The result may leave the
account in an incorrect state. If two programmers run concurrently and access
the same data item and update it, then these programs may leave the data base
in incorrect state.
vi. Security problems:-
Every user of database system should not be allowed to access all the data. Each
user should be allowed to access the data concerning his area of application. But
in FMS it is difficult to enforce such security system.

18
S.P. Chauhan
FMS Vs DBMS
• Advantages of Database Management System:-
i. Minimum data redundancy:-
In data base system data of different users group are integrated during data base
design into a single logical, centralized structure. So by having a centralized data
base and centralized control by DBA the unnecessary duplication of data are
avoided. So total data storage space also reduced. It also eliminates the extra
processing to trace the required data/information from large volume of data. Here
it is not necessary that all redundancy will be eliminated, but reduced up to
maximum level.
ii.Inconsistency can be avoided:-
By using database inconsistency can be avoided up to some extent as the same
information is available at single place. So the only one place data is updated
hence the inconsistency can be avoided.
iii.Data can be shared:-
Here sharing means not only the existing application can share the data in
database but also the new application can be developed to operate against that
same stored data. S.P. Chauhan 1
9
FMS Vs DBMS
• Advantages of Database Management System:-
iv.Data Independence:-
The separation of meta data from the application program that uses the data is
called data independence i.e. DBMS provide an abstract view and hides the
detail, this is called data independence, where detail of data are not exposed. So
DBMS allow for change at one level of database without affecting other level.
These change are absorbed by mapping between the levels.
v. Improved data integrity:-
It means that data contained in the database is both accurate and consistent.
Integrity usually expressed in terms of constraints which are some rules that
database should not violate. So centralized control on data in database system
ensures that checks are implemented in DBMS to avoid such data integrity
problem eg. Age of an employee can be between 18 & 70 years. So while entering
age database must check it.
2
S.P. Chauhan 0
FMS Vs DBMS
• Advantages of Database Management System:-
vi. Standard can be enforced:-
With the central control on data base, the DBA can ensure that all applicable
standard are observed in the representation of data
vi. Improved backup & recovery services:-
DBMS provide a facility for recovering from hardware or software failure
through its backup and recovery sub system. If a computer fails in the middle of
a program execution then recovery subsystem is responsible to make sure that
data is restored to the state as it was before execution of program.
vii. Security restrictions can be applied:-
The DBA can ensure that access of database is through proper channel and
hence can define security rules to be checked whenever access is attempted to
sensitive data

S.P. Chauhan 21
FMS Vs DBMS
• Advantages of Database Management System:-
viii. Compactness:-
No need for possibly large no. of paper files.
ix. Speed:-
The machine can retrieve and change dates faster than human can and can be
answered quickly then paper search file
x. Work without boring:-
Mechanical tasks are always done better by machine with out boring
xi. Accuracy:-
Accurate and up to date information is available on demand at any time

S.P. Chauhan 22
FMS Vs DBMS
• Disadvantages of Database Management System:-
i. Security might be compromised without good control.
ii. Integrity might be compromised.
iii. Additional hardware might be required.
iv. Performance overhead might be significant.
v. Successful operation is crucial.
vi. The system is likely to be complex

S.P. Chauhan 23
Database Terms
• Logical Data:-
The term logical data refers to the way the programmers/ user see the data.
• Physical Data:-
It refers the way the data is actually stored on storage media.
A DBMS should translate between logical & physical data.
When a data base is designed to meet the information needed by any organization
the plans of scheme of database and actual data to be stored becomes most
important concern of the organization. Here it is important that data changes
frequently but schema or plan remains same over long time.
• Schema:-
It is the plan or formulation of database. A schema is a logical database description of
entire data base i.e. it is a framework into which values of data item can be filled. So
schema is the logical representation of database. Schema gives the name of entities,
attributes and also specifies the relationship among them, i.e. we can say schema is
overall plan of all the data field types and record type in a database. It includes the
definition of database name, record type and component that make-up those record
i.e. over all chart of all data items and their types. S.P. Chauhan 24
Database Terms
• Schema:-
• eg. Schema name is library
Book = entity
Book Name - str
Title - str
Author - str Attribute or field data
Price - int
Code - int
• Sub Schema:-
It is the subset of schema and inherits the same property that a schema has i.e.
subschema defines the portion of database as seen by the application programs or
users to produced desired information from the data contained within the database.
There can be more than one subschema for a schema.
eg. If schema represents the map of all historical place, educational institutes,
railway station, bus terminal of a city, then subschema may be the similar map
showing one route from railway station to all historical places.
• Instance:-
As the content of database changes time to time when data/information is inserted,
deleted or updated. “So the content or data item values stored in data base at a
particular instant of time is called an instance of database or database state”.S.P. Chauhan 25
Database Terms
“The difference between database schema & database state is that database
schema, is specific to DBMS when new data base is defined, But at this point
corresponding data base state is empty. After entering first record we got another
database state”.
Data Abstraction:-
Doing the things or getting results without going into detail is called abstraction.
A DBMS hides certain details of how data is stored & maintained which is called
data abstraction.
Entity:-
It is real physical thing, object or an event about which the information is stored
or organization is interested to store the information is called entity. eg. ADBMS
book is an entity for which library is interested in keeping the track of
information. A collection of same type of entities is called an entity set. A record
describe an entity and a file or table may describe an entity set.
Attribute:-
It is the property or characteristics or information of any entity i.e. field items are
attributes eg. Name of book, Author, Price ISBN no, etc are attribute.
S.P. Chauhan 26
Database Terms
 Data Warehouse:-
Data ware house is a collection of data designed to support management in
decision making process. It is a subject oriented, integrated, time-variant non-
updatable collection of data used to support management in decision-making
process & business intelligence.
 Metadata:-
Metadata is data about the data. i.e. It is data that describe objects in database
and makes easier for these objects to be accessed or manipulated. It also describe
database structure constraints, application, authorization, size of data types & so
on, it is used by developers to develop programs, queries, control and procedure
to manage and manipulate data.

S.P. Chauhan 27
Database Terms
 Data Dictionary:-
Data dictionary are mini database management system that manages metadata
i.e. it is integral part of DBMS and store meta data or information about database
. A data dictionary usually store & manage following information's.
i. Description of schema of database.
ii. Detailed information on physical database design, such as storage
structures, access path, file & record size.
iii. Description of database users, their responsibilities and their access rights.
iv. Relationship between database transaction and data items referenced by
them.

S.P. Chauhan 28
Database Architecture
• Database Architecture:-
As the organization requires an accurate and reliable data also efficient database
system for effective decision making. Also the database stores a lot of critical data to
access Information quickly and securely. So one of the main aim of database system
is to provide users with an abstract view of data i.e. hiding certain details of how
data is stored and manipulated. To satisfied these needs, we need to develop the
architecture for the database systems.
Hence it is important to select the correct architecture for efficient data
management. DBMS Architecture helps users to get their requests done while
connecting to the database i.e. how the users are connected to database to get their
request done. We choose database architecture depending on several factors like the
size of the database, number of users, and relationships between the users
“The database architecture is a frame work in which the structure of DBMS is described.
The DBMS architecture describe how the data is viewed by the user. It is not concern
how the data is handled and processed by the DBMS”.
S.P. Chauhan 29
Database Architecture
• Database Architecture:-
As the database user are provided with an abstract view of the data by hiding
certain details how the data is physically stored. This enables the users to
manipulate the data without worrying about where it is located or how it is actually
stored.
There are several types of DBMS Architecture that we use according to the usage
requirements as follows:
i. 1-Tier Architecture
ii. 2-Tier Architecture
iii. 3-Tier Architecture
Out of these architectures, Two-tier architecture & Three-tier architecture are
more popular.

S.P. Chauhan 30
Database Architecture
• One – Tier Architecture:-
In One–Tier Architecture the database is directly available to the user, the user can
directly sit on the DBMS and use it. Any changes done here will directly be done on
the database itself. It doesn't provide a handy tool for end users.
In this architecture the client, server, and Database are all present on the same
machine. The 1-Tier architecture is used for development of the local application,
where programmers can directly communicate with the database for the quick
response Eg. To learn SQL we set up an SQL server and the database on the local
system. This enables us to directly interact with the relational database and execute
operations. As shown in fig.

But the organizations do not use this architecture they logically go for 2-tier and 3-
tier Architecture.

S.P. Chauhan 31
Database Architecture
• One – Tier Architecture:-
Advantages of 1-Tier Architecture:-
1. Simple Architecture:- This Architecture is the most simple architecture to set up,
as only a single machine is required to maintain it.
2. Cost-Effective:- No additional hardware is required for implementing One-Tier
Architecture, which makes it cost-effective.
3. Easy to Implement:- This Architecture can be easily deployed, and hence it is
mostly used in small projects.

But the organizations do not use this architecture they logically go for 2-tier and 3-
tier Architecture.

S.P. Chauhan 32
Database Architecture
• Two-tier Architecture:-
The architecture was given in 1971 by Database Task
Group (DBTG) which was appointed by Conference
on Data System and Languages(CODASYL), give a
proposal for general architecture for database system
with two view, system view called schema & users
view called subschema. In this architecture the user
interface & application program are reside at client
machine, which invokes database system
functionality at server machine through query
language statements. Application program interfaces
are used for interaction between the client and the
server, as shown in fig.
Two – tier means two layers i.e. it has two layers: 1. User Interface on which API is
running. 2. Server it will provide query processing & transaction management.
S.P. Chauhan 33
Database Architecture
• Two-tier Architecture:-
The 2-tier architecture is similar to a basic client-
server model. The application at the client end directly
communicates with the database on the server side.
APIs like ODBC and JDBC are used for this interaction.
The server side is responsible for providing query
processing and transaction management
functionalities.
On the client side, the user interfaces and application
programs are run. The application on the client side
establishes a connection with the server side to
communicate with the DBMS. Eg. Railway reservation
counter.
An advantage of 2 – tier type is that maintenance and understanding are easier, and
compatible with existing systems. However, this model gives poor performance
when there are a large number of users.
S.P. Chauhan 34
Database Architecture
• Two-tier Architecture:- Advantages :-
i. Easy to Access:- 2-Tier Architecture makes easy access to the database, which
makes fast retrieval.
ii. Scalable:- We can scale the database easily, by adding clients or upgrading
hardware.
iii. Low Cost:- 2-Tier Architecture is cheaper than 3-Tier Architecture and Multi-
Tier Architecture.
iv. Easy Deployment:- 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
v. Simple:- 2-Tier Architecture is easily understandable as well as simple because
of only two components.
Disadvantages:-
i. When number of users increases & want to access large amount of data 24 × 7,
then it fails.
ii. Security problem because client interact directly with database. S.P. Chauhan 35
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
As the main objective of database system is to achieve
data abstraction i.e. highlight only essential features
and hide the certain details such as storage structure
and data organization etc from users. So again in 1975
ANSI – SPARC (American National Standard Institute
– Standard Planning and Requirement Committee)
produced a three tier architecture. This architecture is
most popular and used now a days. In architecture
there is one more layer between the client & server.
Here client machine acts as a front end and does not
contain any direct data base call, but communicate
with application server. This application server in
turn communicates with data base system to access
data. As shown in fig.
S.P. Chauhan 36
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
So in 3-Tier Architecture, client does not directly
communicate with the server. But, it interacts with an
application server which further communicates with
the database system and then the query processing and
transaction management tasks takes place. This
intermediate layer acts as a medium for the exchange of
partially processed data between the server and the
client. This type of architecture is used in the case of
large web applications.
It is basically used for the design and development of
applications that work with databases. Each layer has
its own set of responsibilities.
DBMS 3-Tier architecture divides the complete system
into three inter-related but independent modules as
discussed in the next slide. S.P. Chauhan 37
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
In this architecture overall database description can be defined at three levels namely, Internal
Level, Conceptual Level & External Level thus named as three-level architecture as shown in fig.
External
View User1 View User2 View User3 View User n Users View
Level/Schema

Mapping Supplied By DBMS

Conceptual Level/Schema Conceptual View Designers View

Mapping Supplied By DBMS /OS

Internal Level/Schema Internal View DBMS View

Physical Database S.P. Chauhan 38


Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
External Level:- It is the highest level of data abstraction. It is user’s view of database. It
describe only that part of data base which is concern to a particular application
program for a particular group of user. i.e. this level describe that part of database that
is relevant to the user i.e. user’s view and is also known as view level.
Eg. FACULTY of a university is interested in looking course details of students, STUDENTS
are interested in looking at all details related to academics, accounts, courses and hostel
details as well. So, different views can be generated for different users.
Any number of users view even identical may exist, different view may have different
representation of same data eg. mm-dd-yy & yy-dd-mm. It contains the method of
getting the objects (eg. entities, attribute etc) in external view from the objects in
conceptual view and describe each external view. This level is concern with the
following activities.
i. It is the highest level of database abstraction
ii. It include only that portion of database or application program which is concern to
a particular user.
iii.It is described by means of schema called external schema or sub schema.
iv. It is defined by the user or written by application programmer. S.P. Chauhan 39
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
 Conceptual Level:- It is middle level of abstraction. It describe what data are stored
in the database and what relationship exists among the data. At this level all the
data base entities and relationship among them are included. It contains the logical
structure of entire database as seen by DBA and also known as logical level. There
is only one conceptual schema per database.
At conceptual level, data is represented in the form of various database tables. Eg.
STUDENT database may contain STUDENT and COURSE tables which will be visible
to users but users are unaware of their storage. It is also referred as logical schema.
Their schema also contains the method of getting objects in conceptual view from
objects in internal view. This level concern with following activities.
i. All entities their attribute & their relationship.
ii. Constraints on data.
iii. Checks to retain data integrity & consistency.
iv. Security information.
v. It represents entire database. S.P. Chauhan 40
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
 Internal Level:- It is the lowest level of abstraction. This level is the physical
representation of the database on the computer i.e. closed to physical storage
method used i.e. concern the way in which data is actually stored. This level
indicate how the data is being stored in database physically also describe data
structure, file structure and access method used by database. It describe the way
the DBMS & OS perceive the data in database. If also contains definition of the
stored record & method of representing the data field or attribute. Internal level is
concern with following activities.
i. Storage space allocation for data
ii. Record description for storage
iii. Record placement
iv. Data compression & data encryption techniques.

S.P. Chauhan 41
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
 Advantage of three-tier architecture :-
i. Each uses is able to access same data but can have different customized view as
per their own need. Each user can change his or her view but this change will
not affect other users of same data.
ii. User is not concern about the physical data storage detail. i.e. the user’s
interaction with the database is independent of physical storage organization.
iii.Internal structure of database is unaffected by changes to physical storage such
as change to new storage devices.
iv.DBA is able to change database storage structure without affecting user’s view.
v. DBA is able to change the conceptual structure of database without affecting
users.
vi.Enhanced scalability:- Scalability is enhanced due to the distributed deployment
of application servers. Now, individual connections need not be made between
the client and server. S.P. Chauhan 42
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
 Advantage of three-tier architecture :-
vii. Data Integrity:- 3-Tier Architecture maintains Data Integrity. Since there is a
middle layer between the client and the server, data corruption can be
avoided/removed.
viii. Security:- 3-Tier Architecture Improves Security. This type of model prevents
direct interaction of the client with the server thereby reducing access to
unauthorized data.
 Disadvantage of three-tier architecture :-
i. More Complex:- 3-Tier Architecture is more complex in comparison to 2-Tier
Architecture. Communication Points are also doubled in 3-Tier Architecture.
ii. Difficult to Interact:- It becomes difficult for this sort of interaction to take place
due to the presence of middle layers
iii. The physical separation of application servers containing business logic functions
and database servers containing databases may be something that affects
performance.
iv. Improve complexity or effort. S.P. Chauhan 43
Database Architecture
• Three-tier/Level Architecture OR Three Level of Abstraction in DBMS:-
 Level of Data Abstraction in Relational Model:-

Views Degree of Focus on Independence/


Abstraction Dependence
External High End User HW & SW independence
Conceptual Medium Complete view of HW & SW independence
Database
Internal Low Storage & access HW & SW dependence
method

S.P. Chauhan 44

You might also like