A flexible scorecard system need not give every metric its own database column. Treat metrics such as Same Store Sales and Inventory Turnover as attributes with definitions and values, so new fields can be added without changing the schema. section 8.6.2
Dynamic rows are a tradeoff, not a universal fix: they can weaken type safety and slow queries that filter or aggregate attributes across many records. Use this pattern for dynamic configuration or variable metadata, not stable core entities such as Users or Orders. section 8.6.2
Listing 8.8 Dynamic Rows
-- 1. The Core Application (Universal)
CREATE TABLE LoanApplication (
id INT PRIMARY KEY,
business_name VARCHAR(255),
scorecard_type_id INT -- Links to 'Retail', 'Mfg', etc.
);
-- 2. The Definitions (Metadata)
CREATE TABLE ScorecardAttributes ( #A
id INT PRIMARY KEY,
scorecard_type_id INT, -- e.g., 'Manufacturing'
attribute_name VARCHAR(100), -- e.g., 'InventoryTurnover'
weight DECIMAL -- How much is this worth?
);
-- 3. The Values (The actual data)
CREATE TABLE ApplicationValues (
application_id INT,
attribute_id INT,
value DECIMAL
);The schema separates applications, attribute definitions, and attribute values—the pieces that let scorecards vary without hardcoded columns. section 8.6.2

























