Constraints on Generalization

Data storage, retrieval, administration, and processing are all made possible by database management systems (DBMS), which are the foundation of the current computerized world. The DBMS employs several strategies to guarantee the consistency, integrity, and security of data. A DBMS's capacity to generalize data that is suitable for various applications is one of its most important features. To make sure that data is correct and current, DBMS generalization restrictions must be taken into account.

By eliminating pointless elements and simplifying the material, generalization is the process of summing up the information. Making data more manageable and practical for a variety of purposes requires this technique. An extensive record of each customer's past purchases, including the date, time, and things purchased, may be found in a sales database, as an illustration. However, this data may be generalized for marketing purposes by adding up all of the purchases made by each client over a certain period of time.

There are three constraints that may apply to generalization which are as follows −

  • Membership constraints

    • Condition-defined membership constraint

    • User-defined membership constraint

  • Disjoint constraints

    • Disjoint constraint

    • Overlapping constraint

  • Completeness constraints

    • Total completeness constraint

    • Partial completeness constraint

Membership Constraints

Condition-defined membership constraint

For an attribute value to be included in a certain set or group, a condition-defined membership constraint (CDMC) in a database management system (DBMS) specifies the number of requirements that must be satisfied. Other names for CDMC include set membership constraints and conditional membership restrictions.

  • Membership is determined by whether or not an entity fulfills an explicit condition or predicate in condition-defined lower-level entity sets.

  • For instance, any entities that fulfill the conditions job_type= "secretary" and job_type= "instructor" are included in the secretary and instructor, respectively, of the upper-level entity set employee if it includes an attribute called job_type.

  • This form of generalization is referred to as being attribute-defined since the same attribute (job_type) is used to assess all of the lower-level entities.

User-defined membership constraint

In Database Management Systems (DBMS), a type of constraint called user-defined member constraints (UDMC) enables users to specify their own membership criteria for a certain property. When conventional constraints, such as domain and referential integrity constraints, are insufficient to impose data consistency requirements, UDMCs might be helpful.

  • A membership condition does not take into account user-defined lower-level entity sets; rather, the database user allocates entities to a specific entity set.

  • For instance, if university workers are required to join one of four work teams after three months of employment, we represent the teams as four lower-level entity sets of the higher-level employee entity set.

  • An employee is not automatically allocated to a certain team entity based on a clear defining criterion.

  • The team assignment is made on an individual basis by the user who is in control of this choice.

Disjoint Constraints

Disjoint constraints

Disjoint-constraints are a type of constraint used in database management systems (DBMS) to prevent overlapping or conflicting connections between database elements.

Take a database for a university, for instance, which contains two tables: a "Student" table and a "Faculty" one. To make sure that a student cannot also be a faculty member or vice versa, a disjoint constraint may be used. so, a record in the "Student" database and a record in the "Faculty" table cannot have the same primary key value and so cannot represent the same individual.

It stipulates that the subclass of the specialization must be distinct and that an entity may belong to no more than one lower-level entity set.

Overlapping constraints

Overlapping- constraints in a database management system (DBMS) relate to circumstances when two or more constraints clash with one another and influence the same data item or collection of data items.

Assume, for instance, that a table contains details about workers, such as their age and years of experience. There might be two restrictions on the table −

  • An employee's age cannot be a negative value.

  • An employee's experience cannot be more than their age.

Since the second constraint depends on the result of the first constraint, they overlap in this situation. The second condition cannot be met if the employee's age is negative.

The database structure and the restrictions imposed on the data must be carefully designed in order to prevent overlapping constraints. This involves making certain that restrictions are applied uniformly to all pertinent data items and are not repeated or in conflict with one another. Constraints should generally be kept as straightforward as feasible, and if possible, complicated connections between constraints should be avoided.

Completeness constraints

Total Completeness constraint

  • A database management system (DBMS) requirement called a comprehensive completeness constraint makes sure that every conceivable value for an attribute is represented in a table.

  • Assume, for instance, that a table contains details about customers, such as names and preferred contact methods (such as email, phone, and postal). Every potential value for the "preferred method of contact" property (e.g., email, phone, and letter) would have to be represented in the database in order to satisfy the "total completeness" criteria.

  • A comprehensive completeness requirement makes sure that all potential values are taken into consideration in order to prevent mistakes or inconsistencies in the data. In circumstances when the data is being utilized for analysis or decision-making, this might be very crucial.

  • The database designer can declare the acceptable values for an attribute using a domain or enumeration data type, and then make sure that every conceivable value is represented in the table by using a check constraint or validation rule, to impose a total completeness requirement in a DBMS. For instance, the check constraint can state that the value of the variable "preferred method of contact" must fall inside the domain of "email, phone, mail".

Partial Completeness constraint

  • In a database management system (DBMS), a partial completeness constraint is a type of constraint that permits certain potential values for an attribute to be absent from a table while still guaranteeing that any value that is there is legitimate.

  • Assume, for instance, that a table contains details about workers, such as their department and job title. The "job title" property could be subject to a partial completeness constraint that permits some job titles to be absent from the table while still ensuring that any job titles that are present be legitimate (i.e., they must fall inside an organization's currently-existing job category).

  • A partial completeness constraint is used to allow for flexibility in the data while still guaranteeing the validity and accuracy of any data that is there. This can be helpful when the data is ill-defined or subject to change, as in a research study or project with changing requirements.

  • The database designer can declare the acceptable values for an attribute using a domain or enumeration data type and then apply a nullability constraint to let certain values be absent from the table in order to implement a partial completeness requirement in a DBMS. The "job title" element may not be necessary, according to the nullability requirement, but any value present must fall within the acceptable range of job titles.


In conclusion, constraints are essential for maintaining the precision, coherence, and integrity of data in a database management system. They set guidelines and limitations on the information kept in databases, limiting the introduction of false or contradictory information. They aid in preserving the integrity of the connections between various tables in a database by applying referential constraints. The efficiency and usability of a database can be adversely affected by too severe or poorly specified restrictions, hence it is crucial to properly design and apply constraints. Overall, constraints are a vital tool for maintaining the quality and dependability of data in a DBMS.

Updated on: 26-Apr-2023


Kickstart Your Career

Get certified by completing the course

Get Started