数据模型和对象模型有什么区别? [英] What's the difference between data model and object model?

查看:245
本文介绍了数据模型和对象模型有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CWM是数据建模

UML是对象建模.

有人可以解释外行人可以理解的区别吗?

Can someone explain the difference that a layman can understand?

推荐答案

对象模型:处理系统的面向对象的蓝图".这包括类图(您将要创建的类),这些类之间的关系,类中的方法,属性等.

Object Model: deals with object oriented "blue-print" of your system. This includes, class diagrams (classes you will be creating), relationship between these classes, methods in the classes, properties etc.

数据模型:在数据库级别处理实体.就像OM中的类将如何存储在数据库中,在哪些表中存储等.因此DM处理表架构,不同表(PK,FK)之间的关系等.

Data model: deals with entities at the database level. Like how the classes in the OM will get stored in the database, in which tables etc. So DM deals with Table schema, relationship between different tables (PKs, FKs) etc.

DM没有通常在OM中列出的复杂的OO功能,例如多态性,继承,重载等.

DM does not have complex OO features like polymorphism, inheritance, overloading etc which are usually listed in an OM.

作为一个粗略的示例,可以将OM中的两个类存储(映射)到DM中的单个表,就像Employee和Manager人员都可以存储在单个DB表中一样.

As a rough example, two classes in the OM can get stored (mapped) to a single Table in the DM, like both Employee and Manager persons can be stored in a single DB table.

这篇关于数据模型和对象模型有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆