{"id":18998,"date":"2015-01-27T15:00:00","date_gmt":"2015-01-27T13:00:00","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=18998"},"modified":"2019-03-05T12:55:59","modified_gmt":"2019-03-05T10:55:59","slug":"jdbc-databasemetadata-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/","title":{"rendered":"JDBC DatabaseMetaData Example"},"content":{"rendered":"<p>In this example will talk about how to get the Database&#8217;s Metadata and what is the usefulness of that information for our development, through the Java API JDBC <code>java.sql.DatabaseMetaData<\/code> .<\/p>\n<h2>1. What is the Metadata ?<\/h2>\n<p>The Database&#8217;s Metadata is information about the data, what? Yes, is data about data, of which are two types of data, <strong>structural metadata<\/strong> about the design and specification of data structures and <strong>descriptive metadata<\/strong> about the identification of the resources and own instance information.<br \/>\n&nbsp;<br \/>\n&nbsp;\n<\/p>\n<h2>2. How is this useful ?<\/h2>\n<p>Imagine that you don&#8217;t have a database client IDE, and you only have the credentials, but you don&#8217;t have any information about the database and need to manage them. This is a common scenario for a developer and here is the usefulness of the metadata, with a brief code, we can get all the information about the database for start to develop our DML and DDL queries.<\/p>\n<h2>3. What We Need ?<\/h2>\n<ol>\n<li>JDBC Driver (We use MYSQL 5 Driver)<\/li>\n<li>An IDE of our taste (We use Eclipse)<\/li>\n<li>JDK 1.7 (Due to DBCP2 runs on Java 7)<\/li>\n<li>An DBMS running with a valid Schema (In this example we named it \u201cTest\u201d in MYSQL 5 Engine)<\/li>\n<\/ol>\n<h2>4. The Example<\/h2>\n<p>We use the traditional <code>DBConnection.java<\/code> class to connect to the database.<\/p>\n<p><span style=\"text-decoration: underline\"><em>DBConnection.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.jdbc.metadata;\n\nimport java.sql.Connection;\nimport java.sql.DriverManager;\nimport java.sql.SQLException;\n\n\/**\n * @author Andres.Cespedes\n * @version 1.0 $Date: 24\/01\/2015\n * @since 1.7\n *\n *\/\npublic class DBConnection {\n\n\tprivate static String DB_URL = \"jdbc:mysql:\/\/localhost:3307\/test\";\n\tprivate static String DB_USER = \"admin\";\n\tprivate static String DB_PASSWORD = \"admin\";\n\n\tpublic static Connection getConnection() throws SQLException {\n\t\tConnection connection = DriverManager.getConnection(DB_URL, DB_USER,\n\t\t\t\tDB_PASSWORD);\n\t\tSystem.err.println(\"The connection is successfully obtained\");\n\t\treturn connection;\n\t}\n}\n<\/pre>\n<p>With the <code>connection<\/code>, now we can get all the comprehensive information about the schemas or the tables and everything else as a whole, using the <code>getMetaData()<\/code> method.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline\"><em>Metadata.java<\/em><\/span><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.jdbc.metadata;\n\nimport java.sql.Connection;\nimport java.sql.DatabaseMetaData;\nimport java.sql.ResultSet;\nimport java.sql.SQLException;\nimport java.util.ArrayList;\n\n\/**\n * @author Andres.Cespedes\n * @version 1.0 $Date: 24\/01\/2015\n * @since 1.7\n *\/\npublic class Metadata {\n\n\tstatic Connection connection = null;\n\tstatic DatabaseMetaData metadata = null;\n\n\t\/\/ Static block for initialization\n\tstatic {\n\t\ttry {\n\t\t\tconnection = DBConnection.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"There was an error getting the connection: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\n\t\ttry {\n\t\t\tmetadata = connection.getMetaData();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"There was an error getting the metadata: \"\n\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}\n\n\t\/**\n\t * Prints in the console the general metadata.\n\t * \n\t * @throws SQLException\n\t *\/\n\tpublic static void printGeneralMetadata() throws SQLException {\n\t\tSystem.out.println(\"Database Product Name: \"\n\t\t\t\t+ metadata.getDatabaseProductName());\n\t\tSystem.out.println(\"Database Product Version: \"\n\t\t\t\t+ metadata.getDatabaseProductVersion());\n\t\tSystem.out.println(\"Logged User: \" + metadata.getUserName());\n\t\tSystem.out.println(\"JDBC Driver: \" + metadata.getDriverName());\n\t\tSystem.out.println(\"Driver Version: \" + metadata.getDriverVersion());\n\t\tSystem.out.println(\"\\n\");\n\t}\n\n\t\/**\n\t * \n\t * @return Arraylist with the table's name\n\t * @throws SQLException\n\t *\/\n\tpublic static ArrayList getTablesMetadata() throws SQLException {\n\t\tString table[] = { \"TABLE\" };\n\t\tResultSet rs = null;\n\t\tArrayList tables = null;\n\t\t\/\/ receive the Type of the object in a String array.\n\t\trs = metadata.getTables(null, null, null, table);\n\t\ttables = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\ttables.add(rs.getString(\"TABLE_NAME\"));\n\t\t}\n\t\treturn tables;\n\t}\n\n\t\/**\n\t * Prints in the console the columns metadata, based in the Arraylist of\n\t * tables passed as parameter.\n\t * \n\t * @param tables\n\t * @throws SQLException\n\t *\/\n\tpublic static void getColumnsMetadata(ArrayList tables)\n\t\t\tthrows SQLException {\n\t\tResultSet rs = null;\n\t\t\/\/ Print the columns properties of the actual table\n\t\tfor (String actualTable : tables) {\n\t\t\trs = metadata.getColumns(null, null, actualTable, null);\n\t\t\tSystem.out.println(actualTable.toUpperCase());\n\t\t\twhile (rs.next()) {\n\t\t\t\tSystem.out.println(rs.getString(\"COLUMN_NAME\") + \" \"\n\t\t\t\t\t\t+ rs.getString(\"TYPE_NAME\") + \" \"\n\t\t\t\t\t\t+ rs.getString(\"COLUMN_SIZE\"));\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\n\t}\n\n\t\/**\n\t * \n\t * @param args\n\t *\/\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t\tprintGeneralMetadata();\n\t\t\t\/\/ Print all the tables of the database scheme, with their names and\n\t\t\t\/\/ structure\n\t\t\tgetColumnsMetadata(getTablesMetadata());\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"There was an error retrieving the metadata properties: \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}\n}\n<\/pre>\n<p>In the above example, we just used two methods from the <code>DatabaseMetaData<\/code> interface, the first method <code>getTables<\/code> returns a <code>Resultset<\/code> object with the information about the type we send as a parameter, the typical types are &#8220;TABLE&#8221;, &#8220;VIEW&#8221;, &#8220;SYSTEM TABLE&#8221;, &#8220;GLOBAL TEMPORARY&#8221;, &#8220;LOCAL TEMPORARY&#8221;, &#8220;ALIAS&#8221;, &#8220;SYNONYM&#8221;. In the <code>Resultset<\/code> we can get the information looking for the some columns as:[ulp id=&#8217;TD36VgQCKfhTAygK&#8217;]<\/p>\n<ul>\n<li>TABLE_CAT String =&gt; table catalog (may be null)<\/li>\n<li>TABLE_SCHEM String =&gt; table schema (may be null)<\/li>\n<li>TABLE_NAME String =&gt; table name<\/li>\n<\/ul>\n<p>With the second method <code>getColumns<\/code> we can obtain the information for each table, and with a <code>for<\/code>loop just get all the information from the database if we pass as a paremeter the table name retrieved in the previous method.<\/p>\n<h2>5. Running the Example<\/h2>\n<pre class=\"brush:bash\">The connection is successfully obtained\nDatabase Product Name: MySQL\nDatabase Product Version: 5.6.22-log\nLogged User: admin@localhost\nJDBC Driver: MySQL Connector Java\nDriver Version: mysql-connector-java-5.1.34 ( Revision: jess.balint@oracle.com-20141014163213-wqbwpf1ok2kvo1om )\n\n\nCITY\nidcity INT 10\nname VARCHAR 45\npopulation INT 10\ndepartment INT 10\n\n\nCOUNTRY\nidcountry INT 10\nname VARCHAR 45\npib INT 10\n\n\nDEPARTMENT\nidDepartment INT 10\nname VARCHAR 6\n<\/pre>\n<div class=\"tip\"><strong>Tip<\/strong><br \/>\nSome Driver vendors doesn&#8217;t implements all the methods from the API, and doesn&#8217;t retrieve all the columns, so you must avoid a NullPointerException with a try\/catch block while you do either of these operations.<\/div>\n<h2>6. Download the Eclipse Project<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here:&nbsp;<a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2015\/01\/JDBCMetaDataExample.zip\"><strong>JDBCMetaDataExample<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this example will talk about how to get the Database&#8217;s Metadata and what is the usefulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData . 1. What is the Metadata ? The Database&#8217;s Metadata is information about the data, what? Yes, is data about data, of which are two types &hellip;<\/p>\n","protected":false},"author":37,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[856,216,855],"class_list":["post-18998","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql","tag-databasemetadata","tag-jdbc-2","tag-metadata"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>JDBC DatabaseMetaData Example<\/title>\n<meta name=\"description\" content=\"In this example will talk about how to get the Database&#039;s Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JDBC DatabaseMetaData Example\" \/>\n<meta property=\"og:description\" content=\"In this example will talk about how to get the Database&#039;s Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-27T13:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-03-05T10:55:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andres Cespedes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@acespedes12\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andres Cespedes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\"},\"author\":{\"name\":\"Andres Cespedes\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a32ee4d7e34cb21bfd2a5a68cf174f8a\"},\"headline\":\"JDBC DatabaseMetaData Example\",\"datePublished\":\"2015-01-27T13:00:00+00:00\",\"dateModified\":\"2019-03-05T10:55:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\"},\"wordCount\":419,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"keywords\":[\"DatabaseMetaData\",\"jdbc\",\"metadata\"],\"articleSection\":[\"sql\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\",\"name\":\"JDBC DatabaseMetaData Example\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2015-01-27T13:00:00+00:00\",\"dateModified\":\"2019-03-05T10:55:59+00:00\",\"description\":\"In this example will talk about how to get the Database's Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"sql\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"JDBC DatabaseMetaData Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a32ee4d7e34cb21bfd2a5a68cf174f8a\",\"name\":\"Andres Cespedes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/12\/Andres-Cespedes_avatar_1418741113-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/12\/Andres-Cespedes_avatar_1418741113-96x96.jpg\",\"caption\":\"Andres Cespedes\"},\"description\":\"Andres is a Java Software Craftsman from Medellin Colombia, who strongly develops on DevOps practices, RESTful Web Services, Continuous integration and delivery. Andres is working to improve software process and modernizing software culture on Colombia.\",\"sameAs\":[\"http:\/\/www.javacodegeeks.com\/\",\"http:\/\/co.linkedin.com\/in\/andrespedes12\",\"https:\/\/x.com\/acespedes12\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/andres-cespedes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JDBC DatabaseMetaData Example","description":"In this example will talk about how to get the Database's Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/","og_locale":"en_US","og_type":"article","og_title":"JDBC DatabaseMetaData Example","og_description":"In this example will talk about how to get the Database's Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-01-27T13:00:00+00:00","article_modified_time":"2019-03-05T10:55:59+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Andres Cespedes","twitter_card":"summary_large_image","twitter_creator":"@acespedes12","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Andres Cespedes","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/"},"author":{"name":"Andres Cespedes","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a32ee4d7e34cb21bfd2a5a68cf174f8a"},"headline":"JDBC DatabaseMetaData Example","datePublished":"2015-01-27T13:00:00+00:00","dateModified":"2019-03-05T10:55:59+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/"},"wordCount":419,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","keywords":["DatabaseMetaData","jdbc","metadata"],"articleSection":["sql"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/","name":"JDBC DatabaseMetaData Example","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2015-01-27T13:00:00+00:00","dateModified":"2019-03-05T10:55:59+00:00","description":"In this example will talk about how to get the Database's Metadata and what is the uselfulness of that information for our development, through the Java API JDBC java.sql.DatabaseMetaData.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/core-java\/sql\/jdbc-databasemetadata-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"sql","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/sql\/"},{"@type":"ListItem","position":5,"name":"JDBC DatabaseMetaData Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/a32ee4d7e34cb21bfd2a5a68cf174f8a","name":"Andres Cespedes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/12\/Andres-Cespedes_avatar_1418741113-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2014\/12\/Andres-Cespedes_avatar_1418741113-96x96.jpg","caption":"Andres Cespedes"},"description":"Andres is a Java Software Craftsman from Medellin Colombia, who strongly develops on DevOps practices, RESTful Web Services, Continuous integration and delivery. Andres is working to improve software process and modernizing software culture on Colombia.","sameAs":["http:\/\/www.javacodegeeks.com\/","http:\/\/co.linkedin.com\/in\/andrespedes12","https:\/\/x.com\/acespedes12"],"url":"https:\/\/examples.javacodegeeks.com\/author\/andres-cespedes\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/18998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/37"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=18998"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/18998\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=18998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=18998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=18998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}