Forward and reverse engineering, domain model composition, naming enforcement, semantic drift detection, version reconciliation, conflict resolution workflows, and graph-based lineage tracking for ShaDey Inc.'s unified data model governance framework.
Ungoverned data models fragment across the enterprise. Schema drift, naming collisions, orphaned tables, and undocumented attributes create governance debt. ShaDey Inc. discovered that three independent teams had each modeled "customer" differently in SAP, Snowflake, and Neo4j, with conflicting definitions of what a customer is.
Model governance transforms data architecture from a collection of siloed designs into a disciplined, documented system. The ShaDey Inc. scenario shows what happens without it:
| System | Table Name | Definition | Cost of Drift |
|---|---|---|---|
| SAP | KNA1 |
Sales customer with opportunity pipeline | Finance doesn't trust it for AR aging |
| Snowflake | DIM_CUSTOMER |
EDW customer with 42 documented columns | 5 undocumented columns silently added by analytics team |
| Neo4j | Customer node |
Graph customer with relationship weights | No documentation; schema inferred, not enforced |
ShaDey Inc. moved from Ad-hoc to Documented in 2024, with Enforced processes rolling out in 2025. This section covers the mechanisms that make Enforced governance possible.
Forward engineering is top-down: Logical model → Physical DDL generation. The advantage: consistency, traceability, and governance-by-design. Every table, column, and constraint is traceable back to a documented requirement.
ShaDey Inc. workflow follows the three-layer model:
| Layer | Owner | Scope | Example (Customer) |
|---|---|---|---|
| CDM (Conceptual) | Business Analyst | Business entities, relationships, rules | Entity: "Customer" with attributes like name, address, credit_limit |
| LDM (Logical) | Data Architect | Data types, normalization, keys | CUSTOMER table: customer_id (PK), customer_name (VARCHAR2), credit_limit (DECIMAL) |
| PDM (Physical) | DBA | Indexes, tablespaces, partitioning, compression | CREATE TABLE pdm_dim_sales_customer with compression, partition by customer_id |
Example: DIM_CUSTOMER design from conceptual through physical:
Generated PDM DDL (from logical model, following ShaDey naming standard):
Reverse engineering is bottom-up: Existing database → Documented model. It's essential for legacy system discovery, M&A integration, and migration planning. The challenge: reverse engineering captures structure but loses business semantics.
ShaDey Inc. reverse-engineered SAP ECC's 95+ core tables into a documented model. Example: SAP's customer module:
| SAP Table | Rows | Key Columns | Mapped to LDM |
|---|---|---|---|
KNA1 |
1.2M | KUNNR, NAME1, SPART | CUSTOMER entity |
KNB1 |
2.8M | KUNNR, BUKRS, AKONT | CUSTOMER_FINANCIAL extension |
KNAD |
5.1M | KUNNR, ADRNR, CITY | CUSTOMER_ADDRESS |
J_1IADDRS |
3.7M | MANDT, KUNNR, TAXJURCODE | CUSTOMER_TAX_LOCATION |
SQL query to extract metadata from INFORMATION_SCHEMA:
KNNR is a foreign key to KNA1, but the query doesn't explain why the relationship exists or what business rule it represents. Mitigation: Combine reverse engineering with the business glossary to restore semantics.
Restoring semantics: After reverse engineering, assign business definitions from the glossary to each discovered entity and attribute, creating a documented model.
Each domain team (Sales, Supply Chain, Finance, etc.) owns their domain model. The enterprise challenge: composing eight independent domain models into one unified enterprise model without losing domain autonomy.
ShaDey Inc. composition strategy:
| Domain | Domain Model Tables | Shared Entities | Local Entities |
|---|---|---|---|
| Sales | DIM_CUSTOMER, FACT_OPPORTUNITY, DIM_PRODUCT | CUSTOMER (canonical) | SALES_STAGE, DEAL_PROBABILITY |
| Finance | DIM_CUSTOMER, FACT_INVOICE, DIM_GL_ACCOUNT | CUSTOMER (canonical) | PAYMENT_TERM, INVOICE_TYPE |
| Supply Chain | DIM_PRODUCT, FACT_INVENTORY, DIM_SUPPLIER | PRODUCT (canonical) | SKU_VARIANT, WAREHOUSE_ZONE |
| Marketing | DIM_CUSTOMER, FACT_CAMPAIGN, DIM_SEGMENT | CUSTOMER (canonical) | SEGMENT_RULE, CAMPAIGN_CHANNEL |
Conflict example: Sales wants to add loyalty_tier to DIM_CUSTOMER; Finance objects (loyalty is transient, shouldn't be in dimension). Resolution: Create separate FACT_LOYALTY_TIER table, joined at query time.
| Entity | Domain Owner | Table Name | Columns Contributed |
|---|---|---|---|
| CUSTOMER (Canonical) | Sales (primary steward) | pdm_dim_sales_customer | customer_id, name, address, industry, credit_limit, active_flag |
| CUSTOMER (Finance extension) | Finance (secondary steward) | pdm_xref_finance_customer | customer_id, payment_terms, dunning_block, credit_exposure |
| CUSTOMER (Marketing extension) | Marketing | pdm_xref_marketing_customer | customer_id, segment_id, engagement_score, email_opt_in |
Enterprise join: SELECT * FROM pdm_dim_sales_customer c LEFT JOIN pdm_xref_finance_customer f USING (customer_id) LEFT JOIN pdm_xref_marketing_customer m USING (customer_id).
Naming conventions are governance guardrails. Enforce them via pre-commit hooks, CI/CD validation, and linting rules. ShaDey Inc. naming standard ensures every table and column signals its layer, type, domain, and purpose.
ShaDey Inc. naming standard:
Naming validation query: detect non-compliant table/column names:
| Violation | Example | Fix | Why |
|---|---|---|---|
| Wrong layer prefix | staging_dim_customer |
pdm_dim_sales_customer |
Only pdm, ldm, cdm allowed; "staging" is not a layer |
| Wrong entity type | pdm_table_sales_customer |
pdm_dim_sales_customer |
"table" is not specific; use dim, fact, xref, etc. |
| Wrong domain | pdm_dim_crm_customer |
pdm_dim_sales_customer |
CRM is a tool, not a domain; use sales |
| Special characters | pdm_dim_sales_customer-2024 |
pdm_dim_sales_customer_2024 |
Underscores only; hyphens forbidden in SQL |
Semantic drift occurs when the model and reality diverge: the model says X, but the database has Y. ShaDey Inc. example: DIM_CUSTOMER model documents 42 columns; the database has 47. Five columns exist undocumented.
Types of drift:
| Drift Type | Example | Severity | Detection Method |
|---|---|---|---|
| Structural | Column added: customer_segment (missing from model) | Medium | Column count mismatch |
| Semantic | Column meaning changed: credit_limit redefined from USD to EUR | Critical | Manual review; hard to auto-detect |
| Referential | Foreign key broken: customer_id no longer references KNA1 | Critical | FK constraint validation query |
| Type Mismatch | Model: credit_limit is DECIMAL(15,2); DB: VARCHAR(50) | High | Data type comparison |
SQL query for drift detection (compare model registry vs INFORMATION_SCHEMA):
ShaDey Inc. runs drift detection daily at 2 AM; alerts sent to domain stewards for Critical/High drifts within 4 hours.
When multiple teams change the model concurrently, conflicts arise. ShaDey Inc. scenario: Sales team adds loyalty_tier to DIM_CUSTOMER; Finance team adds credit_score the same week. Both PRs are valid but touch the same table.
Version control strategy for data models:
| Change Type | Example | Merge Strategy | Approval Gate |
|---|---|---|---|
| Additive (non-conflicting) | Sales adds loyalty_tier; Finance adds credit_score | Auto-merge (different columns) | Domain Steward only |
| Conflicting | Both add customer_segment with different data types | Manual merge required | Enterprise Architect + Data Governance Board |
| Semantic | Finance adds credit_score; Data Science adds predicted_churn_score (derived, should not be in dimension) | Manual review | Architecture Board review |
Model version history DDL (tracks all changes):
When two domains disagree on entity definition or attribute placement, the governance workflow escalates for structured resolution. ShaDey Inc. has a formal escalation path: Domain Steward → Enterprise Architect → Data Governance Board.
Example conflict: Sales wants to add predicted_churn_score to DIM_CUSTOMER. Data Science objects (derived metrics shouldn't be in dimensions; they belong in a feature store).
SLA table: change type determines review and approval authority:
| Change Type | Review Time SLA | Approval Authority | Escalation Trigger |
|---|---|---|---|
| New table, local domain only | 3 business days | Domain Steward | If domain unknown or impacts other domains |
| Column addition to existing table | 5 business days | Enterprise Architect | If column name conflicts with another domain's pending change |
| Semantic change (rename, redefine) | 7 business days | Data Governance Board | Always (any semantic change requires board approval) |
| Cross-domain shared entity change | 7 business days | Data Governance Board | Always (impacts multiple domains) |
UDPs are custom metadata fields on model objects (tables, columns, relationships). They extend the model with governance context without changing structure. ShaDey Inc. UDP catalogue captures classification, ownership, compliance, and quality metadata.
ShaDey Inc. UDP catalogue:
| UDP Name | Applies To | Values | Example |
|---|---|---|---|
| data_classification | Column | PII | Confidential | Internal | Public | customer_email: PII |
| source_system | Table | SAP | CRM | eCommerce | POS | Custom | pdm_dim_sales_customer: SAP |
| retention_policy | Column | 7yr | 3yr | 1yr | session | indefinite | credit_card_number: 1yr |
| gdpr_relevant | Column | true | false | customer_name: true |
| change_frequency | Column | real-time | daily | weekly | monthly | annual | loyalty_tier: monthly |
| data_owner | Table | Domain team name | pdm_dim_sales_customer: Sales |
| quality_sla | Table | 99.9% | 99% | 95% | SLA_not_defined | pdm_dim_sales_customer: 99.9% |
Metadata table design (implements UDP without modeling tool):
Query: Show all PII columns across the enterprise model:
Graph databases excel at tracking lineage: model versions, ownership chains, drift dependencies, and impact analysis. ShaDey Inc. uses Neo4j to answer: "If we change DIM_CUSTOMER, which domains are affected? Which reports break?"
Neo4j graph model:
| Node Type | Properties | Example |
|---|---|---|
| Model | name, version, effective_date, approved_by | pdm_dim_sales_customer v2.1 |
| Domain | domain_name, steward, team_email | Sales (steward: john@shadey.in) |
| Drift | drift_id, severity, type, detected_date | DRIFT_001: Column addition, HIGH |
| Report/Query | query_name, owner, last_execution | sales_performance_monthly (owner: Analytics) |
Cypher: Create model version nodes and ownership edges:
Cypher query: Show all model changes in the last 30 days with approval status:
Cypher query: Which domains are affected if DIM_CUSTOMER schema changes?