We have spent enough time discussing how to ensure domain model consistency with explicitly defined business rules. In this chapter, we will go further with persisting our aggregates to the database. Since our model is not being designed around any database, we might encounter issues when trying to get a complex object graph to be stored by using a database engine. That's because the database does not work with objects. Instead, relational databases are optimized to store data in tables that might have relations that use primary and foreign keys. Document databases store objects in machine-readable formats, like JSON, and are, by definition, able to persist complex object graphs as-is; however, we shouldn't fool ourselves, since there are still serious constraints about how these objects need to be organized so that the database client library can...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine