Data model overview
This section documents the persisted data structure of Balyze.
It focuses on relational structure and database-level concerns, independently from business rules described in the domain section.
Design principles
The data model follows these principles:
- clear ownership boundaries (all entities belong to a user)
- explicit foreign key constraints
- soft deletes for historical consistency
- minimal redundancy
- relational integrity over convenience
Core entities
The primary persisted entities are:
UserPositionApplicationDocument
High-level relationships
- A User owns many Positions.
- A User owns many Applications.
- An Application references exactly one Position.
- A Document belongs to a User.
- A Document may be linked to multiple Applications.
- Applications and Documents are linked through a pivot table.
Ownership is always enforced at the User level.
Scope
This section documents:
- table structures
- key fields
- relationships
- constraints and indexes
It does not describe business behavior.