Book a Demo

Author Topic: Domain Model linkage to Data Model  (Read 5402 times)

tzman

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Domain Model linkage to Data Model
« on: April 30, 2007, 04:17:03 am »
Is there a standard way of linking an Entity in a Domain model to a Table defined in a Data model?

I would like to model how this mapping is done as a single entity may be an aggregate of several tables. It seems counter productive to reproduce the information in either model.


Thanks in advance for any insight.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Domain Model linkage to Data Model
« Reply #1 on: April 30, 2007, 04:43:25 am »
I take it your Entity is a DDD (Domain Driven Design) type Entity (rather than a logical data modelling Entity - as in Entity Relationship Attribute modelling).

Can you just clarify as it does affect the nature of the response?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

tzman

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Domain Model linkage to Data Model
« Reply #2 on: April 30, 2007, 05:51:29 am »
I appreciate the reply, I will see if I can make myself more clear.

To begin, I am not a UML or modeling expert. I have used basic concepts and models over the past few years mainly as a starting point. Recently I have been trying to expand this and educate myself on more standard approaches. That being said, I am not really sure I can answer the question accurately.

In general terms I start with a simple model of domain objects. These are usually nouns that define the things in the system. This somewhat follows the terminology for Entity Relationship modeling. This model is what we call a logical model and does not define any physical tables. From this diagram we create a physical diagram that represents the tables, columns, indexes .. to be created. We have not had any reference from one to the other in the past. You either look at one model or the other.

I am wanting to take a slightly different approach and model an implementation(?) domain(?). Specifically how Java persistence Entities map to tables and columns defined in a physical model. From the physical model I can generate DDL to create the database tables. From the domain model I can generate Java objects which are entity beans or hibernate daos.

Again, I appreciate any comments or suggestions. I have no knowledge of DDD, so I will do some research on the topic.