Contents 1. What is Data Model 2. What is Domain Model 3. Relationship between Data Model and Domain Model 4. Which should be designed first, Data Model or Domain Model
Data Model Model for managing structured records of business activities, within the area of solving problems for the user interest データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
area of solving problems, not the problem itself Records are used for controlling solutions to problems not just persisting them . データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
to problems not just persisting them example: If you do not merely manage current stock but also future stock numbers, you can make order decisions based on the future.
user interest Out of the target of what is not in the user's interest. examples of out of target: - Whether surrogate keys are used or not - Whether NoSQL or RDB is used データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
Data Modeling compared to DB Design It depends on whether it affects the user or not . Scope of Data Model: - Conceptual model design: creation of the so-called ERD - Design of the conceptual schema of the logical design - Composition of primary keys definition of foreign keys, etc. データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
≠ Model of the scope of the business Domain model is a model of tools for solving domain problems example: Git as a tool, cannot be designed simply to copy the domain of source code control. データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
is a mental model commonly recognised by stakeholders Model as a common understanding, which is realized at each interest of stakeholder. example: - GraphQL schemas, DB schemas, domain layer objects - User, Engineer , etc データモデリングでドメインを駆動する ――分散∕疎結合な基幹系システムに向けて
layer does not own Domain Model Domain layer object copys the complex calculation processes of the domain model. Do not confuse the domain model involving all stakeholders with the domain layer objects of implementation interest .
go ahead with the design of Data Model 1. Understand existing domains and gather solutions 2. Extract main entities from the overall 3. Define Data Model ( as a part of Domain Model ) 4. Organize DB design and other parts of the Domain Model, etc.