Questions tagged [database-metadata]

Metadata is "data about data". In database terminology, this set of metadata is referred to as the catalog. The SQL standard specifies a uniform means to access the catalog, called the information schema, but not all databases implement it, even if they implement other aspects of the SQL standard. For an example of database-specific metadata access methods, see Oracle metadata.

Meta Data:

Metadata is “data about data”. An item of metadata describes the specific characteristics about an individual data item. In databases, metadata describes the structural components of tables and their elements. For example, metadata about an element could include data types, name of data, size and many more characteristics about that element. It would also give information about the tables the database is storing, information, such as length of fields, number of columns, where the tables are located and other pertinent information. One of the main uses for met data is to provide a link between the information creator and the information users. Metadata allows the users to speed up the search for individual data. This is done by being able to set parameter for searches, allowing the filtering of unwanted information. Metadata can be stored either internally, in the same file as the data or externally, in a separate area. Both have advantages and disadvantages. If the data is stored internally, the metadata is together with the data making more easily accessible to view or change. However, this method creates high redundancy. If metadata is stored externally, the searches can become more efficient. There is no redundancy but getting to this metadata may be a little more technical. There are certain formats that must be used, such as Uniform Resource Identifier(URI) to get to the metadata if this format is not used the metadata becomes inaccessible. All the metadata is stored in a data dictionary or a system catalog. All programs that access data in the database work through a DBMS. The DBMS uses the data dictionary to look up the required components and relationships. Any changes made to the database structure are automatically recorded in the data dictionary. This makes the data dictionary manager’s job a lot easier because any modification of programs that are affected by the changed structure is not necessary.

Metadata at the most basic level is simply defined as “data about data”. An item of metadata describes the specific characteristics about an individual data item. In the database realm, metadata is defined as, “data about data, through which the end-user data are integrated and managed.” (Rob & Coronel, 2009) Metadata in a database typically store the relationships that link up numerous pieces of data. “Metadata names these fields describes the size of the fields, and may put restrictions on what can go in the field (for example, numbers only).” (Sheldon, 2001).

“Therefore, metadata is information about how data is extracted, and how it may be transformed. It is also about indexing and creating pointers into data. Database design is all about defining metadata schemas.” (Sheldon, 2001) Metadata can be stored either internally, in the same file as the data, or externally, in a separate area. If the data is stored internally, the metadata is together with the data, making it more easily accessible to view or change. However, this method creates high redundancy. If metadata is stored externally, the searches can become more efficient. There is no redundancy but getting to this metadata may be a little more technical.

All the metadata is stored in a data dictionary or a system catalog. The data dictionary is most typically an external document that is created in a spreadsheet type of document that stores the conceptual design ideas for the database schema. The data dictionary also contains the general format that the data, and in effect the metadata, should be. Metadata is an essential aspect of database design, it allows for increased processing power, due to the fact that it can help create pointers and indexes.

Useful Resources:

217 questions
3
votes
2 answers

Java DatabaseMetaData.getSchemas() returns empty ResultSet, expected non-empty ResultSet

Trying to understand what is going on here. DatabaseMetaData is returning an empty result set, where as an SQL query that is effectively the same does not. Not a major issue as I am using the second code example as a work around. DatabaseMetaData…
Michael Hobbs
  • 1,663
  • 1
  • 15
  • 26
3
votes
2 answers

Get metadata function in oracle

In oracle, i can get metadata of stored procedure: DatabaseMetaData dbMetaData = conn.getMetaData(); ResultSet rs = dbMetaData.getProcedureColumns(conn.getCatalog(), null, …
hoang
  • 1,444
  • 11
  • 19
3
votes
1 answer

Query Volatile Tables in Teradata

How to query Teradata database to see which volatile tables are at moment in it? I have tried with SELECT * FROM dbc.tables WHERE DatabaseName = 'MyDB' It did not list any of the present volatile tables.
Adam
  • 2,347
  • 12
  • 55
  • 81
3
votes
1 answer

Getting foreign key and refering table name of particular database table from metadata DatabaseMetaData using JAVA class

I am writing java class to get all connection database objects(tables). I have used rs = meta.getExportedKeys(conn.getCatalog(), null, "account_adjustment"); while (rs.next()) { String fkTableName = rs.getString("FKTABLE_NAME"); …
SDA
  • 65
  • 6
3
votes
2 answers

JTable Header format

I want to change the header of my JTable that displays the data from SQL Server database because it also display the same column name on my database. I just need the Data itself, not the column name. here is the code that I used to display the…
Crystal Maiden
  • 372
  • 1
  • 7
  • 23
3
votes
2 answers

Retrieve mysql table comment using DatabaseMetaData

So I'm using Vaadin Java web framework for a project which requires the ability to edit the table. Vaadin provides a way to get Connection object from SimpleJDBCConnectionPool (Here's the API) From the Connection I can get DatabaseMetaData object.…
Monir
  • 840
  • 1
  • 10
  • 27
2
votes
1 answer

How to show user schema in a Parquet file using DuckDB?

I am trying to use DuckDB to show the user-created schema that I have written into a Parquet file. I can demonstrate in Python (using the code example at Get schema of parquet file in Python) that the schema is as I desire, but cannot seem to find…
rbmales
  • 143
  • 1
  • 8
2
votes
1 answer

The identifier that starts with '....' is too long. Maximum length is 128

I try retrive metadata from my MSSQL database, but I get this error: com.microsoft.sqlserver.jdbc.SQLServerException: The identifier that starts with…
Adam
  • 486
  • 1
  • 7
  • 19
2
votes
1 answer

How do I switch between column types in Cassandra?

I have a function in my project that deals with row results from query, and switches between the column types. The problem with doing this with Cassandra, is that I can't switch between the types, because this line won't work: type =…
elads11
  • 337
  • 1
  • 8
2
votes
1 answer

How retrieve CHAR and VARCHAR field definitions depending on Firebird database encoding

In Firebird (4.0), I get the field length with following query: SELECT T.RDB$RELATION_NAME, RF.RDB$FIELD_NAME, RF.RDB$NULL_FLAG, F.RDB$FIELD_TYPE, F.RDB$FIELD_LENGTH FROM RDB$RELATIONS T, RDB$RELATION_FIELDS RF, RDB$FIELDS F WHERE…
neggenbe
  • 1,697
  • 2
  • 24
  • 62
2
votes
3 answers

How can I get number of columns in Staged File Snowflake

I am staging a file in Snowflake and loading in table using Copy. Before loading I want to check number of columns in file to make sure it matches with table. How can I get column count for this staged file?
2
votes
1 answer

Snowflake ACCOUNT_USAGE Views - TABLES (ROW_COUNT, BYTES) are not updated within LATENCY period

I discovered while gathering metadata stom SNOWFLAKE - "ACCOUNT USAGE VIEWS" that the values in TABLES(ROW_COUNT, BYTES) are not being updated. I expect that there is some LATENCY period delay, but for most objects I have "0". I have to clearly…
2
votes
1 answer

metaData.getPrimaryKeys() returns four same records when the key is single

My question lies along the lines of this question, but a bit different. I am retrieving the primary key for a table using the following code in java: DatabaseMetaData meta = connection.getMetaData(); ResultSet rs = meta.getPrimaryKeys(null, null,…
2
votes
1 answer

Using JMETER GUI JDBC Request with Callable Statement – how do I getResultSet/MetaData?

I’ve got a call to my database working as a SQL select statement. But I am working to call a stored procedure using JMeter for further testing. I’m strictly working off of the JMX files and do not have JMETER integrated into our main Java project at…
2
votes
1 answer

C# - how to display metadata about sql tables that are retrieved from another table?

So, I have a database with 7 tables. One of these tables, lets call it tablesOfInterest, simply contains rows of other tables in the database. This table changes regularly. What I'm trying to do is: Retrieve the table names from…
Heeiman
  • 249
  • 1
  • 4
  • 15