filmov
tv
71 Advanced Java Tutorial | JDBC | DatabaseMetaData | Java Database Connectivity | adv java

Показать описание
Advanced Java Tutorial : adv java - #Metadata: (Data about the data is called as metadata). Java Database Connectivity
To know much details about the database software & its table, JDBC supports 3 modes metadata programming.
1) DatabaseMetaData
2) ResultSetMetaData
3) ParameterMetaData
1) DatabaseMetaData:
--------------------
- Gives limitatation & capability of underlaying Database software like database software name, version, more characters of table & etc...
-Call various methods on DatabaseMetaData object to gather much details about underlaying database software. (Here maximum methods are self descriptive.)
-to get the object of DatabaseMetaData-
Example Java JDBC application to read MetaData of the Database.:
================================================================
public class DatabaseMetaDataInfo
{
public static void main(String[] args) throws Exception
{
//jdbc:odb:dsnname for type 1 driver
//get the DatabaseMetaData object
}
}
compile & run:
DatabaseMetadata programming is useful while developing GUI tools for dtabase software like sqlyog, mysqlfront , toadformsyql & etc...
-JDBC metadata programming is no where related to performing CURD (create, update, read, delete) operations on database.
its given to gather additional details about database software & tables.
- If certain JDBC driver can not retrive certain information about Dtabase then it returns 0 (zero) or null value while working with DatabaseMetaData.
To know much details about the database software & its table, JDBC supports 3 modes metadata programming.
1) DatabaseMetaData
2) ResultSetMetaData
3) ParameterMetaData
1) DatabaseMetaData:
--------------------
- Gives limitatation & capability of underlaying Database software like database software name, version, more characters of table & etc...
-Call various methods on DatabaseMetaData object to gather much details about underlaying database software. (Here maximum methods are self descriptive.)
-to get the object of DatabaseMetaData-
Example Java JDBC application to read MetaData of the Database.:
================================================================
public class DatabaseMetaDataInfo
{
public static void main(String[] args) throws Exception
{
//jdbc:odb:dsnname for type 1 driver
//get the DatabaseMetaData object
}
}
compile & run:
DatabaseMetadata programming is useful while developing GUI tools for dtabase software like sqlyog, mysqlfront , toadformsyql & etc...
-JDBC metadata programming is no where related to performing CURD (create, update, read, delete) operations on database.
its given to gather additional details about database software & tables.
- If certain JDBC driver can not retrive certain information about Dtabase then it returns 0 (zero) or null value while working with DatabaseMetaData.