ResultSetMetaData

ResultSetMetaData :

The metadata implies information about information i.e. we can get additional data from the information.

In the event that you need to get metadata of a table like aggregate number of segment, section name, segment sort and so forth, ResultSetMetaData interface is helpful in light of the fact that it gives strategies to get metadata from the ResultSet question.

METHODS OF RESULTSETMETADATA :

Methods of ResultSetMetaData

object of ResultSetMetaData:

The getMetaData() method of ResultSet interface returns proceeds the entity of ResultSetMetaData

Syntax:

  public ResultSetMetaData getMetaData()throws SQLException

 DatabaseMetaData:

DatabaseMetaData interface gives techniques to get meta information of a database, for example, database item name, database item form, driver name, name of aggregate number of tables, name of aggregate number of perspectives and so forth.

 Methods of DatabaseMetaData:

  • public String getDriverName()throws SQLException
  • public String getDriverVersion()throws SQLException
  • public String getUserName()throws SQLException
  • public String getDatabaseProductName()throws SQLException
  • public String getDatabaseProductVersion()throws SQLException
  • public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)throws SQLException
Object of DatabaseMetaData:

The getMetaData() method of link line returns the object of DatabaseMetaData.

Syntax:

public DatabaseMetaData getMetaData()throws SQLException

Example:

import java.sql.*;

class Dbmd2{

try{

Class.forName(“oracle.jdbc.driver.OracleDriver”);

public static void main(String args[]){

Connection con=DriverManager.getConnection(

“jdbc:oracle:thin:@localhost:1521:xe”,”system”,”oracle”);

DatabaseMetaData dbmd=con.getMetaData();

String table[]={“TABLE”};

ResultSet rs=dbmd.getTables(null,null,null,table);

while(rs.next()){

System.out.println(rs.getString(3));

}  con.close();

}catch(Exception e){ System.out.println(e);}

}

}

Transaction Management:

Exchange speaks to a solitary unit of work. The ACID properties depicts the exchange administration well. Corrosive stands for Atomicity, Consistency, confinement and toughness.

Atomic implies either all effective or none. Consistency guarantees bringing the database starting with one reliable state then onto the next predictable state. Confinement guarantees that exchange is disconnected from other exchange. Toughness implies once an exchange has been conferred, it will remain along these lines, even in case of blunders, control misfortune and so on.

 Methods:

void setAutoCommit(boolean status)

void rollback()

void commit()

Drop Us A Query

Trending Courses
  • Python and Django Online Training
  • Python is a dynamic interrupted language which is used in wide varieties of applications. It is very interactive object oriented and high-level programming language.

  • Tableau Online Training
  • Tableau is a Software company that caters interactive data visualization products that provide Business Intelligence services. The company’s Head Quarters is in Seattle, USA.

  • MicroStrategy Online Training
  • Micro Strategy is one of the few independent and publicly trading Business Intelligence software provider in the market. The firm is operational in 27 Countries around the globe.

  • PEGA (PRPC) 7.2 Certification Online Training
  • Pega Systems Inc. is a Cambridge, Massachusetts based Software Company. It is known for developing software for Customer Relationship Management (CRM) and Business process Management (BPM).

  • Workday Online Training
  • Workday specialises in providing Human Capital Management, Financial Management and payroll in online domain.It is a major web based ERP software vendor.

  • Power BI Online Training
  • Power BI is business analytics service by Microsoft. With Power BI, end users can develop reports and dashboards without depending on IT staff or Database Administrator.


100% Secure Payments. All major credit & debit cards accepted.