Lecture
To determine the main objects of the database models, abstraction is used, i.e. selection of the basic properties of the set of objects of the domain.
An elementary example of abstraction is the generalization of characters into types, while a character is a specific value or an instance of an object, and a type is a class of similar objects.
For example: a surname is a type summarizing the signs: Ivanov, Petrov, Sidorov.
Abstraction can be layered. For example: if a table is an abstraction of concrete tables, then furniture is an abstraction containing a table, a chair, etc.
Two types of abstractions can be applied to objects:
Generalization allows us to relate a set of characters or a set of types with one common type.
The generalization of the sign -> type is called a classification . For example: Ivanov, Petrov -> surname.
A generalization of type -> type is called a proper generalization. The sign is the terminal vertex of the tree of generalization (leaf).
The process inverse to the process of classification is called instantiation .
The process is inverse to the process of generalization called specialization .
Those. generalization characterizes the similarity of objects abstracting from their differences.
Example of generalizations for the database of the automated control system of the institute:
The generic type has all the properties common to basic characters or types, while the types of the lower level inherit the properties of types of the upper level. For example, if the properties of the personality type are last name, first name, age, then it makes no sense to define these properties for the types of lower levels, since they are automatically inherited.
Aggregation is a type of abstraction whereby an object is constructed from other basic objects.
Aggregation can be used at the level of types and characters.
For example: a type employee can be aggregated (collected) of such types as: last name, first name, age, etc.
A concrete implementation of the type employee can be constructed from specific implementations of its constituent types.
The aggregated objects themselves can be simultaneously types. For example, salary - the type of characters from 0 to 100.
Aggregation allows you to reveal the structure of objects.
The reverse aggregation process is step by step detailing.
Generalization is used to classify objects, and aggregation to determine the structure of an object.
You can think of aggregation and generalization as orthogonal projection projections.
As a result of the first step of the conceptual design (CP), we determine the classification of objects, using the generalization method of abstraction, and the structure of objects using aggregation.
Comments
To leave a comment
Data models
Terms: Data models