Getting the DatabaseMetaData object


show more Getting the DatabaseMetaData object provides you with in-depth training on Developer. Taught by David Gassner as part of the Java Database Integration with JDBC show less
please wait ...

Getting the DatabaseMetaData object

In most database application environments, you already know the database structure, the names of the tables, the number, and types of the columns, and so on, but there are times when you have to discover this information dynamically, and JDBC gives you that ability through a function called metadata. The term metadata in the context of databases describes exactly the sort of information, and you can get the metadata from a database connection quite easily. I'll do an initial demonstration of this functionality in a project named Table List.

I'm using a Singleton Connection Manager which I have described how to build in a previous exercise. I have gotten a reference to my connection, and then within the try catch block, I'm going to add some data to get a list of tables that's in my database. Within the try block, I'll first declare an object instantiated as DatabaseMetaData. As with many other objects in JDBC, you might see more than one version. Always be sure to choose the ve...

Getting the DatabaseMetaData object
Video duration: 3m 40s 2h 51m Intermediate

Viewers:

Getting the DatabaseMetaData object provides you with in-depth training on Developer. Taught by David Gassner as part of the Java Database Integration with JDBC

Subject:
Developer
Software:
Java
Author:
please wait ...