What's the difference between data model and object model?

user198729 picture user198729 · Mar 15, 2010 · Viewed 35.8k times · Source

CWM is data modeling

UML is object modeling.

Can someone explain the difference that a layman can understand?

Answer

Vivek picture Vivek · Mar 15, 2010

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.

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 does not have complex OO features like polymorphism, inheritance, overloading etc which are usually listed in an OM.

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.