DESIGN CONSTRAINTS - IBM Mainframe

Database systems are designed to represent the real world systems. The database systems require certain controls and limits for it to truly represent the real world system's behavior. These limits or controls are called constraints in the database parlance. There are many kinds of database constraints. We will now see some of the most frequently employed database constraints.

Structural Constraints

The structure of the information within the database gives an idea about entities in the database. For example simple data structures are represented using simple structures while complex data structures will need advanced structures. Structural constraints are specified to force the placement of information into structures that best matches the application.

Type Constraints

A type constraint limits the application to only one representation of information for an entity's attribute. For example, the database designer might want to limit the name attribute to a fixed length character string, the age attribute to a number, etc. Type constraints allow a limitation of the range of information representations that an attribute can have.

Range Constraints

Range constraints limit the values an attribute can take. It refers to the possible values that a particular data item can have. Range constraints can be used to limit the value of a particular attribute to be in a range. For example, we can specify that the employee numbers should be in the range 1000 - 9999. Similarly when we say that an attribute is a date, a host of range constraints come into effect. For example the number indicating the month should be an integer between 1 and 12 (both inclusive), the maximum number indicating the date should be either 30 or 31 depending on the month and for the month February it should be either 28 or 29 and so on.

Relationship Constraints

These constraints represent relationships on values between entities. For example there could be a relationship constraint between the entities MANAGER and EMPLOYEE that the maximum bonus of the manager should not be greater than 6 times that of the employee.

Temporal Constraints

These constraints indicate the time period for which some information is valid. For example the value of the attribute sales tax or excise duty is valid only for a specific period. Once the period is over, new values will come into effect.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics