How should Domain (Ubiquitous) Language affect Database Design

by tunmise fasipe   Last Updated May 16, 2015 21:02 PM

Note: I am new to DDD

Domain Driven Design recommends naming entities using common language or terms or definitions that is the same as specified in requirements. This will enhance communication between Domain experts and programming teams.

Does this extend to the database design? Should we name our tables and columns after the Domain Entities?

Most ORM name their classes after the Tables in database and not the other way round. Some expect the name of the class to be the same as the table except if you are allowed to use configuration/attribute to specify the concerned table.

Likewise developers would locate tables and column easily if they are named after the objects/classes they persist.

But the problem is using Bounded Context means that a table could be used to reference different Entities (names) depending on the context in which the entity is used. For example in some context, User might be used while in another context Account might be used.

How should we manage these differences when they exist?

Related Questions

What is a domain?

Updated October 23, 2017 18:05 PM