What is the **primary goal** of data validation?
To prevent **bad data** from being stored or used in a system.
How does data validation contribute to **data integrity**?
It ensures that the data is **accurate and reliable**, which is crucial for making good decisions.
What is the benefit of **error prevention** in data validation?
It **catches errors early**, before they cause problems in other parts of the system.
How does data validation improve the **user experience**?
It provides **helpful feedback** to users when they enter incorrect data, guiding them to correct it.
What is the role of data validation in **system stability**?
It prevents bad data from **crashing the system** or corrupting databases.
How can data validation enhance **security**?
It can help prevent **malicious data entry**, such as SQL injection attacks.
What are the **four main types** of validation check techniques?
**Data type, range, constraints, and Boolean.**
What does a **data type check** ensure?
It ensures that the data entered is of the **expected data type** (e.g., integer, string).
Give an example of a data type check.
Verifying that an age field contains a **number (integer)** and not text like 'ten'.
What is the purpose of a **range check**?
To ensure a value falls within a **predefined, acceptable range** (e.g., 0 to 100).
Give an example of a range check.
Checking if a person's age is between **0 and 150 years old**.
What is a **constraints check**?
A validation that ensures data input follows **specific, predefined rules or formats**.
Give an example of a constraints check.
Ensuring a username is **at least 6 characters long** or a name is not over 30 characters.
What is a **Boolean check**?
A check that restricts answers to **two possible options**, such as True/False or Yes/No.
Give an example of a Boolean check.
A form asking if a student is present, where the only valid answers are **'Yes' or 'No'**.
What are **post-check actions**?
Actions performed **after a validation check is completed**, based on its success or failure.
What is a common post-check action for **valid data**?
**Accepting the data** and saving it to a database or allowing the process to continue.
What is a common post-check action for **invalid data**?
**Displaying an error message** and prompting the user to correct their input.
Why is it easier to fix bad data **at the source**?
It prevents the incorrect data from causing **errors and inconsistencies** in other parts of the system later on.
What is the general **definition of data validation**?
The process of ensuring that data entered into a system is **correct, relevant, and consistent**.
What does **maintaining data integrity** mean?
Keeping records **clean, accurate, and useful** by filtering out invalid or inconsistent data.
What kind of validation would be used for a test score?
A **range check**, to ensure the score is between 0 and 100.
What are some common uses for range checks besides age or test scores?
**Prices and quantities**, to ensure the data remains realistic and within expected limits.
What kind of constraints can be applied to data?
**Minimum/maximum length**, required characters, and specific formats like email addresses.
Why are **correct data types** essential for computers?
So that they can **process information correctly** and avoid errors.
What is an example of **error handling** for invalid data?
If a user types letters into a numeric field, an error message appears asking for a **valid number**.
What are the **two possible outcomes** of a validation check?
The system either **accepts the valid data** or **prompts for corrections** when errors are detected.
How does data validation help in **making sound decisions**?
By ensuring the data collected is **accurate and trustworthy**.
What is the purpose of **interpreting validation techniques**?
To **analyse and improve** the accuracy and validity of data.
Why is it important to prevent **incorrect data entry**?
To avoid mistakes and ensure **reliable, usable data** in computer systems.