Consider the following situation. We have a directory - called batch - that contains files. In that batch an amount of files is considered to belong together when a file that has certain properties is followed by other images that do not have this property. This amount of files is called a document. In the course of processing that batch it can happen, that some documents are moved into a new directory (batch) that is an child object of the origin batch. It can also happen that some images of an document are considered to be part of a new respecitve different document. I need a data model (ms sql database) which considered the relations between the objects batch, document and image.