JDBC (Java Database Connectivity) is a Java API designed to facilitate connection and execution of queries with relational databases compatible with SQL. It is an integral part of Java SE (Java Standard Edition). JDBC API relies on JDBC drivers to establish connections with databases.

Steps

When you interact from Java to Relational Databases it consists of below steps.

  1. Create SQL Query
  2. You make a Database Connection
  3. You create Statement from the Connection
  4. Execute the Statement and get the ResultSet
  5. Iterate the ResultSet to get the database records
  6. Close all the ResultSet, Statement and Connection in sequence
( ( ( ( ( ( 1 2 3 4 5 6 ) ) ) ) ) ) C O C E I C r p r x t l e e e e e o a n a c r s t t u a e e D e t t a e e R J S t S e J a Q a t S R s a v L b a t e u v a a = t a s < l a Q s = e t u = t u e = m e l = S e = e m t = e r C = n e S = t y o = t n e = , n = t t = n = f = S e = r ( = t c = o r = a t = m e = t i = a = e o = C d = m n = o = e = n d = n = n a = t = e t = , c a = J t ) = a D i = n B o = d C n = = C D = o r = n i = n v = e e = c r = t = i = = o = = n = P = = r = = o = = c = = e = = s = = s = = = = S = = Q = R = L = R D = , = D B = = B M R M S e S t u r n R e s u l t S e t

Simple. Isnt it. In the next chapters lets see these concepts with examples


Classes
Quiz
Videos
References
Books