Graph
Derived Attribute

đź§®Derived Attribute

NEW

Also known as: Computed Field, Formula Field

An attribute whose value is calculated from other data elements rather than stored directly.

DESCRIPTION

A derived attribute is computed from one or more base attributes using defined rules or formulas. It avoids redundant storage, improves consistency, and can be calculated on read or precomputed for performance. Examples include age from birthdate, order total from line items, or flags from thresholds. Implementation options include SQL expressions, virtual/generated columns, and materialized views. Governance requires clear lineage and definitions so consumers can trust the derivation logic. In analytics, derived attributes often power measures and features.

ALTERNATIVE DEFINITIONS

Wikipedia

In the ER model, a derived attribute is an attribute whose value is calculated from other attributes and need not be physically stored.

Places derived attributes within ER modeling and highlights non-storage.

Source

Oracle

A virtual column is an expression that is evaluated when the row is accessed and is not physically stored in the table.

Describes a concrete DB implementation of derived attributes.

Source

Salesforce

A formula field is a read-only field that derives its value from a formula expression you define.

Business application perspective on computed, read-only fields.

Source

Data Model Calculated Columns Materialized View Extract-Transform-Load Transformation Aggregation Business Rules Feature Engineering Measure Kimball Methodology

COMPETING TERMS

Stored Attribute

KNOWLEDGE AREAS

Data Modeling Data Warehousing & BI Data Engineering

TARGET AUDIENCE

Data Modeler Analytics Engineer BI Specialist Data Engineer Data Steward

EXTERNAL SOURCES

  • Wikipedia - Entity–relationship model
  • Oracle - Virtual/generated columns reference
  • MySQL - Generated columns guide
  • PostgreSQL - PostgreSQL generated columns

TOP QUESTIONS

When should a Derived Attribute be computed on read versus stored?

Compute on read for freshness and low-cost calculations; store (materialize) when computation is expensive or needed in large aggregations.

Category: Opinion

How do Derived Attributes improve data quality?

They reduce redundancy and inconsistencies by centralizing calculation logic governed by clear business rules and lineage.

Category: Relevancy

What is a common mistake with Derived Attributes?

Embedding inconsistent formulas across reports or systems, causing mismatched metrics and confusion among stakeholders.

Category: Mistakes

How are Derived Attributes implemented in databases?

Via SQL expressions in views, virtual/generated columns, or precomputed materialized views with refresh policies.

Category: HowTo

Why document Derived Attributes in a business glossary?

Documentation clarifies definitions, lineage, and owners, ensuring trust, auditability, and consistent usage across teams.

Category: Management

How do Derived Attributes relate to measures in BI?

Measures are commonly derived fields aggregating events (e.g., revenue), defined consistently for dashboards and analyses.

Category: Concept

What is the risk of overusing Derived Attributes?

Too many derived fields can bloat models, slow queries, and complicate governance; rationalize and standardize key metrics.

Category: Risks

How do Derived Attributes support feature engineering?

They create signals like ratios, lags, and aggregates from base data to improve model performance and interpretability.

Category: Application

What performance considerations apply to Derived Attributes?

Indexing, pushdown computation, and materialization can mitigate repeated expensive calculations on high-volume queries.

Category: Requirements