Tuesday 25 June 2019

JDBC Architecture:





  • The JDBC API supports both two-tier and three tier processing model for database access but in general, JDBC Architecture consist of two layers:
  • 1. JDBC API: This API provides the Application-to-JDBC Manager connection.
  • 2. JDBC Driver API: This supports  the JDBC Manager-to-driver Connection.
  • The JDBC API uses a driver manager and database specific drivers to provide connectivity to database.
  • The JDBC driver manager ensure that the Correct driver is used to access each data Source.
  • The Driver manager is capable of supporting multiple concurrent drivers connected to multiple databases.


Two tier database design:



  • The two-tier is based on Client-Server architecture.
  • The direct Communication takes place between client and server.
  • There is no mediator between client and server.
  • In this type of Database design, User Interface and business Logic is in client side and Database is on server side.
  • The client computer directly access the data without seeing the database. This means that the data on the server is much more secure.

Advantages:
  • It is easy to implement.
  • It is easy to maintain.
  • It performs faster.
  • High portability.

Disadvantages:
  • Performance is reduced when clients increase.
  • More suitable to small scale group and simple for Web-based.

Three tier database design:




  • In this type of Database design, User interface is on client side, Business Logic is on separate application server and database is on Database Server.
  • In three-tier database design, client communicates with database server through application server.
  • Three-tier architecture typically have Presentation tier, Business tier or data access tier,  and data tier.
  • Three layers in the three tier architecture are as follows:

         1. Client layer(Presentation layer)
         2. Business layer(Application layer/Middle layer)
         3. Data layer

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.

Business layer:

  • In this layer all business logic written like validation of data, calculation, data insertion etc.
  • It acts as an interface between client layer and data layer.
  • It is also called the mediator, helps to make communication faster between client and data layer.

Data layer:

  • In this layer actual database is comes in the picture.
  • It contains method to connect with database and to perform insert, update, delete, get data from database based on our input data.
Advantages:
  • Improved security.
  • Performance is higher than 2-tier.
  • Easy to maintain and modification is bit easy.
Disadvantages:
  • Increase Complexity.


No comments:

Post a Comment