Notes that nobody can build from
Oakfield Youth Club is made up. A manager writes: "We need to store members. Name, age, phone." Then she goes on holiday.
A technician has to build it. How long is a name? Is the phone number a number? What if nobody gives an age? A data dictionary (a table that describes every field) answers every one of these questions.
By the end of this lesson
Note
I can write a data dictionary entry for each field of a table.
Key words
| Word | What it means |
|---|---|
| Data dictionary | a table that describes every field of your tables |
| Data type | the kind of data a field holds |
| Field size | how much a field can hold |
| Format | how a value is shown |
| Default value | the value a field gets if nobody types one |
| Primary key | a field that is different for every record |
| Foreign key | a field that holds a primary key from another table |
The cells students fill in are left blank in this preview.
Starter: what you already know
Have a go
Starter: what you already know
4 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
A data dictionary describes every field
A data dictionary has one row for each field. Its columns give the field name, data type, field size, format, default value and any key.
With a good dictionary, a person who never met you can build the same tables.
Worked example: the members table
| Field name | Data type | Size | Format | Default | Key |
|---|---|---|---|---|---|
| member_id | Numeric, whole number | Whole number | No decimals | Made for you | Primary key |
| first_name | Alphabetic | 30 characters | Capital letter first | None | |
| last_name | Alphabetic | 30 characters | Capital letter first | None | |
| age | Numeric, whole number | Small whole number | No decimals | None | |
| phone | Alphanumeric | 11 characters | Starts with 0 | None | |
| photo_consent | Logical, yes or no | 1 value | Yes or No | No |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.