Meta Data
Metadata is information about a particular data set which may describe, for example, how, when, and by whom it was received, created, accessed, and/or modified and how it is formatted.
Result Set Meta Data
The java.sql.ResultSetMetaData
interface provides extra information about ResultSet
. The following information is provided by the interface:
- How many columns are in the result set?
- Are column names case-sensitive?
- Can you search on a give column?
- Is
NULL
a valid value for a given column?
- How many characters is the maximum display size for a column?
- What label should be used in a display header for the column?
- What is the name of a given column?
- What table did a give column come from?
- What is the data type of a given column?
Database Meta Data
The java.sql.DatabaseMetaData
interface provides methods that tell you about the database for a given Connection
object, including:
- What tables exist in the database?
- What user name is being used by this connection?
- Is this database connection read-only?
- What keywords are used by the database that are not SQL2?
- Does the database support column aliasing?
- Are multiple result sets from an
execute
call supported?
- Are outer joins supported?
- What are the primary keys for a table?