Shop Project - Documentation
Database & Architecture
The architecture of our marketplace stands and falls with data integrity. This section documents the core of the project: The relational data model that governs the complex links between the marketplace, catalog trading, item conditions, and user interactions.
The Philosophy Behind Our Data Model
Before the first line of code was written, a visual diagram (LDM) was created. This served as a mental map to visualize which entities were required and how the core components would interact. This was crucial to cleanly separate the interplay between the universal marketplace and the highly specific collector catalog from day one.
Living System: Since launch, the system has evolved massively – today, the model is roughly three times the size of the initial draft. As requirements in code constantly change, the structure is adapted in agile steps. The documentation is maintained synchronously to prevent technical debt.
Current Database Scope
The database currently contains 58 tables, split into clear domain modules with shared integration via foreign keys.
- Labels: label/tag definitions and mappings.
- User: users, roles, profiles, and authentication data.
- Products: product master data, variants, categorization, and offer linkage.
- Purchase: orders, line items, and payment-adjacent data.
- Shipping: shipment options, addresses, and delivery logic.
- Tracking: shipping status and history data.
Structured Subchapters of the Data Pillar
- Data Model – Core table relationships
- LDM Visual – The interactive graphical map
- LDM Text Version – Technical table definitions
- Setup-DB – Scripts for initial database generation
- Export – Data export functions
- Backup – Database and file system backup
- Seed Data – Automated generation of test records
- Caching Layer – Optimization of database access
- File System – Structured storage of product media
- Integrity & Cleanup – Garbage collection & orphaned records