Objectives

Students will be able to:

  • import data from a csv file into a common database application
  • understand that a database table is composed of rows (records) and columns (fields)
  • undertand that fields can have different datatypes eg number, text
  • sort and filter data in the database table
  • possibly create a simple chart.

Valid Data Only Please!

eCabby Recruitment


An eTaxi company is recruiting staff in the age range 18-31. Potential recruits simply visit the company website and fill out the form. The company will send further details about the position at a later date.

Look at the form above. Try using it. What happens if:

  • you don't enter a first name?
  • you enter a number outside the range 18-31?
  • the email address is not an email address?
  • the password is too short or too long?

Yes, that's right! Databases can be programmed to accept valid data only!

Database engineers design data validation rules to help minimise the rick of invalid data entry. Here are some of the kinds of rules that can be designed:

  1. format validation check
  2. presence validation check
  3. length validation check
  4. range validation check
  5. data type validation check

Using the form above, what kind of validation rule has been created for each data entry element?

   Skill-up 1 - Creating validation rules.

Research Data Validation for the database application you are using. Import the file below into your application and create validation rules. Test them by attempting to enter valid and invalid data into the database table.

data file

Be smart! Download the file and save it in a new project folder. Don't leave it in the downloads folder of your computer. You are not a newbie!

   Evidence

In your evidence document, paste a screenshot of each validation rule you designed, along with the name of the rule.

Food For Thought

Data validation is critical in the design of database systems. Imagine if you signed up for Facebook and you were allowed to enter ggg.xxx.3 as your email address! Or 23/10/1843 as your date of birth!

Homework




essential vocabulary

database import evidence table integer screenshot record text field double data type


SUBSCRIBE

Join my mailing list to receive updates on the latest blog posts and other things.