• Metadata: data about data
  • Meta information: information about information
  • Metadata operation: Data gives meaning full content knowing much detail about this content. The jdbc object represents certain resources of db s/w. In order to gather much details regarding these resources being from jdbc program we need to use metadata object
  • Data base metadata object:
    • This object is useful to gather limitation and capabilities of underlying db s/w. this object will be constructed based on jdbc connection object. Db metadata object means it is the object of class that implements java sql. Database metadata interface
    • By calling various on dbmd object we can know limitation and capabilities of underlying db s/w
Eg: database Metadata dbmd= con.getMetaData ();
  • ResultSetMetaData Object:
    • This object is given to know much about db table that is represented by resultset object. These details are like column name, column data types and etc
    • Resultset metadata object means it is the object of class that implements java.sql.resultsmetadata.interfcae this object will be constructed based on result object
      • Statement st=con.prepareStatement();
      • Resultset rs=st.executequery(“select * from student”);
      • ResultSetMetaData rsmd=rs.getmetadata();
    • Using resultset object we can gather column values of a table
    • In order to get column names, columns data types and etc details we need to work with ResultSetMetaData object. By calling various methods on rsmd object. We can know the details about table columns
  • ParameterMetaData object:
    • It give details about parameters of the queries (?) that are represented by prepared statement object, callable statement object
    • PreparedStatement ps=con.prepareStatement (“insert into student values (?,?,?));
    • Using this object we can know the details about parameter of pl/sql procedure and function and details about placeholder parameter (?)  available in quires of PreparedStatement object
    • It is the object of a class that implements java.sql. ParameterMetaData interface.this object has to be constructed based on prepared statement object, callablestatement object using this object we can know details about parameter like mode,name,types and etc