2. Correct database notation

Thinking back to the customer table on the first page, let's have a look at how it should be correctly writen.

Here are the rules which you should follow:

  • The table name should be in capital letters
  • The attributes (field names) should be placed in brackets following the table name. All of the attributes are listed inside the brackets.
  • The attributes should be seperated by a comma
  • The primary key should be underlined
  • The foreign key should be overlined
  • If an attribute contains two or more words, they should be joined together and the start of each word should have a capital letter e.g. telephone number would become TelephoneNumber

So for the customer table on the previous page, the correct database notation would be as follows:

CUSTOMER (CustomerID, Title, Forename, Surname, AddressLine1, AddressLine2, Town, County, Postcode, TelephoneNumber, email)

 

challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Database Notation