Data types

5. Choose appropriate data types for each field.

6. Set the date as 'medium date'

7. Set the currency to display to 2.dp

Field lengths

Access automatically gives each ‘text’ data type a maximum number of 50 characters that can be entered. This is called the field length.

However, most of your fields will not need that much space, especially since each character allowed takes up one byte of storage space.

Title would usually be ‘Mr’, ‘Mrs’, ‘Miss’ or ‘Ms, so this would only need a maximum of 4 spaces allowed. If you leave the field size set to 50, then you are wasting 46 bytes of storage space for every single record. Multiply that by a large number of records and then multiply that by lots of different fields, that is a lot of wasted storage space which makes your database larger than it needs to be and slower to process data.

Note: Be aware that if you do not set the field length to an appropriate size when you set the table up and then try to reduce the field length at a later date, you may lose some of the data you have entered. i.e. if you have entered an address that has 30 characters and then change the field size to 22, you would lose the last 8 characters in the address. It is better to get the text field sizes set up correctly right at the start.

8. Change the field length for

  • 'name of costume' to 20
  • 'gender' to 6 (because 'female' is the longest option)

 

 
Next Page
 
Next Page



Try these great search terms!

ECDL

ICDL

Database

Office software