1. 面向对象的数据建模(OODM):
在 OODM 中,数据和/或它们的关系都组织或包含在称为对象的单个结构中。对象包括对象内部事实之间关系的信息,以及它与其他对象的关系信息。它也被称为语义数据模型。
一个对象是现实世界实体的抽象,一个对象只代表一个实体。
OODM的特点:
- 它支持复杂对象的表示。
- 它支持封装。
- 它表现出继承性。
- 它支持对象身份的概念。
例子 :
形状、圆形、矩形和三角形。 Circle 具有属性 Center 和 Radius。三角形具有 Base 和 Height 等属性。
2. 概念数据模型(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. |