Rory's Data

Having considered how he needs the contact data to be separated into tables and validated, his data structure consists of three tables as shown below.

Rory's Data

After considering his validation options, he makes the following decisions.

Person

  • First_name and last_name should not be empty.
  • Email should be a valid email address (matches regular expression) and unique to this person.
  • Gender should be set to "M " or "F".
  • Address_id and company_id should reference records in the appropriate tables.

Company

  • must have a name

Address

  • must have a street_1 entry
  • must have a valid post_code (regular expression match)
  • street_1 + post_code must be valid on creation of the address

A single regular expression is to be used to check and reformat telephone numbers.

Rory is now ready to start the practical steps of building his application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.176.80