1.面向对象的数据建模(OODM):
在OODM中,数据和/或其关系都被组织或包含在称为对象的单个结构中。对象包括有关对象内事实之间关系的信息,以及有关其与其他对象之间关系的信息。也被称为语义数据模型。
一个对象是现实世界实体的抽象,而一个对象仅代表一个实体的出现。
OODM的特征:
- 它支持复杂对象的表示。
- 它支持封装。
- 它表现出继承性。
- 它支持对象身份的概念。
例子 :
形状,圆形,矩形和三角形。 Circle具有属性Center和Radius。三角形具有“基本”和“高度”等属性。
2.概念数据模型(CDM):
它标识了不同实体之间的最高级别的关系。此模型是数据模型的最抽象形式。由于其简单性,它有助于将思想传达给广泛的利益相关者。
CDM的功能:
- 它包括重要实体及其之间的关系。
- 没有指定属性。
- 没有指定主键。
例子 :
实体关系模型,它使用诸如实体,属性和关系之类的主要概念。
OODM和CDM之间的区别:
OODM | CDM |
---|---|
Stands for Object-Oriented Data Modeling. | Stands for Conceptual Data Modeling. |
It has object and object includes behavior. | It has no object. |
Both the data and or their relationship is organized or contained in a single structure known as object. | It identifies the highest-level relationship between the different entities. |
It is an instance of an object. | It has entity. |
Inheritance includes both state and behavior. | It does not include state and behavior. |
It has a concept of Message. | No corresponding concept in CDM. |
Encapsulation is present in OODM. | No such concept is present in CDM. |
It has attributes like triangle has the attributes Base and Height is the example of OODM. | Entity relationship model, which uses main concepts like entities, attributes and relationships are the examples of CDM. |