PDF Version Available

This document is also available in PDF format: week6documentation.pdf

The PDF version includes bookmarks for easy navigation and is optimized for printing.

Accessibility Notice

This document is also available in HTML format at:

Link: https://aholdengouveia.name/AdvData/labs/week6documentation.html

The HTML version provides enhanced accessibility features including keyboard navigation, screen reader support, responsive design, dark mode support, and high contrast options.

Request

Request: DATA-8456
Requested by: Head of the data team
Data: Your database from the SQL Review labs, and your schema from the Database Schema lab

Background

A new analyst starts on Monday, and right now everything they would need to know about your data is in your head. Your manager wants documentation that gets them working on their first day, keeps the data safe if something goes wrong, and stays accurate as things change.

Learning Outcomes

By the end of this lab, you will be able to:

Lab Instructions

Keep using the data set you chose in the Introduction to Data lab, and the schema you made for it. Books are my example data only, so your documentation must be for your own data set.

If you want to switch to a different data set, email me first. Switching means redoing the work from earlier labs for your new data set, so it adds a lot of work. The switching checklist (linked under Resources) lists what you'd need to redo.

Write your documentation for a company, as if you were handing it to a new analyst joining the data team on their first day. They have never seen your data before. The company can be the one on your data card, or a real company or volunteer organization of your choice. If you use a real organization, only include information you have permission to share. You can use any tool you like, such as Word or Google Docs.

Part 1: Getting Started

  1. Describe the company in a few sentences: what it does, how it makes money, and how big it is (roughly how many employees). You'll use its size in Part 4.
  2. Explain where the data comes from, using the source and license from your data card.
  3. Explain where the database is, what tool it's in, and how to open it.

Part 2: Schema and Rules

  1. Include your schema from the Database Schema lab. Update it with any changes you've made since then. Make your changes easy to spot: put anything new or changed in bold, and add a short note under the schema saying what changed and why. If nothing changed, say so.
  2. List the rules for your data, including any data types that are required. For example, a year is always a whole number. Start with your rules from the Database Schema lab, and mark any new or changed rules the same way.

Part 3: Data Dictionary

Make a data dictionary with an entry for every column in every table, following the sample data dictionary (linked under Resources). For each column, give the data type, whether it's required, any key, the allowed values, a description, an example, and notes. Use the quality notes from your data card in your notes. Your examples, counts, and missing values must match the data in the database you turned in for the SQL Review lab.

Part 4: Backup Plan

Research how companies like yours, of a similar size and type, back up their data. Use at least 2 reliable sources, and cite each one with a link. Check each source with the CRAAP test (linked under Resources), and include a sentence for each one about why it passes. Then, based on your research, answer these questions:

  1. How much data could your company afford to lose? For example, a day's worth, or an hour's worth.
  2. How quickly does the database need to be working again after a failure?
  3. How often will you back up the database?
  4. Where will the backup copies be kept, both onsite and offsite?
  5. How, and how often, will you test that you can restore from a backup? A backup you've never restored from might not work.

For each answer, explain how your research supports it.

Part 5: Tracking Changes

  1. Add a change log to your documentation, with columns for the version number, the date, what changed, and who made the change. Start it with version 1.0 for this document. See the sample change log (linked under Resources) for an example.
  2. Suggest a version control tool or system for tracking changes to your schema and queries, and explain why you chose it. You don't need to set it up.
  3. Make a schedule for reviewing your documentation, such as quarterly or annually, and explain why. List at least 2 events, besides the schedule, that should also cause an update. For example, adding a new column.

Part 6: Common Queries

Add an appendix with your documented queries from the SQL Review labs and the Query Optimization lab. Check that each one still works with your current schema, and update any that don't. These give a new analyst working examples to start from.

Acceptance Criteria

This request is done when:

Deliverables

One file that includes:

Audience: a new analyst on their first day, who has never seen your data.

Resources

References, a video, a PowerPoint and some notes are available at my website Link: https://www.aholdengouveia.name/AdvData/databasedocumentation.html

Sample data dictionary, showing the format to follow Link: https://www.aholdengouveia.name/AdvData/labs/SampleDataDictionary.txt

Sample query documentation, for Part 6 Link: https://www.aholdengouveia.name/AdvData/labs/SampleQueryDocumentation.txt

Sample change log, for Part 5 Link: https://www.aholdengouveia.name/AdvData/labs/SampleDocumentationChangeLog.txt

The CRAAP test, for checking your sources in Part 4 Link: https://web.archive.org/web/20250814000638/https://guides.lib.uchicago.edu/c.php?g=1241077&p=9082343

My guide to evaluating sources Link: https://www.aholdengouveia.name/Howtos/Sourceeval/sourceEvaluation.html

Switching checklist, if you want to change data sets Link: https://www.aholdengouveia.name/AdvData/labs/SwitchingDataSets.txt