0% found this document useful (0 votes)
13 views

UNIT-1A DBMS (1)

Uploaded by

Nanaji Uppe
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)
13 views

UNIT-1A DBMS (1)

Uploaded by

Nanaji Uppe
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/ 25

DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

UNIT – I
Introduction: Database system, Characteristics (Database Vs File System), Database Users,
Advantages of Database systems, Database applications. Brief introduction of different Data
Models; Concepts of Schema, Instance and data independence; Three tier schema architecture for
data independence; Database system structure, environment, Centralized and Client Server
architecture for the database. Entity Relationship Model: Introduction, Representation of entities,
attributes, entity set, relationship, relationship set, constraints, sub classes, super class,
inheritance, specialization, generalization using ER Diagrams.

1.1 Database Management Systems (DBMS)

A database is a collection of related data stored in a standard format, designed to


be shared by multiple users. A database is defined as “A collection of
interrelated data items that can be processed by one or more application
programs”.

A database can also be defined as “A collection of persistent data that is used


by the application systems of some given enterprise”. An enterprise can be a
single individual (with a small personal database), or a complete corporation
or similar large body (with a large shared database), or anything in between.

Example: A Bank, a Hospital, a University, a Manufacturing company

Data

Data is the raw material from which useful information is derived. The word
data is the plural of Datum. Data is commonly used in both singular and
plural forms. It is defined as raw facts or observations. It takes variety of
forms, including numeric data, text and voice and images. Data is a
collection of facts, which is unorganized but can be made organized into
useful information. The term Data and Information come across in our daily
life and are often interchanged.

Example: Weights, prices, costs, number of items sold etc.

Information
1 Data that have been processed in such a way as to increase the knowledge
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

of the person who uses the data. The term data and information are closely
related. Data are raw material resources that are processed into finished
information products. The information as data that has been processed in
such way that it can increase the knowledge of the person who uses it.

In practice, the database today may contain either data or information.

Data Processing

The process of converting the facts into meaningful information is known as


data processing. Data processing is also known as information processing.

File System vs. DBMS

There are following differences between DBMS and File system:

File System DBMS

File system is a collection of data. In this system, DBMS is a collection of data. In DBMS, the user is
the user has to write the procedures for managing not required to write the procedures.
the database.

File system provides the detail of the data DBMS gives an abstract view of data that hides the
representation and storage of data. details.

File system doesn't have a crash mechanism, i.e., if DBMS provides a crash recovery mechanism, i.e.,
the system crashes while entering some data, then DBMS protects the user from the system failure.
the content of the file will lost.

It is very difficult to protect a file under the file DBMS provides a good protection mechanism.
system.

File system can't efficiently store and retrieve the DBMS contains a wide variety of sophisticated
data. techniques to store and retrieve the data.

In the File system, concurrent access has many DBMS takes care of Concurrent access of data
problems like redirecting the file while other using some form of locking.
deleting some information or updating some
information.
2
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

DATA BASE USERS

A typical DBMS has users with different rights and permissions who use it for different
purposes. Some users retrieve data and some back it up. The users of a DBMS can be broadly
categorized as follows −

 Administrators − Administrators maintain the DBMS and are responsible for


administrating the database. They are responsible to look after its usage and by
whom it should be used. They create access profiles for users and apply limitations
to maintain isolation and force security. Administrators also look after DBMS
resources like system license, required tools, and other software and hardware
related maintenance.
 Designers − Designers are the group of people who actually work on the designing
part of the database. They keep a close watch on what data should be kept and in what
format. They identify and design the whole set of entities, relations, constraints, and
views.
 End Users − End users are those who actually reap the benefits of having a DBMS.
End users can range from simple viewers who pay attention to the logs or market
rates to sophisticated users such as business analysts.

1.2 Advantages of DBMS

One of the main advantages of using a database management system is that


the organization can exert via the DBA, centralized management and control
over the data. The database administrator is the focus of the centralized control.

3
The following are the major advantages of using a Database Management
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

System (DBMS): Data independence: Application programs should be as


independent as possible from details of data representation and storage. The
DBMS can provide an abstract view of the data to insulate application code
from such details.

Efficient data access: A DBMS utilizes a variety of sophisticated


techniques to store and retrieve data efficiently. This feature is especially
important if the data is stored on external storage devices.

Data integrity and security: The DBMS can enforce integrity constraints
on the data. The DBMS can enforce access controls that govern what data is
visible to different classes of users.

Data administration: When several users share the data, centralizing the
administration of data can offer significant improvements. It can be used for
organizing the data representation to minimize redundancy and for fine-tuning
the storage of the data to make retrieval efficient.

Concurrent access and crash recovery: A DBMS schedules concurrent


accesses to the data in such a manner that users can think of the data as being
accessed by only one user at a time. Further, the DBMS protects users from the
effects of system failures. .

Reduced application development time: Clearly, the DBMS supports many


important functions that are common to many applications accessing data
stored in the DBMS.

1.3 Database System Applications

Databases are widely used. Here are some representative applications:

1. Banking: For customer information, accounts, and loans, and banking transactions.

2. Airlines: For reservations and schedule information. Airlines were among


the first to use databases in a geographically distributed manner - terminals
4 situated around the world accessed the central database system through
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

phone lines and other data networks.

3. Universities: For student information, course registrations, and grades.

4. Credit card transactions: For purchases on credit cards and generation of


monthly statements.

5. Telecommunication: For keeping records of calls made, generating


monthly bills, maintaining balances on prepaid calling cards, and
storing information about the communication networks.

6. Finance: For storing information about holdings, sales, and purchases of


financial instruments such as stocks and bonds.

7. Sales: For customer, product, and purchase information.

8. Manufacturing: For management of supply chain and for tracking


production of items in factories, inventories of items in warehouses /
stores, and orders for items.

9. Human resources: For information about employees, salaries, payroll


taxes and benefits, and for generation of paychecks.

Data Models
A Data Model in Database Management System (DBMS) is the concept of tools that are
developed to summarize the description of the database. Data Models provide us with a transparent
picture of data which helps us in creating an actual database. It shows us from the design of the
data to its proper implementation of data.

Types of Relational Models


1. Conceptual Data Model
1. Representational Data Model
1. Physical Data Model
It is basically classified into 3 types:-

5
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

1. Conceptual Data Model

The conceptual data model describes the database at a very high level and is useful to understand
the needs or requirements of the database. It is this model, that is used in the requirement-gathering
process i.e. before the Database Designers start making a particular database. One such popular
model is the entity/relationship model (ER model). The E/R model specializes in entities,
relationships, and even attributes that are used by database designers. In terms of this concept, a
discussion can be made even with non-computer science(non-technical) users and stakeholders,
and their requirements can be understood.

Entity-Relationship Model( ER Model): It is a high-level data model which is used to define the
data and the relationships between them. It is basically a conceptual design of any database which
is easy to design the view of data.

Components of ER Model:

1. Entity: An entity is referred to as a real-world object. It can be a name, place, object, class, etc.
These are represented by a rectangle in an ER Diagram.
2. Attributes: An attribute can be defined as the description of the entity. These are represented by
Ellipse in an ER Diagram. It can be Age, Roll Number, or Marks for a Student.
3. Relationship: Relationships are used to define relations among different entities. Diamonds and
Rhombus are used to show Relationships.

Characteristics of a conceptual data model


6
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

 Offers Organization-wide coverage of the business concepts.


 This type of Data Models are designed and developed for a business audience.
 The conceptual model is developed independently of hardware specifications like data storage
capacity, location or software specifications like DBMS vendor and technology. The focus is to
represent data as a user will see it in the “real world.”
Conceptual data models known as Domain models create a common vocabulary for all
stakeholders by establishing basic concepts and scope

2. Representational Data Model

This type of data model is used to represent only the logical part of the database and does not
represent the physical structure of the database. The representational data model allows us to focus
primarily, on the design part of the database. A popular representational model is a Relational
model. The relational Model consists of Relational Algebra and Relational Calculus. In the
Relational Model, we basically use tables to represent our data and the relationships between them.
It is a theoretical concept whose practical implementation is done in Physical Data Model.

The advantage of using a Representational data model is to provide a foundation to form the base
for the Physical model.

Characteristics of Representational Data Model

 Represents the logical structure of the database.


 Relational models like Relational Algebra and Relational Calculus are commonly used.
 Uses tables to represent data and relationships.
 Provides a foundation for building the physical data model.

3. Physical Data Model

The physical Data Model is used to practically implement Relational Data Model. Ultimately, all
data in a database is stored physically on a secondary storage device such as discs and tapes. This
is stored in the form of files, records, and certain other data structures. It has all the information on
the format in which the files are present and the structure of the databases, the presence of external
data structures, and their relation to each other. Here, we basically save tables in memory so they
can be accessed efficiently. In order to come up with a good physical model, we have to work on
7
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

the relational model in a better way. Structured Query Language (SQL) is used to practically
implement Relational Algebra.

This Data Model describes HOW the system will be implemented using a specific DBMS system.
This model is typically created by DBA and developers. The purpose is actual implementation of
the database.

Characteristics of a physical data model:

 The physical data model describes data need for a single project or application though it maybe
integrated with other physical data models based on project scope.
 Data Model contains relationships between tables that which addresses cardinality and
nullability of the relationships.
 Developed for a specific version of a DBMS, location, data storage or technology to be used in
the project.
 Columns should have exact datatypes, lengths assigned and default values.
 Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are defined
Some Other Data Models

1. Hierarchical Model

The hierarchical Model is one of the oldest models in the data model which was developed by IBM,
in the 1950s. In a hierarchical model, data are viewed as a collection of tables, or we can say
segments that form a hierarchical relation. In this, the data is organized into a tree-like structure
where each record consists of one parent record and many children. Even if the segments are
connected as a chain-like structure by logical associations, then the instant structure can be a fan
structure with multiple branches. We call the illogical associations as directional associations.

2. Network Model

The Network Model was formalized by the Database Task group in the 1960s. This model is the
generalization of the hierarchical model. This model can consist of multiple parent segments and
these segments are grouped as levels but there exists a logical association between the segments
belonging to any level. Mostly, there exists a many-to-many logical association between any of the
two segments.
8
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

3. Object-Oriented Data Model

In the Object-Oriented Data Model, data and their relationships are contained in a single structure
which is referred to as an object in this data model. In this, real-world problems are represented as
objects with different attributes. All objects have multiple relationships between them. Basically, it
is a combination of Object Oriented programming and a Relational Database Model.

Views of data

View of data in DBMS narrate how the data is visualized at each level of data
abstraction. Data abstraction allow developers to keep complex data structures away from
the users. The developers achieve this by hiding the complex data structures through levels of
abstraction.

There is one more feature that should be kept in mind i.e. the data independence. While
changing the data schema at one level of the database must not modify the data schema at the
next level. In this section, we will discuss the view of data in DBMS with data abstraction,
data independence, data schema in detail.

Content: View of Data in DBMS

1. Data Abstraction

2. Data Independence

3. Instance and Schema

4. Key Takeaways

1. Data Abstraction
Data abstraction is hiding the complex data structure in order to simplify the user’s
interface of the system. It is done because many of the users interacting with the
database system are not that much computer trained to understand the complex data
structures of the database system.
To achieve data abstraction, we will discuss a Three-Schema architecture which
abstracts the database at three levels discussed below:

Three-Schema Architecture:

9 The main objective of this architecture is to have an effective separation between the
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

user interface and the physical database. So, the user never has to be concerned
regarding the internal storage of the database and it has a simplified interaction with the
database system.

The three-schema architecture defines the view of data at three levels:

i. Physical level (internal level)

ii. Logical level (conceptual level)

iii. View level (external level)

i. Physical Level/ Internal Level

The physical or the internal level schema describes how the data is stored in the
hardware. It also describes how the data can be accessed. The physical level shows the
data abstraction at the lowest level and it has complex data structures. Only the
database administrator operates at this level.

ii. Logical Level/ Conceptual Level

It is a level above the physical level. Here, the data is stored in the form of the entity
set, entities, their data types, the relationship among the entity sets, user operations
performed to retrieve or modify the data and certain constraints on the data. Well
adding constraints to the view of data adds the security. As users are restricted to
access some particular parts of the database.

It is the developer and database administrator who operates at the logical or the conceptual
level.

iii. View Level/ User level/ External level

It is the highest level of data abstraction and exhibits only a part of the whole database. It
exhibits the data in which the user is interested. The view level can describe many views
of the same data. Here, the user retrieves the information using different application
from the database.

The figure below describes the three-schema architecture of the database:

10
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

Three Schema Architecture

In the figure above you can clearly distinguish between the three levels of abstraction. To
understand it more clearly let us take an example:

We have to create a database of a college. Now, what entity sets would be involved?
Student, Lecturer, Department, Course and so on…

Now, the entity sets Student, Lecturer, Department, Course will be stored in the storage as
the consecutive blocks of the memory location. This is the physical or internal level
and is hidden from the programmers but the database administrator is it aware of it.

At the logical level, the programmers define the entity sets and relationship among
these entity sets using a programming language like SQL. So, the programmers work
at the logical level and even the database administrator also operates at this level.

At the view level, the users have the set of applications which they use to retrieve the
data they are interested in.

2. Data Independence

Data independence defines the extent to which the data schema can be changed at one level
without modifying the data schema at the next level. Data independence can be classified as
shown below:

Logical Data Independence:


11
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

Logical data independence describes the degree up to which the logical or conceptual schema
can be changed without modifying the external schema. Now, a question arises what is the
need to change the data schema at a logical or conceptual level?

Well, the changes to data schema at the logical level are made either to enlarge or reduce the
database by adding or deleting more entities, entity sets, or changing the constraints on data.

Physical Data Independence:

Physical data independence defines the extent up to which the data schema can be changed at the
physical or internal level without modifying the data schema at logical and view level.

Well, the physical schema is changed if we add additional storage to the system or we
reorganize some files to enhance the retrieval speed of the records.

3. Instance
s and
Schemas
What is an
instance?
We can define an instance as the information stored in the database at a particular point of
time. Let us discuss it with the help of an example.

As we discussed above the database comprises of several entity sets and the relationship
12 between them. Now, the data in the database keeps on changing with time. As we keep
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

inserting or deleting the data to and from the database.

Now, at a particular time if we retrieve any information from the database then that
corresponds to an instance.

What is schema?

Whenever we talk about the database the developers have to deal with the definition of
database and the data in the database.

The definition of a database comprises of the description of what data it would contain
what would be the relationship between the data. This definition is the database schema.

4. Key Takeaways:

 View of data in DBMS describes the abstraction of data at three-level


i.e. physical level, logical level, view level.

 The physical level of abstraction defines how data is stored in the storage and also
reveals its access path.

 Abstraction at the logical level describes what data would be stored in the database?
what would be the relation between the data? and the constraints applied to the
data.

 The view level or external level of abstraction describes the application which the users
use to retrieve the information from the database.

 Data independence explains the extent to which data at a certain level can be
modified without disturbing the data next higher levels.

 An instance is the retrieval of information from the database at a certain point of time.
An instance in a database keeps on changing with time.

 Schema is the overall design of the entire database. Schema of the database is not changed
frequently.

So that’s all about the view of data in the database which help us to understand the database
from users, developers and database administrator aspects.

Database Languages

 A DBMS has appropriate languages and interfaces to express database queries and
13
updates.
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

 Database languages can be used to read, store and update the data in the database.

Types of Database Language

1. Data Definition Language

 DDL stands for Data Definition Language. It is used to define database structure or
pattern.
 It is used to create schema, tables, indexes, constraints, etc. in the database.
 Using the DDL statements, you can create the skeleton of the database.
 Data definition language is used to store the information of metadata like the
number of tables and schemas, their names, indexes, columns in each table,
constraints, etc.
Here are some tasks that come under DDL:

 Create: It is used to create objects in the database.


 Alter: It is used to alter the structure of the database.
 Drop: It is used to delete objects from the database.
These commands are used to update the database schema that's why they come under Data
definition language.
2. Data Manipulation Language

DML stands for Data Manipulation Language. It is used for accessing and manipulating data
in a database. It handles user requests.

14 Here are some tasks that come under DML:


DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

 Select: It is used to retrieve data from a database.


 Insert: It is used to insert data into a table.
 Update: It is used to update existing data within a table.

 Delete: It is used to delete all records from a table.


3. Data Control Language

 DCL stands for Data Control Language. It is used to retrieve the stored or saved data.
 The DCL execution is transactional. It also has rollback parameters.
(But in Oracle database, the execution of data control language does not have the
feature of rolling back.)
Here are some tasks that come under DCL:

 Grant: It is used to give user access privileges to a database.

 Revoke: It is used to take back permissions from


the user. There are the following operations which have the
authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.

4. Transaction Control Language

TCL is used to run the changes made by the DML statement. TCL can be grouped into a
logical transaction. Here are some tasks that come under TCL:
 Commit: It is used to save the transaction on the database.

 Rollback: It is used to restore the database to original since the last Commit.

Database Management System Services

• The advancements in technology have opened the floodgates for endless volumes of
data to flow into the system. With this tremendous amount of data pouring in from
diverse sources and in multiple formats, it becomes a critical task for organizations to
store, process and manage this data. And even more so in today’s data driven world,
where it has become the key to business success.

• A robust and efficient database management system resolves all your data worries,
giving your business the power to lead.

15 Overall System Architecture


DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

The architecture of a database system is greatly influenced by the underlying computer system on
which the database is running:

i. Centralized.

ii. Client-server.

iii. Parallel (multi-processor).

iv. Distributed

16
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

Database Users:

Users are differentiated by the way they expect to interact with the system:

 Application programmers:

o Application programmers are computer professionals who write


application programs. Application programmers can choose from many tools
to develop user interfaces.

o Rapid application development (RAD) tools are tools that enable an


application programmer to construct forms and reports without writing a
program.

 Sophisticated users:

o Sophisticated users interact with the system without writing programs. Instead,
they form their requests in a database query language.
o They submit each such query to a query processor, whose function is to
break down DML statements into instructions that the storage manager
understands.

 Specialized users :

o Specialized users are sophisticated users who write specialized database


applications that do not fit into the traditional data-processing framework.
o Among these applications are computer-aided design systems, knowledge base
and expert systems, systems that store data with complex data types (for
example, graphics data and audio data), and environment-modeling systems.

 Naive users :

o Naive users are unsophisticated users who interact with the system by
invoking one of the application programs that have been written previously.

o For example, a bank teller who needs to transfer $50 from account A to
account B invokes a program called transfer. This program asks the teller for
17 the amount of money to be transferred, the account from which the money is to
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

be transferred, and the account to which the money is to be transferred.

Database Administrator:

 Coordinates all the activities of the database system. The database


administrator has a good understanding of the enterprise’s information
resources and needs.
 Database administrator's duties include:

o Schema definition: The DBA creates the original database schema by


executing a set of data definition statements in the DDL.

o Storage structure and access method definition.

o Schema and physical organization modification: The DBA carries out


changes to the schema and physical organization to reflect the changing needs
of the organization, or to alter the physical organization to improve
performance.

o Granting user authority to access the database: By granting different


types of authorization, the database administrator can regulate which parts
of the database various users can access.

o Specifying integrity constraints.

o Monitoring performance and responding to changes in


requirements. Query Processor:
The query processor will accept query from user and solves it by accessing the database.

Parts of Query processor:

 DDL interpreter

This will interprets DDL statements and fetch the definitions in the data dictionary.

 DML compiler

a. This will translates DML statements in a query language into low level
instructions that the query evaluation engine understands.

b. A query can usually be translated into any of a number of alternative evaluation


plans for same query result DML compiler will select best plan for query
optimization.

18  Query evaluation engine


DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

This engine will execute low-level instructions generated by the DML compiler on DBMS.

Storage Manager/Storage Management:

 A storage manager is a program module which acts like interface between the
data stored in a database and the application programs and queries submitted
to the system.
 Thus, the storage manager is responsible for storing, retrieving and updating data in the
database.

 The storage manager components include:

o Authorization and integrity manager: Checks for integrity constraints


and authority of users to access data.

o Transaction manager: Ensures that the database remains in a consistent state


although there are system failures.

o File manager: Manages the allocation of space on disk storage and the data
structures used to represent information stored on disk.
o Buffer manager: It is responsible for retrieving data from disk storage into
main memory. It enables the database to handle data sizes that are much
larger than the size of main memory.

o Data structures implemented by storage manager.

o Data files: Stored in the database itself.

o Data dictionary: Stores metadata about the structure of the database.

o Indices: Provide fast access to data items.

Data Dictionary

Data Dictionary consists of database metadata. It has records about objects


in the database. Data Dictionary consists of the following information:
1. Name of the tables in the database

2. Constraints of a table i.e. keys, relationships, etc.

3. Columns of the tables that related to each other

4. Owner of the table

5. Last accessed information of the object


19
6. Last updated information of the object
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

An example of Data Dictionary can be personal details of a student:

Example
<StudentPersonalDetails>

Student_ID Student_Name Student_Address Student_City


The following is the data dictionary for the above fields:

Field Name Datatype Field Length Constraint Description


Student_ID Number 5 Primary Key Student id
Student_Name Varchar 20 Not Null Name of the student
Student_Address Varchar 30 Not Null Address of the student
Student_City Varchar 20 Not Null City of the Student
Types of Data Dictionary
Here are the two types of data dictionary:

Active Data Dictionary

The DBMS software manages the active data dictionary automatically. The modification is an
automatic task and most RDBMS has active data dictionary. It is also known as integrated
data dictionary.

Passive Data Dictionary

Managed by the users and is modified manually when the database structure change. Also
known as non- integrated data dictionary.

The ER model defines the conceptual view of a database. It works around real-world
entities and the associations among them. At view level, the ER model is considered a good
option for designing databases.

20
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

Types of DBMS Architecture


There are several types of DBMS Architecture that we use according to the usage
requirements. Types of DBMS Architecture are discussed here.

 1-Tier Architecture
 2-Tier Architecture
 3-Tier Architecture
1-Tier Architecture
In 1-Tier Architecture the database is directly available to the user, the user can
directly sit on the DBMS and use it that is, the client, server, and Database are all
present on the same machine. This setup is simple and is often used in personal or
standalone applications where the user interacts directly with the database.
For Example: A Microsoft Excel spreadsheet is a great example of one-tier
architecture.

 Everything—the user interface, application logic and data is handled on a single


system.
 The user directly interacts with the application, performs operations like
calculations or data entry and stores data locally on the same machine.
This architecture is simple and works well for personal, standalone applications
where no external server or network connection is needed.

21
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

DBMS 1-Tier Architecture

Advantages of 1-Tier Architecture

Below mentioned are the advantages of 1-Tier Architecture.

 Simple Architecture: 1-Tier Architecture is the most simple architecture to set


up, as only a single machine is required to maintain it.
 Cost-Effective: No additional hardware is required for implementing 1-Tier
Architecture, which makes it cost-effective.
 Easy to Implement: 1-Tier Architecture can be easily deployed, and hence it is
mostly used in small projects.
2-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.
For Example: A Library Management System used in schools or small organizations
is a classic example of two-tier architecture.

1. Client Layer (Tier 1): This is the user interface that library staff or users interact
with. For example they might use a desktop application to search for books, issue
them, or check due dates.
2. Database Layer (Tier 2): The database server stores all the library records such
as book details, user information, and transaction logs.
The client layer sends a request (like searching for a book) to the database layer
which processes it and sends back the result. This separation allows the client to
focus on the user interface, while the server handles data storage and retrieval.

22
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

DBMS 2-Tier Architecture

Advantages of 2-Tier Architecture

 Easy to Access: 2-Tier Architecture makes easy access to the database, which
makes fast retrieval.
 Scalable: We can scale the database easily, by adding clients or upgrading
hardware.
 Low Cost: 2-Tier Architecture is cheaper than 3-Tier Architecture and Multi-
Tier Architecture .
 Easy Deployment: 2-Tier Architecture is easier to deploy than 3-Tier
Architecture.
 Simple: 2-Tier Architecture is easily understandable as well as simple because of
only two components.
3-Tier Architecture
In 3-Tier Architecture , there is another layer between the client and the server. The
client does not directly communicate with the server. Instead, it interacts with an
application server which further communicates with the database system and then
the query processing and transaction management takes place. This intermediate
23 layer acts as a medium for the exchange of partially processed data between the
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

server and the client. This type of architecture is used in the case of large web
applications.
For Example: E-commerce Store
User: You visit an online store, search for a product and add it to your cart.
Processing: The system checks if the product is in stock, calculates the total price
and applies any discounts.
Database: The product details, your cart and order history are stored in the database
for future reference.

DBMS 3-Tier Architecture

Advantages of 3-Tier Architecture

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

24
DATABASE MANAGEMENT SYSTEMS UNIT – I : INTRODUCTION

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

25

You might also like