A data dictionary contains metadata i.e data about the database. The data dictionary is very important as it contains information such as what is in the database, who is allowed to access it, where is the database physically stored etc. The users of the database normally don’t interact with the data dictionary, it is only handled by the database administrators.
The data dictionary in general contains information about the following:
- Names of all the database tables and their schemas.
- Details about all the tables in the database, such as their owners, their security constraints, when they were created etc.
- Physical information about the tables such as where they are stored and how.
- Table constraints such as primary key attributes, foreign key information etc.
- Information about the database views that are visible.
This is a data dictionary describing a table that contains employee details.
|Field Name||Data Type||Field Size for display||Description||Example|
|Integer||10||Unique ID of each employee||1645000001|
|Name||Text||20||Name of the employee||David Heston|
|Date of Birth||Date/Time||10||DOB of Employee||08/03/1995|
|Phone Number||Integer||10||Phone number of employee||6583648648|
The different types of data dictionary are:
Active Data Dictionary
If the structure of the database or its specifications change at any point of time, it should be reflected in the data dictionary. This is the responsibility of the database management system in which the data dictionary resides.
So, the data dictionary is automatically updated by the database management system when any changes are made in the database. This is known as an active data dictionary as it is self-updating.
Passive Data Dictionary
This is not as useful or easy to handle as an active data dictionary. A passive data dictionary is maintained separately to the database whose contents are stored in the dictionary. That means that if the database is modified the database dictionary is not automatically updated as in the case of Active Data Dictionary.
So, the passive data dictionary has to be manually updated to match the database. This needs careful handling or else the database and data dictionary are out of sync.
Decision tables are a method of describing the complex logical relationship in a precise manner which is easily understandable.
- It is useful in situations where the resulting actions depend on the occurrence of one or several combinations of independent conditions.
- It is a matrix containing row or columns for defining a problem and the actions.
Components of a Decision Table
- Condition Stub: It is in the upper left quadrant which lists all the condition to be checked.
- Action Stub: It is in the lower left quadrant which outlines all the action to be carried out to meet such condition.
- Condition Entry: It is in upper right quadrant which provides answers to questions asked in condition stub quadrant.
- Action Entry: It is in lower right quadrant which indicates the appropriate action resulting from the answers to the conditions in the condition entry quadrant.
The entries in decision table are given by Decision Rules which define the relationships between combinations of conditions and courses of action. In rules section,
- Y shows the existence of a condition.
- N represents the condition, which is not satisfied.
- A blank – against action states it is to be ignored.
- X (or a check mark will do) against action states it is to be carried out.
For example, refer the following table:
|CONDITIONS||Rule 1||Rule 2||Rule 3||Rule 4|
|Advance payment made||Y||N||N||N|
|Purchase amount = Rs 10,000/-||–||Y||Y||N|
|Give 5% discount||X||X||–||–|
|Give no discount||–||–||X||X|