Markdown Editor

Data Dictionary Template

Business and technical definitions per attribute: type, format, allowed values, source, owner, classification, code lists, derived fields

Архітектура та системний дизайнСтандартdatadictionarymath

Як використовувати: Use alongside a database or data product so business and engineering share one meaning per field. Write the business definition before the type, classify every attribute and give derived fields an exact formula. Main pitfall: repeating column names and types without definitions, which adds nothing to the schema.

Перегляд

Data Dictionary: [System or data domain name]

Business and technical definitions for every entity and attribute in a system or data product: meaning, type, format, allowed values, source, owner and classification, plus code lists, derived fields and a change log. Based on common industry practice for data dictionaries and metadata management. Replace every [bracketed] value and every row marked Example.

FieldValue
Document ID[DD-ORDERS-001]
System / data product[Orders database, schema public]
Version[0.1]
Status[Draft / In review / Approved]
Data owner[@data-owner]
Data steward[@data-steward]
Last updatedYYYY-MM-DD
Related[Database design document], [Data model diagram], [Glossary]

1. Conventions

1.1 Column meanings

ColumnMeaning
AttributePhysical name as it appears in the schema or file
Business nameName a business user would recognise
DefinitionWhat the value means, in one or two sentences, without repeating the name
Type and lengthPhysical data type including precision or maximum length
FormatPattern, unit, time zone or encoding
Allowed valuesRange, list or reference to a code list in section 4
NullNo if a value is always present; otherwise when it is absent
DefaultValue used when none is supplied
SourceSystem, form field or calculation that produces the value
OwnerPerson or team accountable for the meaning and quality
Class.Classification label from 1.3
ExampleA realistic value

1.2 Naming and formatting rules

  • Attribute names are snake_case; business names are Title Case.
  • Dates use ISO 8601 (YYYY-MM-DD); timestamps are UTC (YYYY-MM-DDThh:mm:ssZ).
  • Money is stored as a decimal amount plus an ISO 4217 currency code; never as a float.
  • Country codes are ISO 3166-1 alpha-2; language codes are BCP 47.
  • Boolean attributes start with is_ or has_.

1.3 Classification labels

LabelMeaningHandling
PublicMay be publishedNo restriction
InternalFor employees and contractorsAccess by role
ConfidentialBusiness-sensitiveNeed-to-know; encrypted at rest
PersonalIdentifies or relates to a personPrivacy notice applies; masked outside production
Sensitive personalSpecial category or financial account dataStrictly limited; field-level protection

2. Entity list

EntityBusiness nameOne row representsOwnerRecord count (approx.)Retention
ordersOrderOne customer order, from checkout to completion or cancellationOrders teamExample: 70 million10 years
order_lineOrder LineOne product and quantity within an orderOrders team175 million10 years
customer_refCustomer ReferenceA customer known to the Orders domain (ID and display name only)Customer team4 millionWhile active plus 2 years
order_eventOrder Status ChangeOne change of an order's statusOrders team280 million7 years
[entity][Business name][Row meaning][Owner][Count][Retention]

3. Attributes by entity

3.1 orders (Order)

AttributeBusiness nameDefinitionType and lengthFormatAllowed valuesNullDefaultSourceOwnerClass.Example
order_idOrder IDSystem identifier of the order, never shown to customersuuidUUID v7AnyNoGeneratedOrders serviceOrders teamInternal0190f3a2-7c1e-7b2a-9d4f-3e5b6a7c8d9e
order_numberOrder NumberNumber printed on invoices and quoted by customersvarchar(20)ORD-YYYY-NNNNNNUniqueNoGeneratedOrders serviceOrders teamInternalORD-2026-000123
customer_idCustomer IDCustomer who placed the orderuuidUUIDMust exist in customer_refNononeCheckoutCustomer teamPersonal0190f39e-11aa-7c3d-8e9f-0a1b2c3d4e5f
statusOrder StatusCurrent position of the order in its lifecyclevarchar(30)Upper snake caseCode list CL-01NoPENDING_PAYMENTOrders serviceOrders teamInternalSHIPPED
currencyOrder CurrencyCurrency in which all amounts of the order are expressedchar(3)ISO 4217CL-03NononeStorefrontFinanceInternalEUR
total_amountOrder TotalAmount payable for all lines including tax, before refundsnumeric(12,2)Decimal, 2 places0 to 999 999 999.99No0Derived (DF-01)FinanceConfidential39.80
channelSales ChannelChannel through which the order was placedvarchar(20)Upper snake caseCL-02NoWEBCheckoutCommerce teamInternalMOBILE_APP
created_atOrder Date and TimeMoment the customer confirmed checkouttimestamptzISO 8601 UTCNot in the futureNonow()Orders serviceOrders teamInternal2026-03-14T09:30:00Z
[attribute][Name][Definition][Type][Format][Values][Y/N][Default][Source][Owner][Class.][Example]

3.2 order_line (Order Line)

AttributeBusiness nameDefinitionType and lengthFormatAllowed valuesNullDefaultSourceOwnerClass.Example
order_line_idOrder Line IDSystem identifier of the lineuuidUUID v7AnyNoGeneratedOrders serviceOrders teamInternal0190f3a3-02b4-7d5e-8f60-71829304a5b6
order_idOrder IDOrder the line belongs touuidUUIDMust exist in ordersNononeOrders serviceOrders teamInternal0190f3a2-7c1e-7b2a-9d4f-3e5b6a7c8d9e
skuStock Keeping UnitCatalogue code of the product variant soldvarchar(40)Upper case, hyphenatedMust exist in catalogue at order timeNononeCatalogueCatalogue teamInternalTSHIRT-BLK-M
quantityQuantityNumber of units orderedintegerWhole number1 to 999NononeCheckoutOrders teamInternal2
unit_priceUnit PricePrice of one unit including tax at the time of the ordernumeric(12,2)Decimal, 2 places0 or moreNononePricing servicePricing teamConfidential19.90
line_totalLine TotalAmount for this linenumeric(12,2)Decimal, 2 places0 or moreNoDerivedDerived (DF-02)FinanceConfidential39.80
[attribute][Name][Definition][Type][Format][Values][Y/N][Default][Source][Owner][Class.][Example]

3.3 [entity] ([Business name])

[Repeat the attribute table for every entity in section 2.]

4. Code lists and enumerations

4.1 CL-01 Order status

CodeLabelMeaningActiveSince
PENDING_PAYMENTPending paymentOrder created; payment not yet authorisedYesv1.0
PAIDPaidPayment authorised; ready for fulfilmentYesv1.0
SHIPPEDShippedAt least one shipment handed to a carrierYesv1.0
DELIVEREDDeliveredAll shipments deliveredYesv1.0
CANCELLEDCancelledCancelled before shipment; no further changesYesv1.0
ON_HOLDOn holdExample: Fraud review; replaced by a separate flagNo (retired YYYY-MM-DD)v1.0

4.2 CL-02 Sales channel

CodeLabelMeaningActive
WEBWebsiteDesktop or mobile browser storefrontYes
MOBILE_APPMobile appiOS or Android appYes
CALL_CENTRECall centreOrder taken by an agentYes
MARKETPLACEMarketplaceOrder imported from a third-party marketplaceYes

4.3 CL-03 Currency

[Reference the external code list instead of copying it. Example: "ISO 4217 alphabetic codes; accepted subset: EUR, GBP, USD, CHF, SEK."]

5. Derived fields

IDAttributeFormulaInputsRoundingRecalculated when
DF-01orders.total_amountSum of line_total over the order's linesorder_line.line_totalHalf-up to 2 decimals after summingAny line is added, removed or changed
DF-02order_line.line_totalquantity x unit_pricequantity, unit_priceHalf-up to 2 decimalsGenerated on write
DF-03average_order_value (report)Sum of total_amount / count of orders, excluding CANCELLEDorders2 decimalsDaily batch
[DF-nn][Attribute][Formula][Inputs][Rule][Trigger]

For report metrics, show the formula explicitly. Average order value for a period PP, over non-cancelled orders OPO_P:

AOVP=∑o∈OPtotal_amounto∣OP∣\text{AOV}_P = \frac{\sum_{o \in O_P} \text{total\_amount}_o}{|O_P|}

6. Data quality rules

IDAttribute(s)RuleThresholdCheck frequencyOwner
DQ-01orders.total_amountEquals DF-01 recomputed100%NightlyFinance
DQ-02orders.customer_idExists in customer_ref100%NightlyCustomer team
DQ-03order_line.skuExists in catalogue history99.99%DailyCatalogue team
[DQ-nn][Attribute][Rule][Threshold][Frequency][Owner]

7. Change log

VersionDateEntity / attribute / codeChangeReasonMigration or releaseAuthor
0.1YYYY-MM-DDAllInitial dictionaryFirst releasen/a[@name]
0.2YYYY-MM-DDExample: orders.channelAdded with code list CL-02Channel reportingV014[@name]
0.3YYYY-MM-DDExample: CL-01 ON_HOLDRetiredReplaced by fraud review flagRelease 2.3[@name]
[x.y]YYYY-MM-DD[Item][Added / Changed / Retired][Reason][Reference][@name]

Standard and licence note

Based on common industry practice for data dictionaries and metadata management, using ISO 8601, ISO 4217 and ISO 3166 codes by reference only. Original text written for this collection; example values are illustrative. Template licence: MIT.

Схожі шаблони