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

Has entities in Datomic metadata like creation and update time?

I want to know e.g. when an entity was created or updated. Should I create an attribute like :created-at and :update-at or Datomic has theses attributes by default? Or any manner to find out when an entity was created or updated?
Felipe
  • 16,649
  • 11
  • 68
  • 92
6
votes
2 answers

Table-valued function refresh

I have a table-valued function (TVF) in SQL Server that looks like this: CREATE FUNCTION TVF_xyz(@AuditKey INT) RETURNS TABLE AS RETURN SELECT * FROM xyz WHERE AUDIT_KEY = @AuditKey GO Now, I added a new column to the…
Ash
  • 1,180
  • 3
  • 22
  • 36
6
votes
1 answer

How to disable issueing queries against EdmMetadata table?

I'm using EF Code First in my new project. I'm not going to use Auto Migration feature and have not [__MigrationHistory] table in db. But with looking at Profiler, I can always see EF issues a query like this before any other query: SELECT…
Mori
  • 2,484
  • 5
  • 28
  • 45
5
votes
2 answers

JDBC with Spring slow metadata fetch Oracle

I am using the Spring JdbcUtils.extractDatabaseMetaData() method to analyze the database. The function calls a callback and hands over a DatabaseMetaData object. This object provides the getColumns(String catalog, String schemaPattern, String…
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
5
votes
2 answers

name is already used by an existing object

In this code I am trying to delete the tables if they already exist every time I run the program, but the control is not going inside the if statements. table1 and table2 are present in the database. I have checked that in my database. Since its not…
Ava
  • 5,783
  • 27
  • 58
  • 86
5
votes
1 answer

How to get list of database table primary key columns in EF Core

ASP.NET Core MVC application using EF Core. In Linq to SQL, this code returns list of database table primary key columns names: /// /// Database primary key names /// public IList DatabasePrimaryKey(Type…
Andrus
  • 26,339
  • 60
  • 204
  • 378
5
votes
4 answers

How to retrieve sequences metadata from JDBC?

I am trying to retrieve different kind of metadata of my Oracle DB from Java code (using basic JDBC). For example, if I want to retrieve the list of tables with _FOO suffix, I can do something like: Connection connection =…
Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273
5
votes
4 answers

How to get comments for table & column from oracle DB from its metadata?

I am working on a Java Application. I have connected to an Oracle DB using JDBC Connection and fetched it metadata. I am fetch information like tables, columns, views, etc from its metadata. Now I want to fetch Comments for tables and columns…
Mehaboob Khan
  • 343
  • 1
  • 5
  • 18
5
votes
1 answer

Method to get only procedures from an oracle database using Java

I need to get only the procedures using java DatabaseMetaData but this method returns also the functions' names. DatabaseMetaData dbmd=con.getMetaData(); ResultSet result = dbmd.getProcedures(null, Ousername, null);
gtzinos
  • 1,205
  • 15
  • 27
5
votes
5 answers

JDBC automatical query turned to be very slow

I am maintaining an application creating an Oracle DB via JDBC. Starting from today this query: SELECT NULL AS pktable_cat , p.owner AS…
5
votes
3 answers

How do you check if a table exists with NHibernate(or Fluent)?

Whats the best, most consistent way to check if a table exists in NHibernate (or with Fluent-NHibernate)? Is it even possible? I mean it seems like a simple task for such a heavy-duty ORM. Also on a related question, can you check if a set of tables…
Mark Rogers
  • 96,497
  • 18
  • 85
  • 138
5
votes
2 answers

Copy a mysql table content from one server to another server

How to copy a table from server A database db1 to server B database db2 ? I am able to copy a table from one database to another database within the server, but not able to do for across servers. CREATE TABLE recipes_new LIKE production.recipes;…
Ranjith
  • 61
  • 1
  • 1
  • 4
4
votes
0 answers

How do I clear an Aurora MySQL 5.6 Table Metadata Lock Wait when there are no locking transactions?

I'm currently experiencing a very strange issue in our development environment with our Aurora MySQL 5.6 DB running in RDS while trying to rename a table to perform a table swap. My SQL statement is rename table oems.orderInformation to…
4
votes
1 answer

NULL values for referential_constraints.unique_constraint_* columns in information schema

In Postgres 10 I have declared the following: create table test_abc ( pk integer not null, id integer not NULL, id2 integer not null, PRIMARY KEY (pk) ); CREATE UNIQUE INDEX test_abc_ids ON test_abc(id,id2); And then a second table…
blackgreen
  • 34,072
  • 23
  • 111
  • 129
4
votes
3 answers

How to get the list of column names for all indexes on a table in PostgreSQL?

I have this query to get the list of indexes on a table: SELECT ns.nspname as schema_name, tab.relname as table_name, cls.relname as index_name, am.amname as index_type, idx.indisprimary as is_primary, idx.indisunique as…
Jonathan Allen
  • 68,373
  • 70
  • 259
  • 447
1
2
3
14 15