What Is a Data Dictionary? Define Column Meaning, Types, and Rules
A data dictionary records what each field means in practice, along with its type, unit, missing-value meaning, and validity rules, so analysts interpret the same column consistently. This guide shows how to start with database metadata, verify business meaning, and maintain changes with example SQL, while explaining why a dictionary does not guarantee data quality.
A data dictionary is a reference that explains what a dataset and each field mean, how values are represented, and which rules apply. It adds business meaning, units, missing-value semantics, ownership, and change history to technical names and types. These entries state intended definitions; check the actual data separately.
What problem does it solve?
Short names such as amount, status, or date rarely tell an analyst enough. Is amount before tax, before discounts, or after refunds? Those choices change totals and conclusions. A dictionary answers such questions and reduces repeated investigation and incorrect joins.
A database schema describes structures, types, and constraints for a system. A data dictionary starts from that structure and adds context that people need: business definitions, units, valid values, source, and owner. Teams may store both in one tool, but their roles remain distinguishable. W3C CSVW metadata, for example, associates a table or column with a machine name, a human-readable title, a description, and a datatype.
What should an analyst record?
Document what another analyst needs to interpret a value or reproduce an analysis. A large explanation is not necessary for every field.
| Entry | Record | Why it matters |
|---|---|---|
| Identity | Exact dataset, table, and column name and a stable location | Distinguishes similarly named or renamed fields. |
| Business meaning | What the value represents and includes or excludes | Prevents mixing metrics with different definitions. |
| Row grain | Whether one row represents a customer, order, order line, or date | Prevents duplicate counts and incorrect joins. |
| Representation | Type, unit or currency, timezone, and decimal precision | Keeps calculations and displays consistent. |
| Validity | Allowed codes, ranges, key uniqueness, and nullability | Helps find invalid values and broken assumptions. |
| Missing-value meaning | Whether null means unknown, not collected, or not applicable, and how to distinguish them | Prevents treating blanks as zero or a normal state. |
| Ownership and change | Source and transformation, owner, review date, version, and history | Helps verify definitions and trace impacts. |
| Sensitivity | Privacy or confidentiality class and sharing limits | Avoids exposing sensitive examples or secrets in the dictionary. |
Keep automatically extracted name, type, and nullability separate from business meaning confirmed by a person. Do not save an inferred value as an approved definition.
Fill in an order-data example
The following is a hypothetical order_items table. One row represents one line item, not an entire order. Counting rows as customers would count a customer more than once when they bought multiple items.
| Field | Business definition | Type and unit | Rule and caution |
|---|---|---|---|
| order_id | Stable identifier for an order | String | One order can have several item rows. |
| quantity | Number of units ordered on the line | Integer, units | Must be at least 1; represent cancellations through a separate status or event. |
| unit_price | Price per unit before discount | Decimal, USD per unit | Set a conversion rule before combining currencies. |
| line_discount | Total discount applied to the item line | Decimal, USD | Do not mix product-level discounts with order-level coupons. |
| net_line_amount | Quantity × unit price − line discount | Decimal, USD | Excludes tax and shipping; record return refunds as separate events. |
The type of net_line_amount only says that it is a monetary value. The definition also states its grain, discount scope, and exclusions so someone can reproduce the total. If order-level coupons or refunds from another table are added, document how they are allocated to lines. The example is hypothetical, not a report of observed company data.
Start from metadata, then verify
Athena uses table metadata from the Glue Data Catalog to identify source locations, table and column names, and types. PostgreSQL’s information_schema.columns exposes system details such as column name, position, type, nullability, and default. These queries can populate the technical part of a dictionary; they cannot discover business meaning automatically.
This query shows the structure of analytics.order_items in PostgreSQL or a compatible engine. Schema names, available fields, and permissions vary by system.
SELECT column_name, ordinal_position, data_type, is_nullable, column_default
FROM information_schema.columns
WHERE table_schema = 'analytics'
AND table_name = 'order_items'
ORDER BY ordinal_position;Confirm definitions in this order:
Set the scope and row grain: record the table, analysis purpose, time period, and what one row represents.
Extract technical metadata from the system catalog or file header: actual names, types, order, and defaults. If permissions or view differences hide fields, ask the source owner.
Confirm meaning and rules with an owner or source document: definition, unit, inclusions and exclusions, codes, null meaning, source, and transformations.
Compare sample rows and checks: verify codes, units, row grain, null patterns, and key uniqueness. Passing a sample does not prove that all data is correct.
Assign ownership and change control: record the responsible person, review date, and version; revisit the dictionary when source schemas or calculations change.
Source table or file ↓ extract structure Technical metadata ↓ confirm meaning with an owner Add definitions, units, null rules, and constraints ↓ compare with data Verified dictionary version
How does it differ from a schema, glossary, or catalog?
| Artifact | Main question | Example |
|---|---|---|
| Database schema | How are tables and columns structured for the system, and what types or constraints apply? | Is quantity an integer that cannot be null? |
| Data dictionary | What does each field in this dataset mean in practice, and how should it be used? | Which discounts and returns are included in net_line_amount? |
| Business glossary | How does the organization define shared terms such as active customer or net revenue? | Do metrics across systems use a common definition? |
| Data catalog | Which datasets and services exist, where can they be found, and who maintains them? | Can someone discover a dataset, service, catalog record, and owner? |
These are not mutually exclusive product types. A catalog can present schemas, dictionaries, lineage, and glossary terms in one search interface. W3C DCAT describes catalogs of datasets and data services; a field-level dictionary can be a more detailed resource linked from that broader catalog.
Keep the dictionary accurate
A dictionary does not guarantee that values are correct or current. Descriptions can become stale, and observed data can violate a documented rule. Conversely, a system view such as information_schema does not guarantee a column’s business meaning. Connect definitions to checks; do not use the dictionary as a replacement for data-quality testing.
Do not copy real identifiers, secret keys, or restricted source paths into a public dictionary. Follow organizational access and retention rules, and have the security owner review sensitivity classifications.
Before sharing, check that:
The dataset, table, and row grain are clear.
Important field definitions include units and inclusion or exclusion rules.
Null, zero, unknown, and not applicable are distinguished.
Codes and valid ranges match the current source.
Extracted system facts are separated from meanings confirmed by people.
An owner, version, and review date are assigned.
The dictionary contains no personal data or secrets.
A useful dictionary is a current reference that lets different people interpret important values consistently and verify that interpretation; it does not need to describe every field at unnecessary length.
Sources
W3C, Metadata Vocabulary for Tabular Data (CSVW): https://www.w3.org/TR/tabular-metadata/
W3C, Model for Tabular Data and Metadata on the Web: https://www.w3.org/TR/2015/REC-tabular-data-model-20151217/
Amazon Athena, Understanding tables, databases, and data catalogs: https://docs.aws.amazon.com/athena/latest/ug/understanding-tables-databases-and-the-data-catalog.html
Amazon Athena, List or search columns using information_schema: https://docs.aws.amazon.com/athena/latest/ug/querying-glue-catalog-listing-columns.html
PostgreSQL 18, information_schema.columns: https://www.postgresql.org/docs/18/infoschema-columns.html
W3C, Data Catalog Vocabulary (DCAT) version 3: https://www.w3.org/TR/vocab-dcat/