The "Apricot DB" domain concept

07/04/2019 (2) -> the multiple unique constraints were added:

07/04/2019 -> the current"Apricot DB" project database reverse engineered from the H2-repository (that's how "Apricot" looks inside!! :-)):



04/01/2019 -> after some delay the extended domain structure was designed.

The root of the domain structure is a PROJECT (apricot_project). Only one project might be opened in the same time. The PROJECTs might be created, closed, opened and deleted (completely destroyed) by the end- user.

The PROJECT might be associated with multiple SNAPSHOTS (apricot_snapshot on the diagram below). A SNAPSHOT is a historical view of the database structure. The snapshots might represent the database- design process in progress (different stages, milestones of the development). The reverse engineering with the existing database always has been performed into its own SNAPSHOT. The obsolete SNAPSHOTs might be removed from the project history.

There always is one "default" SNAPSHOT, which end user is being busy with at the moment. Any SNAPSHOT in the history (the snapshot list) might become the "default" one.

Each SNAPSHOT has its own set of associated tables (see apricot_table). The apricot_table and the entities below represent a generic metamodel (structure) of the target database.

Multiple VIEWs can be associated with the PROJECT. A VIEW is a logical representation of the fragment of the overall data model. One VIEW is general and contains all actual entities/relationships of the project. The VIEW is not related to any particular SNAPSHOT. The VIEW/OBJECT LAYOUT works like a "skin" and might be applied to any set of objects. In case of inconsistency (the VIEW contains objects which not found in the current "default" SNAPSHOT), these instructions in the VIEW will be ignored.

The VIEW contains a set of the associated OBJECT LAYOUTS. The LAYOUT information defines the way the object is shown on the VIEW- ER-diagram.

This is the minimal/initial concept model which allows to store the database metadata.