Unfortunately this is a very general question...
Imagine an authoring application to create e.g. electric schematics. Engineers draw schematics until they are satisfied with their product and it's ready for production.
At this point a "Revision" would be initiated (say Revision "#1") . From now on all data/documents of this revision can't be changed anymore. It's read-only.
As time goes by, the engineers have smart ideas and start to update the existing schematics based on Revision #1. They add new features, remove features, replace some components with newer versions etc. until they have a Revision #2.
A common requirement this then: What has changed between Rev.1 and 2? Some delta reports are needed.
What would/could that mean with RavenDB?
If the engineers start a new revision, would that mean to copy all documents and insert them with a new Id like "/proj-1/rev-2/component-1000"? How would I update my relations between documents then? Adjust all relations "manually"?
Snapshot the DB? Can I compare a snapshot DB with the current DB?
- How would I find all the delta between those revisions?
- If I do not copy all documents or snapshot them, would I need to book-keep all changes in separate documents (event-log style) i.e. DocX has been deleted, DocY has been updated with Value1, DocZ has been added etc?
- I know that RavenDb has its own revision system. It's based on single changes of a document. Could this be used for advantage here?
Any hints how to model such a system would be highly appreciated.