Wednesday 23 October 2024

What is the JDBC Programming Model?


Advanced Java: 02

Q.1 What is JDBC?

  • JDBC is a java-based data access technology from sun microsystem.
  • JDBC is not a software, not a programming language it's a technology.
  • JDBC is a trademark name given to a technology.
  • No framework in the world without JDBC they can communicate with database.
  • There is no expansion of JDBC.
Q.2 What is the architecture of JDBC?
  • Please remember if you know JDBC then only you understand database.
  • Java database communication is to perform CRUD (create, read, update, delete) operation is acts like a client server architecture. JDBC follows client server architecture.
  • A software or a program that request for resources is a client.
  • A Software that provides requested resources to client is a server.
Q.3 What is a JDBC Client?
  • Any java program that uses JDBC Technology to communicate with the database is known as a JDBC client.
  • Why it is a client because java program is requesting for connection, requesting for CRUD operation.
Q.4 What is the JDBC Programming Model?
  • There are certain steps that you have to follow to understand JDBC Programming model.


Note: First you should be conceptually strong and then you should be programmatically strong.

Q.5 What are the JDBC client-side requirements to communicate with the database?

  • The movement we install JDK following things automatically get install along with it.
  1. JDBC API
  2. JDBC DRIVER
  • Without JDBC API (library Methods) and JDBC Driver you cannot communicate with the database.
Q.6 What is JDBC API?
  • Please note in interview if they ask what API is? then tell API is Application Programming Interface they are not asking long form of it please note. you have to tell them the correct answer is "A Collection of library methods" as you know in java methods belongs to Classes and Interfaces. Classes and Interfaces belongs to Packages. 
  • likewise, to communicate with the database java has java. SQL package which having library classes and library interfaces.
  • Now the answer for what is JDBC API? is "A Collection of library methods (that belongs to the library classes and library interfaces) of java SQL package."
  • Note: You installed JDK means you install JDBC API, but you need to import the package (java. SQL) in application. we required this to perform CRUD operation with the database.
  • JDBC API, is nothing but the tool.
Q.7 What is a JDBC Driver?
  • JDBC Driver is a translation software written in java according to JDBC specification.
  • JDBC Driver performs the following operation or duties to enable java-database communication.
  1. when java program (JDBC Client) makes a method call, JDBC Driver will receive that method call. JDBC Driver translates this method call into Pure SQL statement and send it to DBMS Software. DBMS handover this statement to MySQL for execution.
  2. Once the MySQL execute these statements (Query) it generates SQL Type response from the DBMS to JDBC Driver. now once again JDBC Driver translate this SQL Response into java format and handing over to java program (JDBC Client).



Imp Note: Once you understand JDBC, you will enjoy 6 to 7 ways of database connection.

 

data structures and algorithms Web Developer

No comments:

Post a Comment