0
9.5kviews
Explain the concept of metadata and constraints on object.

Subject: Object Oriented Modeling and Design

Difficulty: Medium

Marks: 8 Marks

1 Answer
1
797views

Metadata: It is a data that describes other data. For example a class definition is a metadata. UML models are also referred as metadata as they describe the things required for the application. Many real world applications have metadata such as parts, catalogues, blue-prints and dictionaries.

enter image description here

In above example, car model has a model name, year, base price. A physical car has a serial no, color, options. A car model describes many physical car and stores common data about them. A car model is referred as metadata which relates to the data of physical care. A class descriptor object contains feature and they can have their own classes which are known as meta classes.

Constraints: Constraint is a Boolean condition involving model elements such as objects, classes, attributes, links and associations. A constraint restricts the values that entities/elements can assume.

Notation: Constraint is shown as text written inside curly bracket. {Constraint}

Example: -

Constraints on Objects: In the above example a constraint is specified as salary<=boss.salary inside curly brackets. It restricts the value of attribute salary of employees with respect salary of boss.

enter image description here

Constraints on Links:

enter image description here

Please log in to add an answer.