1/29/2024 0 Comments Nosql databaseIn a relational database, querying multiple child collection properties is not easily optimized, because you get a UNION ALL SQL statement back from EF. Changing persistence models is not a trivial task, because transactions and persistence operations will be very different.įor example, in a document-oriented database, it is okay for an aggregate root to have multiple child collection properties. There are always constraints and trade-offs in the different database technologies, so you will not be able to have the same model for relational or NoSQL databases. If you implemented your domain model based on POCO entity classes, agnostic to the infrastructure persistence, it might look like you could move to a different persistence infrastructure, even from relational to NoSQL. The difference is in how you persist that model. When using a NoSQL database, you still are using entity classes and aggregate root classes, but with more flexibility than when using EF Core because the persistence is not relational. However, the use of the database is transparent from a domain model code point of view. When you use a document-oriented database, you implement an aggregate as a single document, serialized in JSON or another format. But, ultimately, the database selection will impact in your design. However, when you use a NoSQL database, especially a document-oriented database like Azure Cosmos DB, CouchDB, or RavenDB, the way you design your model with DDD aggregates is partially similar to how you can do it in EF Core, in regards to the identification of aggregate roots, child entity classes, and value object classes. Instead you use the API provided by the NoSQL engine, such as Azure Cosmos DB, MongoDB, Cassandra, RavenDB, CouchDB, or Azure Storage Tables. When you use NoSQL databases for your infrastructure data tier, you typically do not use an ORM like Entity Framework Core.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |