Computer Science – 6.2 Data Integrity | e-Consult
6.2 Data Integrity (1 questions)
Login to see all questions.
Click on a question to view the answer
To ensure data integrity for the customer database fields, a combination of data validation and data verification techniques should be employed. Here's a breakdown for each field:
Customer Name
Data Validation:
- Required Field: The customer name field should be mandatory.
- Character Limit: A maximum character length should be enforced to prevent excessively long names.
- Allowed Characters: Only letters, spaces, hyphens, and apostrophes should be allowed. Special characters should be rejected.
Data Verification:
- Spelling Check: Compare the name against a known list of common names to identify potential spelling errors.
- Address Verification (indirect): If the customer address is also stored, compare the name against the address to ensure consistency.
Customer Address
Data Validation:
- Required Field: The address field should be mandatory.
- Format Check: Use a regular expression to ensure the address follows a standard format (e.g., street number, street name, city, postcode).
- Postcode Validation: Verify that the postcode is a valid format for the country.
Data Verification:
- Address Validation Service: Use a third-party service to verify the address against a postal address database. This can identify invalid or non-existent addresses.
- Geographic Verification: Use a mapping service to verify that the address corresponds to a valid location.
Customer Phone Number
Data Validation:
- Format Check: Use a regular expression to ensure the phone number follows a standard format (e.g., (XXX) XXX-XXXX, +CC XXX XXX XXXX).
- Length Check: Enforce a maximum and minimum length for the phone number.
Data Verification:
- Phone Number Validation Service: Use a service to verify that the phone number is a valid and active number.
- Manual Verification: If possible, attempt to call the customer to verify the phone number.