DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • What Is API-First?
  • Building Micro-Frontends With Vue and Reusable Components
  • Modeling Saga as a State Machine
  • The Serious Stack Behind Salesforce Developers — Part 2

Trending

  • MCP Servers: The Technical Debt That Is Coming
  • The End of “Good Enough Agile”
  • Event Driven Architecture (EDA) - Optimizer or Complicator
  • Scaling Microservices With Docker and Kubernetes on Production
  1. DZone
  2. Data Engineering
  3. Databases
  4. 2-Tier Architecture vs 3-Tier Architecture in DBMS

2-Tier Architecture vs 3-Tier Architecture in DBMS

This article talks about the architecture of DBMS (Database Management Systems), with their structure, advantages, features, and more.

By 
Bikash Jain user avatar
Bikash Jain
·
Updated Oct. 06, 22 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
9.7K Views

Join the DZone community and get the full member experience.

Join For Free

There are multiple ways to fetch the data stored in the database management system. We have classified the architecture of DBMS based on their structure. 

In this article, I will discuss their structure, advantages, features, etc.; multiple architectures are used for various purposes. 

DBMS Architecture

Overview of Architecture in DBMS

Understanding 2-tier and 3-tier architecture is quite an important topic, not just for academics or for seeking a good job but also for general awareness related to technology. We will see this difference with the help of real-life examples.

2-Tier Architecture in DBMS

2-tier simple means two layers; here, tier means simply layer. There are 2 layers one is the client layer, The one where the data is stored, i.e., the database server. And another is the Client layer which is basically a machine, That runs the query on the database server and gets the desired data. The client machine has an interface that shows the desired data to the user.

The data from the database server can be fetched using an API in the client machine. Also, API stands for an Application programming interface. 

The purpose of API is to get the data from the database server on the interval of pre-defined time and utilize it for various purposes. For example, there are various applications that show the live location of the train, or while using cab services like Ola and Uber, they use google maps API, for which they definitely pay some amount to google. They track the delivery guy or the cab using that API and show it to you. Here you can also observe that the time interval between fetching data using API is very less as we want to get the exact location of our cab. Still, while locating a train, we do not need this high precision so that we can reduce the frequency of data fetching using API.

An API first makes a connection and then writes a query on the interface; a simple query means, I want to fetch a particular data, then the query will go to the database server, and this server will process that query, which means we wrote an application program, an application program means I want to fetch a particular data, and that program can be in any language like simple example if I am writing in Java, then that application program will come to the database server, there it will first get converted to the low-level language because the application program can be in any other language, in high language, we will convert it here, means the server will convert it, process it, and whatever data is demanded in that query, that data Will be given back to the client. This is how the 2-tier architecture actually works. 2-tier is also called client-server architecture.

We have seen the use of the 2-tier architecture in our daily life, like when we book a ticket on Railways, not through the web and other applications. But if I go to the station and fill out the form and reserve the ticket, then the people who are sitting on that side of the window, having a client machine, in that client machine, they will fill the information. They will call the details of that train from the database server about how many seats are available; according to that, whatever the process is, they will process it and make a ticket.

The advantage of this architecture is that it is very simple as there are only 2 layers; maintenance is very easy because there are limited and authorized bank employees, and there is a limited database.

3-Tier Architecture in DBMS  

But today, every bank and other organization wants to grow and have more users, manage them with fewer resources, and provide the service 24 X 7. They allow the user to perform all the queries using the web or mobile application. It is quite complex for the database server to process the queries of all the users from high-level language to low-level language and further executing all the queries after authorizing them with this security is another main issue as the user has direct access to the database.

3-Tier Architecture in DBMS

To solve all such problems, we use Tier- 3 architecture. In Tier- 3 architecture, another layer is introduced between the client and server. 3 Tier Architecture means 3 layers arrived. First is the application layer, which we call directly is client layer; the second is the business layer, and the third is the database or data layer.

First of all, the client layer is the same, which means here, all are my users who are normal users like we are also normal users; all of us, by opening the railway's website or the application, our machine, is called a client machine. Now there is an interface running that helps us to make connectivity with the database; An interface is an application that can be in Java, Python, PHP, etc. To support that language or application, there is the business layer, which means that the query from the client machine is processed at the business layer. This reduces the load on the data server.

The request made by us, i.e., the client machine, first goes to the application layer. That application layer verifies it and processes it from the high-level language to the low-level language and then passes that simplified query to the database server. Then the server just gives back the data to the application layer, and it returns the data to the client machine after converting it into the high-level language from the low-level language. 

The application layer also avoids the direct interaction of the client machine with the database server, which increases the security of the database server.

After introducing the third layer, i.e., the application layer, the architecture in DBMS has become a little bit complex but efficient and safe. It is a bit harder for us to do the maintenance of the tier 3 architecture. Still, when we are providing service to this user base, we expect to have good resources for maintenance since it is a bit more costly than tier 2 architecture, but still, it is worth the resources.

API Architecture Database Database server Dbm Machine Management system Data (computing) Interface (computing) mobile app

Opinions expressed by DZone contributors are their own.

Related

  • What Is API-First?
  • Building Micro-Frontends With Vue and Reusable Components
  • Modeling Saga as a State Machine
  • The Serious Stack Behind Salesforce Developers — Part 2

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!