Thursday, 8 October 2015

What is Difference Between Two-Tier and Three-Tier Architecture?

In my previous post I have outlined points to be considered while testing Web based applications. In today’s software testing class we are discussing about the Two-Tier and Three-Tier architecture.
All projects are broadly divided into two types of applications 2 tier and 3 tier architecture. Basically high level we can say that 2-tier architecture is Client server application and 3-tier architecture is Web based application. Below I am concentrating on the difference between Two-Tier and Three-Tier Architecture, what all advantages, disadvantages and practical examples.

Two-Tier Architecture:

The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster.
Two-Tier Architecture
Two-Tier Architecture
The above figure shows the architecture of two-tier. Here the direct communication between client and server, there is no intermediate between client and server.
Let’s take a look of real life example of Railway Reservation two-tier architecture:
Let’s consider that first Person is making Railway Reservation for Mumbai to Delhi by Mumbai Express at Counter No. 1 and at same time second Person is also try to make Railway reservation of Mumbai to Delhi from Counter No. 2
If staff from Counter No. 1 is searching for availability into system & at the same staff from Counter No. 2 is also looking for availability of ticket for same day then in this case there is might be good change of confusion and chaos occurs. There might be chance of lock the Railway reservation that reserves the first.
But reservations can be making anywhere from the India, then how it is handled?
So here if there is difference of micro seconds for making reservation by staff from Counter No. 1 & 2 then second request is added into queue. So in this case the Staff is entering data to Client Application and reservation request is sent to the database. The database sends back the information/data to the client.
In this application the Staff user is an end user who is using Railway reservation application software. He gives inputs to the application software and it sends requests to Server. So here both Database and Server are incorporated with each other, so this technology is called as “Client-Server Technology“.
The Two-tier architecture is divided into two parts:
1) Client Application (Client Tier)2) Database (Data Tier)
On client application side the code is written for saving the data in the SQL server database. Client sends the request to server and it process the request & send back with data. The main problem of two tier architecture is the server cannot respond multiple request same time, as a result it cause a data integrity issue.
Advantages:
  1. Easy to maintain and modification is bit easy
  2. Communication is faster
Disadvantages:
  1. In two tier architecture application performance will be degrade upon increasing the users.
  2. Cost-ineffective

Three-Tier Architecture:

Three-tier architecture typically comprise a presentation tier, a business or data access tier, and a data tier. Three layers in the three tier architecture are as follows:
1) Client layer
2) Business layer
3) Data layer
1) Client layer:
It is also called as Presentation layer which contains UI part of our application. This layer is used for the design purpose where data is presented to the user or input is taken from the user. For example designing registration form which contains text box, label, button etc.
2) Business layer:
In this layer all business logic written like validation of data, calculations, data insertion etc. This acts as a interface between Client layer and Data Access Layer. This layer is also called the intermediary layer helps to make communication faster between client and data layer.
3) Data layer:
In this layer actual database is comes in the picture. Data Access Layer contains methods to connect with database and to perform insert, update, delete, get data from database based on our input data.
Three-tier Architecture
Three-tier Architecture
Advantages
  1. High performance, lightweight persistent objects
  2. Scalability – Each tier can scale horizontally
  3. Performance – Because the Presentation tier can cache requests, network utilization is minimized, and the load is reduced on the Application and Data tiers.
  4. High degree of flexibility in deployment platform and configuration
  5. Better Re-use
  6. Improve Data Integrity
  7. Improved Security – Client is not direct access to database.
  8. Easy to maintain and modification is bit easy, won’t affect other modules
  9. In three tier architecture application performance is good.
Disadvantages
  1. Increase Complexity/Effort
This is the common Question asked in the Interview. Hope this article helped you understanding Two-Tier and Three-Tier Architecture with example.
Thanks and Happy Testing!!!
I think this will have an idea of two-tier and three-tier architecture. To get software testing articles in your inbox click here to Subscribe with your email address link. Also I would like all of you to please join this discussion and add more valuable points to it. Thanks.
- See more at: http://www.softwaretestingclass.com/what-is-difference-between-two-tier-and-three-tier-architecture/#sthash.ZVr987NV.dpuf

Q4.Difference between DBMS & RDBMS:-

Q4.Difference between DBMS & RDBMS:-

                 DBMS                                                     RDBMS
1.It is Data Base Management                        It is Relational Data Base
System.                                                      Management System.
2.It allows us to manage the data                   It is introduced by Dr.E.F.Codd.
base in the form of files or tables.
3.Components of DBMS user,hard                 Data structure,data integrity,data
ware,software,data.                                  manipulation.
4.DBMS does not support client                    RDBMS does support client
server architecture.                                    server architecture.
5.It has no security.                                     It is multilevel security.
a)Login at OS level.
b)Command level.
c)Object level.
6.DBMS does not support                          RDBMS support distribution.
distribution.
7.It is used as complex                               It is used as simple
business application.                              business application.
8.It is used for large data.                           It is used for large data.
Support to scripting language like
perl,asp,JSP.PHP etc.
Q1.What do you mean by freeware software?
=Freeware is available for free.But it doesnt mean that its source code is available for Modification.

Free Software-Free software is available for free to run,modify and redistribute.

Freeware-Acrobat reader



-freeware may have some restriction.Free software No restriction example c-library.
<h3><strong>Q1.What do you mean by freeware software?</strong></h3>
=Freeware is available for free.But it doesnt mean that its source code is available for Modification.

Free Software-Free software is available for free to run,modify and redistribute.

Freeware-Acrobat reader

<img class="alignnone" src="https://i2.wp.com/media.techhamlet.com/wp-content/uploads/2009/08/freeware.png" alt="" />

-freeware may have some restriction.Free software No restriction example c-library.Q2.What do you mean by Open Source software?<h3><img class="alignnone" src="https://esdlash.files.wordpress.com/2015/10/0c217-op.jpg?w=440" alt="" /></h3>
=Software whose source code is available for modification freely is called as open source software.

ex- Linux kernel Source code .

<img class="alignnone" src="https://esdlash.files.wordpress.com/2015/10/0c217-op.jpg?w=304&amp;h=166" alt="" width="304" height="166" />

-&gt;Programmers can charge for “open source” softwares,

-&gt;Open source software licensing gives permission to modify,copy and redistribute source code.

Q3.Difference between Application Server & Web Server:-

Q3.Difference between Application Server & Web Server:-
  Application Server                                               Web Server
1.Provide support to web services                 Web server is supposed to provide HTTP protocol
including HTTP                                         level services.
2.Application server are more heavy               It is less resource  utilization.
then web server in resource
utilization.
3.It provides the business logic for an            Web servers are used to provide
application program.                                 web pages.
4.Application server is used to                       Web server is used to serve web
serve web based applications &                  based applications.
enterprissed based applications.
5.It does everything which application          It supports scripting language like PERL,PHP,JSP,ASp,etc.
server dobut additionally it supports
application level services like meesaging
services