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
1
vote
1 answer

How to get list of DataTables metadata used in SSAS DSV?

I was wondering if there's a simple way to extract a list of all the tables description from the Data Source View at SSAS? I've been so far been playing around with this simple DMV-query to get the cube metadata: SELECT * FROM…
Chris A.
  • 11
  • 2
1
vote
1 answer

How to get column dependencies in views in Redshift or Postgres?

I've defined some views, built on other views/tables in Redshift, and would like to get info from the system tables regarding the dependencies at the column level. Say, for example, I have these definitions: CREATE TABLE t1 AS (SELECT 2 as a, 4 as…
user3856970
  • 319
  • 1
  • 3
  • 11
1
vote
1 answer

Postgres generate sql output using data dictionary tables

All I need is to get a SQL query output as : ALTER TABLE TABLE_NAME ADD CONSTRAINT FOREIGN KEY (COLUMN_NAME) REFERENCES (PARENT_TABLE_NAME); I'm running the below DYNAMIC query USING DATA DICTIONARY TABLES, SELECT DISTINCT 'ALTER TABLE ' ||…
1
vote
1 answer

Confusing behaviour - SQL Server Information Schema and columns created by using the wizard

EDIT: I tried this code, part of what a user mentioned, and it returns the fields correctly. SELECT * FROM INFORMATION_SCHEMA.TABLES JOIN INFORMATION_SCHEMA.COLUMNS on INFORMATION_SCHEMA.TABLES.TABLE_NAME = …
1
vote
1 answer

Need a programatic way to get the names, arguments and return types for SQL Server built-in functions

For postgres it is possible to obtain metadata for built-in functions via SQL queries like SELECT proname as name, pg_catalog.pg_get_function_arguments(pg_proc.oid) as input, format_type(pg_proc.prorettype, null) as returntype, …
1
vote
2 answers

Change file metadata using Apache Beam on a cloud database?

Can you change the file metadata on a cloud database using Apache Beam? From what I understand, Beam is used to set up dataflow pipelines for Google Dataflow. But is it possible to use Beam to change the metadata if you have the necessary changes in…
1
vote
1 answer

Query to get dependant view definition and details for given table column

select 'CREATE VIEW ' || views || E' AS \n' || pg_get_viewdef(views, true) as view_definition from ( select distinct(r.ev_class::regclass) as "views", pg_class.relname as table_name, pg_attribute.attname as…
1
vote
2 answers

Find database name from select query

I've googled pretty hard on this topic but didn't manage to find anything relevant. MySQL question: is it possible to display the database that holds the table row in a select query? For example, I have 3 databases each with the same structure. I…
Mookanana
  • 13
  • 3
1
vote
1 answer

Can I change the Fetch Mode in a Resultset from a DatabaseMetaData query?

I'm inspecting a Database using an DatabaseMetaData instance. I get all the information of the tables in the DB and I iterate all the Resultset without anyproblem. At the end of the iteration, I want to return to the begin of the ResultSet, so I…
jomaora
  • 1,656
  • 3
  • 17
  • 26
1
vote
0 answers

sqlite JDBC metadata.getPrimaryKeys return info of foreign keys

sqlite JDBC metadata.getPrimaryKeys return info of foreign keys. e.g., create table Foo (id integer, bar_id integer, primary key(id), foreign key (bar_id) references Bar(id)) JDBC: DatabaseMetaData databaseMetaData =…
eastwater
  • 4,624
  • 9
  • 49
  • 118
1
vote
1 answer

NUM_ROWS in DBA_TABLES not reflected upon metadata sharing

In Oracle 12c, I have a table created with sharing = metadata. Following are the sql statements: create table fedcommusr.md_commtab1 sharing=metadata (deptno number, dname varchar2(100)); insert into fedcommusr.md_commtab1 values (1, 'One'); insert…
Vishnu
  • 479
  • 1
  • 3
  • 14
1
vote
1 answer

Find out how is table partitioned

Is there any way to find out, whether is table partitioned by Hash, Range or List in Oracle? I could not find such info in metadata tables. Thanks for help.
kristofyk
  • 41
  • 1
  • 1
  • 4
1
vote
1 answer

DatabaseMetada.getImportedKey is empty even if foreign are existing

For my project i try to get all foreign key in my table using DatabaseMetada Object form jdbc but when i execute the following code the result set is always empty even if my table contain foreign key ? ResultSet v_resultPrimaryKey =…
kazor02x
  • 43
  • 2
  • 8
1
vote
0 answers

How to filter GLOBAL TEMPORARY tables using Connection.getMetaData().getTables

I create a global temporary table in Oracle 11g using the following SQL statement. SQL> CREATE GLOBAL TEMPORARY TABLE TEST (id int primary key); Now How can I filter out this table using Connection.getMetaData().getTables .Here I get the…
Muhammad Iqbal
  • 144
  • 1
  • 1
  • 12
1
vote
3 answers

Retrieve Oracle Metadata with Internal Data

I am trying to write a PL/SL Procedure which uses both meta data and internal data of a table.It is like: table1 (ABC varchar2(50),wsx varchar2(50)); table2 (ABC number(50),dv varchar2(50)); table3 (ABC varchar2(10),wsds varchar2(50)); table4 (ABC…
Beginner
  • 89
  • 7