Before you start
You will be able to
- Profile a dataset: its shape, types, blanks, distinct values, ranges, summary statistics and frequency tables, with cross-checks between columns.
- Classify a data problem by the quality dimension it affects: completeness, validity, accuracy, consistency, uniqueness or timeliness.
- Write validation rules of each kind (type, range, set membership, format, uniqueness, completeness, cross-field and referential integrity) and give each a severity.
- Calculate completeness, a rule’s failure rate and the share of rows that fail at least one rule.
- Explain why a value can pass every validation rule and still be wrong.
- Plan cleaning from a profile by turning its findings into a prioritised issue list before changing any data.
Review first
- Datasets: rows, columns, records and variables — You need the unit of observation, levels of measurement, primary keys and the data dictionary, which is what a profile is compared against.
- The mean and the median of a list of numbers.
Fictional case A fictional coffee business founded by Ana Lim. It starts as a catering and barista-training service, opens its own cafés and an online shop for beans, and plans a canned cold brew.
The idea
Fictional case
Ana sends you the order export for March to June with a request: the roaster who plans Lantern’s production wants the average number of packs per order. The quick route is to open the file and average the quantity column. The professional route starts with a question: what is actually in this file? To see the method on something small, take the ten-row extract below, invented for this lesson in the style of the export.
| order_id | order_date | region | quantity | unit_price | rating |
|---|---|---|---|---|---|
| 5001 | 2026-05-02 | North | 2 | $14.00 | 5 |
| 5002 | 2026-05-02 | north | 1 | $22.00 | blank |
| 5003 | 2026-05-03 | South | 1 | $46.00 | 4 |
| 5004 | 2026-05-03 | East | 3 | $14.00 | 4 |
| 5005 | 2026-05-04 | South | −1 | $16.50 | 3 |
| 5006 | 2026-05-04 | Nth | 1 | 22,00 | blank |
| 5007 | 2026-05-05 | East | 40 | $14.00 | 5 |
| 5007 | 2026-05-05 | East | 4 | $14.00 | 5 |
| 5008 | 2026-05-06 | SOUTH | 2 | $15.50 | 9 |
| 5009 | 2025-05-06 | North | 1 | $46.00 | blank |
Lantern’s delivery regions are North, South, East, West and Central; ratings run from 1 to 5 and are optional.
What profiling is
Data profiling is the systematic description of what a dataset actually contains: for each column, the type of its values, how many are missing, how many are distinct, what range they cover and how they are distributed; and across columns, whether values that should agree do. Abedjan, Golab and Naumann (2015) describe profiling as determining the metadata of a dataset, and divide it into three kinds of task: profiling single columns, profiling combinations of columns, and discovering dependencies such as keys. The aim is not the statistics themselves. It is to find out what the data is before you decide what to do with it.
A profiling checklist
- Shape. Count rows and columns, and compare the row count with what you expected. If the shop’s dashboard shows fewer orders for the period than the file has rows, something has been repeated or extra rows have crept in.
- Types. For each column, compare the type the software inferred with the type the data dictionary expects. A price column read as text usually means some values contain characters other than digits.
- Blanks. Count empty values per column, and look for disguised ones: placeholder values such as 0, 9999, “n/a” or “unknown”.
- Distinct values. A primary key should have as many distinct values as there are rows; a column with a fixed list of categories should have no more distinct values than the list.
- Ranges. Find the minimum and maximum of every numeric and date column, and compare them with what is possible.
- Summary statistics. For numeric columns, the mean, the median, the quartiles and the standard deviation. A large gap between mean and median signals extreme values or a lopsided distribution.
- Frequency tables. For categorical columns, count each value. Spelling variants, unexpected categories and rare codes show up at once.
- Cross-checks. Test relationships between columns that must hold, such as a total that should equal its parts or an end date that should follow a start date.
- Extremes. Sort each important column both ways and read the first and last rows. Errors collect at the ends of a sorted column.
| Column | Type the lab infers | Blanks | Distinct | Range or values | What it suggests |
|---|---|---|---|---|---|
| order_id | Identifier | 0 | 9 | 5001 to 5009 | 10 rows but 9 IDs: 5007 appears twice, with different quantities |
| order_date | Date | 0 | 6 | 6 May 2025 to 6 May 2026 | One date a year before the rest |
| region | Category | 0 | 6 | North 2, north 1, Nth 1, South 2, SOUTH 1, East 3 | Six spellings of three regions |
| quantity | Number | 0 | 6 | −1 to 40; median 1.5; mean 5.4 | A negative quantity; a mean pulled up by one large value |
| unit_price | Number (some as text) | 0 | 6 | $14.00 to $46.00, and 22,00 | Prices stored as text with $ signs, one with a decimal comma |
| rating | Number | 3 | 4 | 3 to 9 | Blanks (allowed) and a 9 on a 1–5 scale |
Read the profile column by column and the extract’s problems announce themselves without your inspecting every cell. Each finding is a question for later, not yet a correction. The 40-pack order might be a typing error for 4, which the second row for order 5007 hints at, or a café genuinely buying in bulk. The 2025 date could be a mistyped year or an old order included by mistake. Profiling tells you where to look; it doesn’t tell you what is true.
The summary statistics already change the answer to Ana’s question. The mean quantity is packs, yet the median is 1.5: half the rows show one pack or fewer. The single value of 40 supplies 40 of the 54 packs, and the sample standard deviation (dividing by ) is about 12.2 packs, larger than every value except that one. Reporting 5.4 to the roaster without checking that order could mean roasting far more coffee than customers want.
Six dimensions of data quality
Profiling shows where the data departs from what it should be. To describe the departures consistently, practitioners use data quality dimensions: aspects of quality that can be assessed and measured separately. A widely used set of six comes from a 2013 white paper by DAMA UK, the UK chapter of the Data Management Association, and the UK government’s Data Quality Framework adopts the same six.
- Completeness
- The proportion of values present out of those that should be present. Lantern’s rating is optional, so blank ratings are not a completeness defect; a blank email, which is required, would be.
- Validity
- Whether values conform to their definition: the right type, format and range, and a member of the allowed set. A quantity of −1, a rating of 9 and the price “22,00” are invalid.
- Accuracy
- Whether values correctly describe the real-world thing or event. A quantity of 40 is valid, but if the customer ordered 4 it is inaccurate.
- Consistency
- Whether the same thing is represented the same way wherever it appears, within a table and across tables. North, north and Nth for one region are inconsistent; so are two rows that give order 5007 different quantities.
- Uniqueness
- Whether each real-world thing is recorded only once. Order 5007 appears twice.
- Timeliness
- Whether the data represents reality at the time it is needed and is up to date. An export taken before the day’s orders finished arriving is incomplete for that day; a booking marked “confirmed” after the guest cancelled is out of date.
In depth
Validation rules
A validation rule is a condition that a value, a row or a set of rows must satisfy, stated precisely enough for a computer to test. The European Statistical System’s handbook on data validation, published on Eurostat’s CROS portal, defines validation as checking whether a combination of values belongs to a set of acceptable combinations; each rule is a compact description of part of that set. Rules come from the data dictionary, from the business’s own logic and from the physical world: no stay lasts −2 nights.
| Kind | Checks that | Lantern’s orders | Harborview’s bookings |
|---|---|---|---|
| Type | each value can be read as the declared type | unit_price is a number | check_in is a date |
| Range | a value lies between limits | quantity is at least 1; rating is from 1 to 5 | rate is above 0; nights is at least 1 |
| Set membership | a value comes from an allowed list | region is North, South, East, West or Central | status is one of the hotel’s status codes |
| Format | text matches a pattern | email has one @, text before it and a dot after it | booked_on is written YYYY-MM-DD |
| Uniqueness | no two rows share a key | order_id is unique | booking_id is unique |
| Completeness | a required value is present | email and customer_id are not blank | check_in, check_out and rate are not blank |
| Cross-field | values in one row agree with each other | order_total = quantity × unit_price − discount | check_out is after check_in; nights = days from check_in to check_out |
| Referential integrity | a value points to an existing row in another table | every customer_id exists in the customer table | every room_type exists in the room-type table |
Four of these kinds have names you will meet often. A range check tests that a value lies between a minimum and a maximum. A format check tests that text follows a pattern; patterns are usually written as regular expressions, which lesson 5 introduces. A cross-field check tests a relationship between values in the same row. Referential integrity holds when every reference from one table to another points to a row that exists: an order for customer C77 is broken if the customer table has no C77. The referring column, here customer_id in the orders table, is called a foreign key.
Set membership and referential integrity shade into each other. A short, fixed list, such as three regions, can be written into the rule itself. A list that changes, such as the product catalogue or the customer list, belongs in its own table, and the rule becomes a check that every value exists there.
Hard rules and soft rules
Some rules must hold for logical or physical reasons. Eurostat’s guidance calls them hard (or fatal) edits, and a value that fails one is an error. Others flag values that are possible but suspicious; these are soft (or query) edits, and a failure means “check this”, not “this is wrong”. For Lantern, quantity of at least 1 is a hard rule: an order of −1 packs can’t exist as an order. Quantity of at most 20 is a soft rule: most customers buy one to three packs, so 40 deserves a look, but cafés do buy in bulk. At Harborview, check-out after check-in is hard; a nightly rate above the list price of the most expensive room is soft.
Give every rule a severity and an action. Hard failures are errors to correct or exclude, with the decision recorded; soft failures go to someone who can check them against the source. Neither kind is a reason to delete a row on sight.
Writing good rules
- Testable. “Prices look sensible” is not a rule; “unit_price is a number greater than 0 and at most 100” is.
- One condition per rule, with a name (R1, R2 …), so that a failure report says exactly what failed and where.
- Explicit about blanks. Most rules quietly pass a missing value. In SQL a CHECK constraint is satisfied when its condition is unknown, which is what a comparison with a NULL gives, so
CHECK (quantity >= 1)accepts a blank quantity. Pair each range or format rule with a completeness rule wherever the value is required. - Tolerant where arithmetic is. A cross-field rule on money should allow for rounding: the absolute difference between order_total and quantity × unit_price − discount is at most $0.01.
- Sourced. Note where each rule comes from (the data dictionary, a manager, the laws of arithmetic) so that it can be challenged and updated when the business changes.
Measuring quality
Rules become measurements when you count their failures. A rule’s failure rate is the share of the rows it checks that fail it, and the share of rows failing at least one rule summarises a whole rule set. Report both. “R3 fails on 3 of 10 rows” tells the data owner where to look; a single score such as “the data is mostly clean” tells nobody what to fix. Here is a rule set for the extract, and what it finds:
| Rule | Kind | Severity | Rows that fail | Failure rate |
|---|---|---|---|---|
| R1 order_id is unique | Uniqueness | Hard | both 5007 rows | 2 of 10 (20%) |
| R2 order_date is in May 2026 | Range | Hard | 5009 | 1 of 10 (10%) |
| R3 region is North, South, East, West or Central | Set membership | Hard | 5002, 5006, 5008 | 3 of 10 (30%) |
| R4 quantity is a whole number of at least 1 | Range | Hard | 5005 | 1 of 10 (10%) |
| R5 quantity is at most 20 | Range | Soft | 5007 (first row) | 1 of 10 (10%) |
| R6 unit_price, without its $ sign, is a number above 0 | Type | Hard | 5006 | 1 of 10 (10%) |
| R7 rating is a whole number from 1 to 5 | Range | Hard | 5008 | 1 of 7 rated (14.3%) |
R7 is checked only on the seven rated orders, because blank ratings are allowed. The hard rules record nine failures but only seven rows fail at least one of them, because 5006 and 5008 each fail two.
Two features of that table matter whenever you measure quality. First, the denominator is the rows a rule checks, not all rows: R7 does not apply to blank ratings, which are a matter for completeness. Second, failures can’t simply be added: nine hard failures fall on seven rows, so 70% of the extract fails at least one hard rule, not 90%. Uniqueness can be measured the same way: 9 distinct order_ids among 10 rows is 90%.
Completeness needs the dictionary too. The rating column is 70% filled, but because rating is optional, its blanks are not a defect. A required column with the same 70% would be a serious problem: for email, it would mean three orders whose receipts couldn’t be sent.
Summary statistics need definitions too
Two statistics in a profile can differ between tools. The standard deviation can divide by (the population formula) or by (the sample formula). This course uses , as does pandas by default; NumPy’s std divides by unless told otherwise. Quartiles have several definitions. The site’s tools interpolate linearly between sorted values, like Excel’s QUARTILE.INC and NumPy’s default, which gives a lower quartile of 1 and an upper quartile of 2.75 for the extract’s quantities. A rule that places the upper quartile at position in the sorted list gives 3.25 instead. Neither is wrong; say which you used.
From profile to plan
The output of profiling and validation is not a cleaner dataset. It is an issue list: each problem, the evidence for it, the dimension it affects and a proposed action, with the lesson of this course that handles it. Only when the list is complete do you start changing data, and then in an order that avoids creating new problems: fix types and formats before range checks (a price stored as text can’t be compared with 0), and resolve duplicates before counting anything.
| Issue | Evidence | Dimension | Proposed action | Lesson |
|---|---|---|---|---|
| Two rows for order 5007 | R1; 10 rows, 9 IDs | Uniqueness, consistency | Check the shop’s record of 5007 and keep the true version | 3, duplicates |
| Region in six spellings | Frequency table; R3 | Consistency, validity | Map each variant to the list of regions | 5, text and categories |
| Prices stored as text, one with a decimal comma | Profile type; R6 | Validity | Convert to numbers, reading 22,00 as 22.00 | 4, types and formats |
| Quantity −1 | R4 | Validity | Ask whether negative quantities record returns | This lesson: a question for the data owner |
| Quantity 40 | R5 (soft); mean 5.4 against median 1.5 | Accuracy (suspected) | Confirm with the order record before any analysis | 7, outliers |
| Rating 9 | R7 | Validity | Check the source; if the true rating can’t be found, treat it as missing | 6, missing values |
| Order dated 2025 | R2 | Accuracy (suspected) | Check the order record; correct the year or exclude the order from the period | This lesson: a range rule |
Notice what the list leaves out: the blank ratings. The dictionary allows them, so they are not a defect, although they will matter if you analyse ratings; lesson 6 asks whether customers who don’t rate differ from those who do.
Formulas
Completeness of a column
- Non-blank values on the rows that require one; placeholder codes known to mean “missing” count as blankcount
- Rows on which the data dictionary requires a valuecount
Assumes. The data dictionary says which rows require a value.
For an optional column, report the share filled in instead, and don’t call its blanks defects.
Failure rate of a validation rule
- Rows the rule applies to; blanks in an optional column are left outrows
Report it rule by rule, so that the data owner knows where to look.
Share of rows failing at least one rule
- Each row counted once, however many rules it failsrows
- All rows in the tablerows
Adding the rules’ failure counts overstates the share whenever one row fails several rules.
Uniqueness of a key
- Distinct values of the primary keycount
- Rows in the tablecount
Assumes. The key identifies the real-world thing. Records of the same thing under different keys are not detected; the lesson on duplicates deals with them.
Worked examples
Fictional figures
Eight orders from Lantern’s shop have these values in the required email column: jo.reyes@example.com, a blank, m.chen@example.com, sam.okafor.example.com, a blank, lee@@example.com, “priya n@example.com” (with a space) and t.wong@example.com. The format rule is: exactly one @, at least one character before it, a dot somewhere after it, and no spaces. Measure completeness, the format rule’s failure rate and the share of orders with a usable address.
- Completeness. Email is required on every order, so 8 values should be present; 6 are. Completeness .
- Validity. Apply the format rule to the 6 present values only, because blanks are a completeness problem, not a validity one. sam.okafor.example.com has no @, lee@@example.com has two, and “priya n@example.com” contains a space: 3 fail. Failure rate .
- Combine. 3 of the 8 orders have an address that is both present and valid: .
- Check the limits. The three valid addresses are well formed, not proven correct. A typing error in the name part, such as m.chen for m.cheng, passes every format rule; only an email that reaches its owner tests accuracy.
Answer. Completeness is 75%; 50% of the addresses present fail the format rule; only 3 of the 8 orders (37.5%) have a usable address.
What it means. The two measures point to different fixes. Blanks call for making email compulsory at checkout; malformed addresses call for a format check on the checkout form. Neither fix can prove that the remaining addresses belong to the right customers.
Fictional figures
Harborview applies five rules to the extract below. R1: check_out is after check_in (hard). R2: nights equals the number of days from check_in to check_out (hard). R3: rate is above 0 (hard). R4: rate is at most $500, the list price of the most expensive room (soft). R5: booking_id is unique (hard). Which rows fail which rules, what share of rows fail at least one hard rule, and what is the likely story behind each failure?
| booking_id | check_in | check_out | nights | rate ($) |
|---|---|---|---|---|
| HB-35201 | 2026-08-03 | 2026-08-05 | 2 | 180 |
| HB-35202 | 2026-08-03 | 2026-08-06 | 2 | 165 |
| HB-35203 | 2026-08-04 | 2026-08-02 | 2 | 210 |
| HB-35204 | 2026-08-04 | 2026-08-07 | 3 | 0 |
| HB-35205 | 2026-08-05 | 2026-08-06 | 1 | 9999 |
| HB-35206 | 2026-08-05 | 2026-08-08 | 3 | 175 |
| HB-35202 | 2026-08-03 | 2026-08-06 | 3 | 165 |
| HB-35207 | 2026-08-30 | 2026-09-02 | 3 | 640 |
- Work out the days between the dates for every row: 2, 3, −2, 3, 1, 3, 3 and 3. HB-35207 crosses a month end: the nights of 30 August, 31 August and 1 September make 3.
- R1 fails only HB-35203, whose check-out comes 2 days before its check-in. R2 fails the first HB-35202 row (2 nights recorded, 3 days between the dates) and HB-35203 (2 recorded, −2 days).
- R3 fails HB-35204, at $0. The soft rule R4 flags HB-35205 at $9,999 and HB-35207 at $640.
- R5 fails both HB-35202 rows.
- Tally the hard rules: failures (R1, R2, R3 and R5), falling on 4 rows (both HB-35202 rows, HB-35203 and HB-35204), because the first HB-35202 row and HB-35203 each fail two. Share failing at least one hard rule: . Two more rows fail only the soft rule, and two pass everything.
- Judge each failure. HB-35203’s dates are probably swapped: reversed, they give 2 nights, matching the nights column. The two HB-35202 rows look like an old and an updated version of one booking from a channel-manager sync, and only the second is internally consistent. $0 may be a complimentary stay or a missing rate, and $9,999 looks like a placeholder: both need the source system. $640 is above the list price but possible (a package, an event night), so it is a question, not an error.
Answer. Four of the eight rows (50%) fail at least one hard rule, with six hard failures between them; two more fail only the soft rate limit; two pass everything.
What it means. The tally tells the hotel how big the problem is; the row-by-row judgements tell it what to do next. Almost every failure has a likely explanation that someone can confirm, which is why the output of validation is a list of questions, not a list of deletions.
Fictional figures
Back to Ana’s request for the average packs per order in May 2026. Four issues in the extract touch quantity: the two rows for order 5007, the 40-pack row, the −1 and the order dated 2025. You check each with Ana and the shop’s order records and learn that order 5007 was placed once, for 4 packs (the 40 was a typing error corrected in the shop the same day, but the export kept both versions); 5005 is a returned pack recorded as a negative order; and 5009 really was placed in May 2025 and was swept into the export by mistake. What should you report?
- Prioritise by the question. Packs per order depends on quantity and on which rows are orders in the period. The region spellings, the prices stored as text and the rating of 9 don’t affect it, so they can wait.
- Apply the answers and record each decision: keep one row for 5007, with 4 packs; leave out 5005, because a return is not an order (it belongs in a returns analysis); leave out 5009, because it falls outside the period.
- Seven orders remain, with 2, 1, 1, 3, 1, 4 and 2 packs: 14 packs in all. Mean: packs per order. Median: the middle of 1, 1, 1, 2, 2, 3, 4 is 2.
- Compare with the unchecked figure of 5.4 packs per order: it is times too high.
Answer. About 2 packs per order (mean 2.0 and median 2, from the seven valid May 2026 orders in the extract), not 5.4.
What it means. Checking four values changed the answer by a factor of 2.7. The report should give the figure with a short note of what was excluded and why; that note is the start of the cleaning log that lesson 12 formalises.
Explore
Common mistakes
“Start cleaning with whatever looks wrong.”
Fixing values before profiling the whole dataset means fixing symptoms one at a time, in an order that can create new errors, and sometimes “fixing” values that were right, such as a genuine bulk order. Profile every column first, write the issue list, then change data in a deliberate order.
“It passed validation, so it’s correct.”
Rules test validity, not accuracy. A quantity of 3 when the customer ordered 2, a check-in date typed as the 12th instead of the 21st, a well-formed email belonging to someone else: all pass. Only a comparison with the source or the real world catches them.
“A range rule also catches missing values.”
Most rules quietly pass blanks; an SQL CHECK constraint is satisfied when its condition is unknown, as it is for a NULL. Write a separate completeness rule for every required column.
“Rows that fail a rule should be deleted.”
A failure is evidence, not a verdict. Soft rules flag values that may be genuine, and even hard failures often have a recoverable true value (swapped dates, a decimal comma). Deleting rows can also bias the result, as the lesson on missing values shows. Flag, investigate, decide and record.
“Blanks are the only missing values.”
Placeholders such as 0, 9999, “n/a” and “unknown” fill a cell without supplying a value, so a column can look complete while hiding missing data. Count them during profiling. Conversely, a blank in an optional column, such as rating, is not a defect.
“Add up the failures to find the bad rows.”
One row can fail several rules, so failure counts overstate the number of problem rows. In the extract, nine hard failures fall on seven rows. Count rows failing at least one rule separately.
Guided practice
Work through these with hints when you need them. Every hint and every worked solution is there to be used.
Loading four questions…
On your own
No hints this time. Answer, check, and read the feedback; the solution appears once you have answered or if you ask for it. Your first answers count toward mastery.
Loading six questions…
In practice
Validation is most valuable when it runs automatically and early. Databases can enforce some rules at the moment data is written: PostgreSQL, for example, supports NOT NULL, UNIQUE and CHECK constraints (a CHECK can compare columns of the same row, such as CHECK (check_out > check_in)), primary keys and foreign keys, and it rejects any row that breaks them. Rules that need judgement, or data from several systems, are applied in the data pipeline each time a file arrives, with failing rows sent to a quarantine table for review instead of flowing into reports.
Harborview’s revenue manager (fictional) reports the average rate per room-night every Monday, and the channel-manager sync occasionally sends placeholder rates of 0 and 9,999. In a week with 300 room-nights sold at an average of $150, a single two-night booking carrying 9,999 raises the reported average to dollars, an overstatement of 43% that could prompt a price rise nobody intended. Two rules prevent it: rate above 0 as a hard rule (unless the booking is marked complimentary, which the data dictionary should say) and rate no higher than the most expensive room’s list price as a soft rule. The report runs only on rows that pass, with the failures listed beneath it.
Rules also work as an early-warning system when you track their failure rates over time. An online clothing brand (fictional) checks every day’s returns against the rule that a refund is no more than the price paid. For months the rule fails on a handful of returns a week; then, one Monday, it fails on a large share of them. Nothing is wrong with the returns: the brand’s new app has started including the delivery charge in the refund. That change of meaning would have silently inflated the returns figures if nobody had been watching the rule.
In each case the rules are cheap to write and to run. What makes them valuable is the discipline around them: a severity for every rule, a person who owns each failure, and a record of every decision taken because of one.
Knowledge check
Six questions, one attempt each, no hints. Score 80% or more to complete the lesson; you can take it again at any time.
Loading six questions…
Summary
- Profile before you change anything: shape, types, blanks, distinct counts, ranges, summary statistics, frequency tables, cross-checks and the extremes of each sorted column.
- A profile shows where to look, not what is true: a suspicious value may be an error or a genuine event.
- Six commonly used quality dimensions (DAMA UK, 2013): completeness, validity, accuracy, consistency, uniqueness and timeliness. Other frameworks divide quality differently.
- Validity is not accuracy: rules can prove a value impossible; only the real world can prove it right.
- Validation rules test type, range, set membership, format, uniqueness, completeness, cross-field relationships and referential integrity. Make each one testable, named and explicit about blanks, and give it a severity: hard for errors, soft for values to check.
- Completeness = values present ÷ values required. A rule’s failure rate = failing rows ÷ rows checked. One row can fail several rules, so failure counts don’t add up to problem rows.
- The output is an issue list and a plan, prioritised by the decision the data must support. Keep the original data unchanged and record every decision.
Key formulas
- Completeness of a column
- Failure rate of a validation rule
- Share of rows failing at least one rule
- Uniqueness of a key
Terms introduced
- Data profiling
- Systematically describing what a dataset contains (types, blanks, distinct values, ranges, distributions and relationships between columns) before using or changing it.
- Data quality dimension
- One aspect of data quality that can be assessed and measured on its own, such as completeness or validity.
- Completeness
- The proportion of values present out of those that should be present.
- Validity
- Whether values conform to their definition: the right type, format and range, and a member of the allowed set.
- Accuracy
- Whether values correctly describe the real-world thing or event they represent.
- Consistency
- Whether the same thing is represented the same way wherever it appears, within a dataset and across datasets.
- Uniqueness
- Whether each real-world thing is recorded only once.
- Timeliness
- Whether data represents reality at the point in time it is needed and is up to date.
- Validation rule
- A precisely stated condition that a value, a row or a set of rows must satisfy, written so that a computer can test it.
- Range check
- A validation rule that a value lies between a minimum and a maximum.
- Format check
- A validation rule that a text value follows a pattern, such as an email address containing exactly one @.
- Referential integrity
- The condition that every reference from one table to another (a foreign key) points to a row that exists.
- Cross-field check
- A validation rule that tests a relationship between values in the same row, such as check-out falling after check-in.
Sources
- DAMA UK Working Group on “Data Quality Dimensions” (2013). The Six Primary Dimensions for Data Quality Assessment. White paper, October 2013.
- Government Data Quality Hub (2020). The Government Data Quality Framework. GOV.UK, published 3 December 2020. gov.uk/government/publications/the-government-data-quality-f…
- Abedjan, Z., Golab, L. & Naumann, F. (2015). Profiling relational data: a survey. The VLDB Journal, 24(4), 557–581. dspace.mit.edu/handle/1721.1/106176
- Eurostat, CROS portal. Validation in the ESS: “Definitions” (drawing on the ESS Handbook on Methodology for Data Validation). cros.ec.europa.eu/book-page/definitions
- ISO/IEC 25012:2008. Software engineering — Software product Quality Requirements and Evaluation (SQuaRE) — Data quality model. International Organization for Standardization. iso.org/standard/35736.html
- The PostgreSQL Global Development Group. PostgreSQL 18 Documentation, section 5.5, “Constraints”. postgresql.org/docs/current/ddl-constraints.html
