First talk about what is a data dictionary, this thing is not very likely to explain, give a chestnut bar ~
Each system will have a user table, Gender: male (1) female (0)
In addition, we do logistics will be related to the model: truck (1), Sedan (2), Trailer (3)
Cargo Type: Dangerous Goods (1), General cargo (2), Liquid goods (3)
These are the data dictionary, in peacetime table design, we will separate them as a table to store, and to the future maintenance, query when the association can, but this will have a certain disadvantage, in the dictionary Class A lot of time, there will be a lot of tables, and appear redundant, is not necessary
So today we're going to talk about how to optimize him and reduce the table, then we need a data dictionary.
Let's take a look at the table design:
The following are the DDL:
What is the function of the data dictionary, I summarize the following points
1, in the entire system of all data types play a role in the bridge, the development process, dynamic maintenance system data type
2, to ensure that data entry more secure, business tables using data dictionary, the data type of storage is a key, rather than the specific value, and ultimately saved in the form of cache, in front of the query can be more excellent
3, convenient in the background statistics and view, and maintenance
The following points should be noted when designing a table:
1, data type, data key value pair, all values cannot be empty
2, the data type is consistent, the data keys and values can not be duplicated, must be unique, this additional time needs to be verified
3, data keys to use int easier to sort, of course, you can also use string, this random
Finally take a look at the data content bar, the table for the corresponding additions and deletions, you can achieve the classification of data dictionary management
Bejavagod-How to use data dictionary to classify and unify operations correctly (i)