Sunday 27 August 2017

Data dictionary in sql Server

Data dictionary is a set of database tables used to store information about a database’s definition.  The dictionary contains information about database objects such as tables, indexes, columns, data types, and views. The data dictionary is used by SQL server to execute queries and is automatically updated whenever objects are added, removed, or changed within the database.
SQL Server uses the database dictionary to verify SQL statements.  When you execute a SQL statement the DBMS (Database Management System) parses the statement and then determines whether the tables and fields you are referencing are valid.  To do this quickly it references the data dictionary.In addition to testing the validity of statements, SQL Server uses the data dictionary to assist with query plan generation, and to reference information defining the structure of the database.

INFORMATION_SCHEMA Views

Here are some of the more commonly used views and their descriptions:
COLUMNS – Return one row for each column the current user has access to use in the current database. This view can be used to determine the data type and table the column is defined for use.
TABLES – Return one row for each table the users has access to use within the current database. Note, both tables and views are returned using the TABLES view.
VIEW_TABLE_USAGE – Return one row for each table that is used in a view within the current database.
VIEWS – Return one row for views that can be accessed using the currents user’s permissions from the current database.

No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts