What is a data dictionary?

What is a data dictionary

In the system we make, there is usually such a module-data dictionary. Today, we are going to learn what this module is for, why to use the data dictionary, and how to use the data dictionary.

So what is a data dictionary? It is a store of relevant information used by the database. In the early stage of database design, the descriptions of various data in the database are collected together for use in development, maintenance or other needs. It can be compared to a dictionary in our reality. .

Data dictionary usually includes: (l) data item; (2) data structure; (3) data flow; (4) data storage ; (5) processing five parts. Among them, a data item is the smallest unit of data, and several data items can form a data structure. The data dictionary describes the logical content of data flow and data storage through the definition of data items and data structures.

And in some of our systems, the data dictionary provided for the background of the system. A series of standards are provided for users on the same principle. (See below for specific usage.) It is used for the normalization of some specific data. Other users are not allowed to operate the data in the data dictionary except for maintaining these data through the special maintenance entry.

What does a data dictionary do

img

The data dictionary is a description of the data in the database. It is established in the requirement analysis stage and is the basis for the next conceptual design . It is constantly modified, enriched, and completed during the database design process. This is the primary role of the database in database design . When developers and maintenance personnel encounter unfamiliar items, they can get explanations for corresponding items through the data dictionary, such as data types, possible pre-defined values, and related textual descriptions. These interpretations can reduce incompatibilities between data.

Data dictionary in the developed program (system). Can help developers understand the type, value, and relationship of each data item to objects in the real world.

The data dictionary in the system that has been put into use is more used to standardize the user's data input. For example, when we use 12306 to book tickets online , the station name we input needs to be matched to the corresponding station through the user's input, and then selected to obtain accurate data items for input to avoid the generation of dirty data.

img

As shown in the picture, I entered Beijing in the input box, matched the data in the red box through the data dictionary, and selected one of the data to input, and then obtained an accurate input data. The user's input is standardized, and the adverse effect on the system caused by the user's input of wrong data is avoided.

If the function of the data dictionary is summarized, it is to make the various data in the system more strict. This helps to reduce the problem of system bugs caused by data problems.

————————————————

Copyright statement: This article is the original article of CSDN blogger " Li Yasong- "



Data dictionary refers to the definition and description of data items , data structure , data flow , data storage , processing logic, etc., and its purpose is to make a detailed description of each element in the data flow diagram. model project. In short, a data dictionary is a collection of information describing data and a collection of definitions for all data elements used in the system .

A data dictionary is a user-accessible directory that records database and application metadata . The active data dictionary refers to the data dictionary whose content can be automatically updated by the DBMS when the database or application structure is modified. Passive data dictionary refers to the data dictionary whose content must be updated manually when it is modified.

  • Chinese name

    Data Dictionary

  • Foreign name

    Data dictionary

  • related subjects

    Database Design

  • purpose of usage

    Explain each element in the data flow diagram

Table of contents

  1. 1 Introduction
  2. 2 role
  3. 3 categories
  4. 4 components
  5. 5 description

Introduction

A data dictionary is a collection of descriptions of data objects or items in a data model for the benefit of programmers and others who need to refer to them. The first step in analyzing a system of objects exchanged by users is to identify each object and its relationship to other objects. This process is called data modeling and results in an object-relational diagram. After each data object and item has been given a descriptive name, its relationship is described (or becomes part of a structure that potentially describes the relationship), and then the type of data (such as text or image , or a binary value), lists all possible predefined values, and provides a simple textual description. This collection is organized for reference in the form of a book , called a data dictionary.

When developing programs that use data models, a data dictionary can help you understand where a data item fits in the structure, what values ​​it might contain, and what the data item basically represents in the real world. For example, a bank or a banking organization might model data objects involved in customer banking . They need to provide data dictionaries to bank programmers. This data dictionary describes each data item in the customer banking data model (for example, "Account Holder" and "Available Credit"). [1]

effect

The most important role of the data dictionary is as a tool in the analysis phase. The most important use of any dictionary is for people to query and explain the unknown items. In structured analysis , the role of the data dictionary is to define and explain each component on the data flow diagram . In other words, the literal set of definitions and explanations for all components on the data flow diagram is the data dictionary, and a set of tightly consistent definitions established in the data dictionary is very helpful to improve the communication between analysts and users .

The database data dictionary is not only the center of every database, but also very important information for every user. Users can use SQL statements to access the database data dictionary.

Classification

The data dictionary is established during the requirements analysis phase.

A data dictionary is a reserved space in a database, which is used to store information about the database itself.

Data dictionaries may contain information such as:

Database design information

SQL program stored inside the data

User rights

User Statistics

Information in the process of the database

Database Growth Statistics

Database Performance Statistics

The data dictionary is a collection of various data descriptions in the system, and it is the main result of detailed data collection and data analysis .

A data dictionary usually includes data items \data structure[data flow](https://baike.baidu.com/item/data flow)[data storage](https://baike.baidu.com/item/data storage) and There are five parts to the process.

Among them, a data item is the smallest unit of data, and several data items can form a data structure. The data dictionary describes the logical content of data flow and data storage by defining data items and data structures.

A data dictionary is a collection of information about data, that is, a collection of definitions for all elements contained in a data flow graph .

Data dictionary has another meaning, which is a tool used in database design to describe the design of basic tables in the database, mainly including field names , data types , primary keys , foreign keys , etc. to describe the attributes of the table .

Take the Oracle database dictionary as an example: the data dictionary is divided into data dictionary tables and data dictionary views

The Oracle database dictionary is usually created when creating and installing the database. The Oracle data dictionary is the basis for the work of the Oracle database system . Without the support of the data dictionary, the Oracle database system cannot perform any work. Tables in the data dictionary cannot be accessed directly, but views in the data dictionary can be accessed.

The data in the data dictionary table is the system data stored in the Oracle system , while the common table stores the user's data. In order to distinguish these tables conveniently, the names of these tables end with "$", and these tables belong to the SYS user.

The data dictionary tables are created by the $ORACLE_HOME/rdbms/admin/sql.bsq script, which calls other scripts to create these data dictionary tables. In those create scripts there is create SQL for base tables .

Oracle's description of the data dictionary table:

These underlying tables store information about the database. Only Oracle Database should write to and read these tables. Users rarely access the base tables directly because they are normalized and most data is stored in a cryptic format.

These data dictionary tables, only Oracle can read and write.

These data dictionary tables under the SYS user are stored under the system table space, and the table names end with "$". In order to facilitate the user's query on the data dictionary tables, Oracle has established user views for these data dictionaries, which is easy Remember, the relationship between the data dictionary tables is also hidden. Oracle names the views as DBA_XXXX, ALL_XXXX and USER_XXXX for the scope of these objects.

There are two types of data dictionary views: static data dictionary (static performance view) and dynamic data dictionary ( dynamic performance view).

The views in the static data dictionary are divided into three categories, which are composed of three prefixes: user_ , all_ , dba_*.

user_*: This view stores information about objects owned by the current user. (i.e. all objects in that user mode)

all_*: This view stores information about objects that the current user can access, rather than objects owned by the current user. ( Compared to user_, all_ does not need to own the object, but only needs to have permission to access the object)

dba_*: This view stores information about all objects in the database. (The premise is that the current user has access to these databases, generally speaking, must have administrator rights)

These views are created by the SYS user, so you need to add SYS to use them. For convenience, Oracle creates public synonyms (public synonyms) with the same name for the view headers of each data dictionary table. This simple process saves the need to write sys .Trouble.

In addition to the three types of views in the static data dictionary, the other dictionary views are mainly V views, which are called V views because they are all V views.Views, so called because they all start with V or GV$. These views are constantly updated to provide information about memory and disk operations, so we can only have read-only access to them and cannot modify them.

Throughout its operation, Oracle Database maintains a set of virtual tables that record current database activity. These views are calleddynamic performance views because they are continuously updated while a database is open and in use. The views, also sometimes calledV$ views。

V view is based on X view is based on XViews are based on X virtual views. The V$ view is owned by the SYS user. By default, only the SYS user and users with DBA system authority can see all views. Users without DBA authority can see USER_ and ALL_ views, but not See DBA_VIEWS. These views visually present instance-oriented information, as opposed to database-oriented information in the DBA_, ALL, and USER_ views.

The dynamic performance table is used to record the current database activities, and it is only stored during the operation of the database, and the actual information is taken from the memory and control files . DBAs can use dynamic views to monitor and reconcile data.

composition

The composition of the data dictionary:

1. Data item

2. Data structure

3. Data flow

4. Data storage

5. Process

6. External entities

Data Dictionary

The data dictionary is an important part of the database. It stores relevant information used by the database and is a set of read-only tables for users. The contents of the data dictionary include:

1. Information about all schema objects in the database, such as tables, views, clusters, and indexes.

2. How much space is allocated, how much space is currently used, etc.

3. The default value of the column .

4. Constrain the integrity of information.

5. The user's name.

6. Permissions granted to users and roles .

7. Audit information on user access or use .

8. Other generated database information.

A database data dictionary is a set of table and view structures. They are stored in the SYSTEM tablespace.

The database data dictionary is not only the center of every database. And it is also very important information for each user. Users can use SQL statements to access the database data dictionary.

The collection of information about data is a directory that can be accessed by users to record database and application metadata , and it is a physical and logical description of the table information in the database.

describe

Description of Data Dictionary Parts

Data item : Description of the data item in the data structure of the data block in the data flow diagram

A data item is an indivisible unit of data . Descriptions of data items typically include the following:

Data item description = data item name, data item meaning description, alias, data type , length,

Value range , value meaning, logical relationship with other data items

Among them, "value range" and "logical relationship with other data items" define data integrity constraints and are the basis for designing data inspection functions.

Several data items can form a data structure.

②Data structure : Description of the data structure of the data block in the data flow diagram

The data structure reflects the combination relationship between data . A data structure can be composed of several data items, or several data structures, or a mixture of several data items and data structures. A description of a data structure usually includes the following:

Data structure description = {data structure name, meaning description, composition: {data item or data structure}}

③Data flow : Description of the streamline in the data flow diagram

A data flow is the path through which a data structure travels within a system. A description of a data flow typically includes the following:

Data flow description = data flow name, description, data flow source, data flow destination,

Composition: {data structure}, average traffic , peak traffic

Among them, "data flow source" indicates which process the data flow comes from, that is, the source of the data. "Destination of data flow" refers to which process the data flow will go to, that is, the destination of the data. "Average traffic" refers to the number of transmissions per unit time (daily, weekly, monthly, etc.). "Peak traffic" refers to data traffic during peak periods.

④Data storage : Description of the storage characteristics of the data blocks in the data flow diagram

Data storage is where data structures stay or are kept, and it is one of the sources and destinations of data flow. A description of a data store typically includes the following:

Data storage description = data storage name, description, serial number, incoming data flow, outgoing data flow,

Composition: {data structure}, data volume, access method

Among them, "data volume" refers to how much data is accessed each time, and how many times it is accessed per day (or per hour, per week, etc.). " Access method " includes whether it is batch processing or online processing ; whether it is retrieval or update; whether it is sequential retrieval or random retrieval , etc.

In addition, the "incoming data flow" should indicate its source, and the "outgoing data flow" should indicate its destination.

⑤Processing process : Description of function blocks in the data flow diagram

Only descriptive information describing the processing process is required in the data dictionary, usually including the following:

Process description = {process name, description, input data stream, output data stream},

Processing: {brief description}

Among them, "Brief Description" mainly explains the function and processing requirements of the processing process. Function refers to what the processing process is used for (not how to do it); processing requirements include processing frequency requirements, such as how many transactions are processed per unit time, how much data, response time requirements, etc. These processing requirements are the physical design behind input and performance evaluation criteria.

Guess you like

Origin blog.csdn.net/qq_41854911/article/details/131366604