JDBC  «Prev  Next»

JDBC get() Methods - Exercise

JDBC methods to get database content information(database metadata)

Objective: Get database metadata.
Scoring
This exercise is worth a total of 5 points. To receive full credit, you will need to supply the minimum requested pieces of information about the HOSPITALS database. Once you have completed your answer, you will submit your solution below.
Background/overview
Download files
The Example3 file is included in the JDBCCourse zip file.
Instructions
  1. Open the Exercise3.java file from the JDBCCourse directory in your text editor.
  2. Search the file for the <<MODIFICATION 1>> tag. On the line following that tag, add the appropriate Connection method to create a DatabaseMetaData object.
  3. Search the file for the <<MODIFICATION 2>> tag.
    1. Add the appropriate method calls to provide a minimum of information about the database.
    2. Have the program list:

    The URL, the DatabaseProductName, the DatabaseProductVersion, the DefaultTransactionIsolation, and whether it supportsANSI92FullSQL and supportsTransactions. Also, list the SQLKeywords.
    (Please also feel free to experiment and add other method calls as well to help understand the capabilities of the DatabaseMetaData class.
    You can find documentation for these methods in the Javadoc information set for the Java 1.2 SDK.)
  4. Compile the program.
  5. Run the program.
  6. Place copies of the method calls you wrote in the Student Response Field box. Also, include a copy of the output from the execution of the program.

Submitting your exercise

Once you have entered your responses into the text box, Click Submit button to submit the exercise .