As part of an migration from .NET Framework to .NET Core we're looking to decouple elements of our monolith into more manageable modules. Ideally following a clean architecture/DDD/microservice approach dependant on each module.
Two major elements of our system include a CMS and an Ecommerce Product Catalogue.
Currently the DB schema tightly couples
Category to a CMS
PageNode entity; in that a
PageNode will have a nullable foreign key column for a
CategoryId or a
ProductId alongside being used for standard "content" pages. This allows the CMS to display the respective category or product page at the appropriate location in the content tree.
These concerns don't seem to belong to the
PageNode itself and indeed what happens when we introduce a new module? For example a Blog. We would have to introduce foreign keys for blog post and categories?
How should we model this relationship without tightly coupling the CMS to these external modules?