You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- How does this design differ from simply switching to using MongoDB, given that Mongo updates are atomic within a single document/aggregate?DavidT– DavidT2025-01-27 03:52:12 +00:00Commented Jan 27 at 3:52
- It looks to me like you are trying to solve two different problems with a single solution. Designing your DB schema should not really be dictated or constrained by your application code classes. Design your DB schema based on your data and its access patterns and then model those in your application. I have worked with SpringBoot and I know it is possible. Unless you want to use some aspect of the framework which I am unaware of, I think you would be trying to retrofit your preconceived notions about classes on to your DB schema which might be bad for your application. Happy to be corrected.brahmana– brahmana2025-01-27 05:56:49 +00:00Commented Jan 27 at 5:56
- @DavidT I wanted to use postgresql because it can be used as Document DB and I could still use it as normal sql database. For example I was thinking of saving the Read Side data of the cqrs app in sql rows.securita– securita2025-01-27 11:03:20 +00:00Commented Jan 27 at 11:03
- @brahmana the reason I wanted to persist the data this way is because of the concept of aggregates. I would always load the entire aggregate (domain object), perform a command on it and then persist it. I thought it would be more efficient and easy to store aggregates this way.securita– securita2025-01-27 11:07:32 +00:00Commented Jan 27 at 11:07
- You mention CQRS. Are you planning to actually store the state of the writes separately from the state of the queries? I did that in a previous project and ran into trouble when those two states went out of sync. That will happen sooner or later. I will only implement CQRS with ES, so that it’s easier to rebuild the read models.Rik D– Rik D2025-01-27 22:04:09 +00:00Commented Jan 27 at 22:04
| Show 2 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you