Java JDBC Tutorial

People always think JDBC is a very big and difficult technology.But after reading the below story you will say JDBC is one of the easiest technology you ever read.


One day the king of San Marino get a news that there is a small country where gold and diamond are available very cheap cost. Like gold 1 USD/Kg and Diamond 2 USD/Kg.

So the king thinks to buy 100 kg gold and 100kg Diamond from that place.So he called a meeting to discuss how to easily go there and buy the gold and diamond.

After the meeting over the king find two problems.

  1. The local language used by the place where gold and diamond available is completely unknown to the king.
  2. There is no road to go there.

So the king arranges a translator who can able to understand their language and easily Communicate with them. The king also builds a road to that place.

After all the thing ready the translator and some people go to that country on a vehicle along with the king requirement.

After reached the country where gold and diamond available the translator communicates with the people and say him the king requirement and fix the deal. Then the people keep the gold and diamond inside a box and kept in the vehicle.

Then the vehicle reached to the San Marino king.

Ok, if you able to understand the story then your JDBC subject is completed.

Now you must think JDBC is a technical terminology and the story is all about gold and diamond.Ok now I am convert the story into technical terminology.Just see the below image.

  1. Here San Marino is nothing but the Java application JDBC.
  2. Here translator is nothing but the JDBC driver software.
  3. Where the gold and diamond is available the place is called as Database.
  4. The requirement of gold and diamond sent by king is nothing but the Sql query.
  5. After get the requirement database execute it and sent the result to Java application.