🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Management / Database Administration › Relational Design & Normalization › Lesson 7
TEC-DATA86-02 · Lesson 7 · 10 clock hours · practice

Data Dictionary and Design Documentation

Objective. Students will produce a professional data dictionary for a multi-table schema that documents each table, column, data type, constraint, allowed values, and business definition.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

What Is a Data Dictionary?

A data dictionary is a structured catalog that describes every table, column, and relationship in a database. Think of it as the official reference manual for your schema. When a developer needs to know what a column stores, when a business analyst wants to understand why a field exists, or when a new DBA takes over a system, the data dictionary is the first place they look. Without it, teams waste hours reverse-engineering code, make incorrect assumptions, and introduce bugs.

Data dictionaries are a cornerstone of data governance — the policies and standards that ensure data is accurate, consistent, and trustworthy across an organization. Both the DAMA CDMP framework and real-world DBA practice treat documentation as a professional obligation, not an afterthought.

What a Data Dictionary Contains

A well-built data dictionary records the following for every column in the database:

Spreadsheets are the most common format for a data dictionary at this level, with one row per column. Enterprise tools such as erwin Data Modeler, IBM InfoSphere, or built-in catalog features in cloud platforms automate much of this, but the underlying content is the same.

Why Each Field Matters

Data type and nullable are the bridge between documentation and the actual DDL. If your dictionary says a column is `VARCHAR(50)` but the DDL says `TEXT`, someone will write code based on the wrong assumption. Always verify against the live schema using `\d tablename` in psql or by querying `information_schema.columns`.

Constraints communicate rules that the database enforces automatically. Documenting them prevents developers from writing application code that duplicates or conflicts with database-level validation. For example, if a CHECK constraint already limits `quantity` to values greater than zero, an application should not separately enforce a different lower bound.

Allowed values go further than constraints for columns where the rule is enforced by application logic or a lookup table rather than a CHECK constraint. Documenting them makes the implicit explicit.

Business definitions are arguably the most important field. A column named `cust_flg` is meaningless to anyone who was not present when the table was designed. A business definition such as "Indicates whether the customer has opted in to marketing emails; set to TRUE at account creation if consent is given" removes all ambiguity. Write definitions in complete sentences and plain English — avoid jargon and abbreviations.

Keeping the Dictionary Accurate

A data dictionary that is out of sync with the actual schema is worse than no dictionary, because it spreads misinformation. Treat it like code: update it whenever the DDL changes. In professional environments this is enforced through change-management procedures — no schema migration is approved without a corresponding dictionary update.

For this course, your source of truth is the retail-store DDL from Lesson 6. Use `\d tablename` in psql to pull the exact data type, nullable status, and constraint details for each column. Cross-reference the business narrative from Lesson 2 to write accurate business definitions. Any conflict between your dictionary and the DDL is an error.

Data Dictionaries and Professional Credentials

The DAMA CDMP exam tests data governance, data quality, and metadata management — all of which depend on documentation practices like the data dictionary. Oracle and Microsoft certifications (OCA/OCP and DP-300) include metadata and schema documentation topics in their exam domains. The PostgreSQL CE exam tests your ability to understand and manage PostgreSQL schemas, which requires fluency in reading and interpreting schema structure exactly as a data dictionary captures it.

Safety and Professional Responsibility

In database work, "safety" means protecting data integrity and confidentiality. A data dictionary may contain sensitivity classifications — marking which columns hold personally identifiable information (PII), protected health information (PHI), or payment card data. Never include actual production data values in a data dictionary; use realistic but fabricated example values. If your schema documentation will be shared outside your team, verify that it does not expose sensitive system details (internal server names, security column names) that could assist unauthorized access. Follow your organization's information-security policy when storing and distributing documentation.

Your Task

Using the spreadsheet template provided, build a complete data dictionary for your retail-store PostgreSQL schema. Every column in every table must have all required fields filled in. Start by exporting `\d` output for each table, then transfer the structural facts (data type, nullable, constraints) before writing business definitions from the narrative. During peer review, your partner will check every row against both the DDL and the narrative — discrepancies are errors, not style differences. Revise before final submission.

Key terms9

Data dictionaryA structured catalog documenting every table, column, data type, constraint, allowed value, and business definition in a database, used as the authoritative reference for developers, analysts, and administrators.
Business definitionA plain-English description of what a column or table represents in real-world terms, written so non-technical stakeholders can understand its purpose without examining the code.
Data governanceThe set of policies, standards, roles, and processes that ensure data within an organization is accurate, consistent, secure, and used appropriately.
NullableA column property indicating whether the column is permitted to contain NULL (an absent or unknown value); documented as YES or NO in a data dictionary.
MetadataData that describes other data — in database administration, metadata includes column names, data types, constraints, and relationships stored in system catalogs such as information_schema.
Domain (column domain)The complete set of valid values a column is permitted to contain, defined by its data type, constraints, and any additional business rules governing allowed values.
DDL (Data Definition Language)The subset of SQL used to define database structures, including CREATE TABLE, ALTER TABLE, and DROP TABLE statements that establish tables, columns, data types, and constraints.
information_schemaA standard set of read-only views available in PostgreSQL (and other SQL databases) that exposes metadata about tables, columns, constraints, and other schema objects in a queryable format.
PII (Personally Identifiable Information)Any data that can be used to identify a specific individual, such as name, email address, or government ID number; columns storing PII are often flagged in data dictionaries for special handling.
In class: Instructor demonstration: show a completed data dictionary for a sample HR schema using a structured spreadsheet template (one row per column, columns for table name, column name, data type, nullable, constraints, business definition, example value); explain why each field matters for governance and handoffs. · Data dictionary build: students complete a data dictionary for their retail-store PostgreSQL schema, filling in every field for every column from their DDL and the original business narrative. · Peer review: partners review each other's data dictionary against the DDL and business narrative, flagging any columns missing definitions or data types inconsistent with the DDL, and return a written review; author revises before submission.
Materials: Data dictionary spreadsheet template, retail-store DDL from Lesson 6, business narrative from Lesson 2, PostgreSQL \d output for reference
Check: Instructor evaluates the final data dictionary: every column documented, data types match DDL, business definitions are in plain English and accurate to the narrative. Pass: 90% of columns fully and accurately documented (rubric).

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Data Governance / Metadata Management (DAMA CDMP)
1. A new developer asks what the `ord_stat_cd` column in the `orders` table stores. The data dictionary entry for this column has a blank business definition field. What is the most direct consequence of this gap?
PostgreSQL Schema Management (PostgreSQL CE)
2. You are building a data dictionary for a PostgreSQL schema. Which psql command gives you the data type, nullable status, and constraints for each column of a table named `product`?
Data Quality / Documentation Accuracy (DAMA CDMP)
3. Your data dictionary lists the `unit_price` column as data type `INTEGER`, but the DDL shows `NUMERIC(10,2)`. What should you do?
Data Governance / Metadata Management (DAMA CDMP)
4. Which of the following best describes the purpose of the 'allowed values' field in a data dictionary?
Data Quality / Schema Documentation (PostgreSQL CE)
5. During peer review, your partner finds that the `customer_email` column in your data dictionary is marked Nullable: YES, but the DDL contains `customer_email VARCHAR(255) NOT NULL`. What type of error is this?
Data Security / Data Governance (DAMA CDMP)
6. A data dictionary entry for a column in a healthcare application includes an example value of an actual patient's name and date of birth collected from the production database. What professional and security concern does this raise?
PostgreSQL Schema Management (PostgreSQL CE / DP-300)
7. In the context of database administration, which SQL standard view can you query to retrieve column names, data types, and nullable information for all tables in a PostgreSQL database?
Data Governance / Change Management (DAMA CDMP / Oracle DBA CA)
8. A change-management procedure requires that every approved schema migration include an updated data dictionary before the migration is deployed. This practice most directly supports which data management principle?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.