I am writing DDD bounded contexts with some entities using event sourcing for their persistence and other entities using SQL databases.
To simplify writing of the entities that use SQL persistence, given everything is controlled via the entity in the domain layer is it common practice to skip the notion of referential integrity against foreign keys? Can these integrity checks on foreign keys be excluded from the underlying databases entirely?
If so this would reduce complexity in any ORM, and reduce the stores to standalone tables with the entity domain layer handling the relational mapping between.
Are there any pitfalls against this approach? So far i cant see any when using entities to control everything.