Data Types and Databases
Data Types and Databases
Boolean is data that can only be stored in one of two available values. An
example of this is Yes or No.
Alphanumeric is data in any combination of letters, numbers and
symbols. An example of this is a postcode. It can also be a text/string to
hold telephone numbers.
A real is a number with a decimal place. An example of this could be
18.01
Integers are whole numbers with no decimal places. For example 5.
Dates can be stored in many different forms. In the UK they are
presented likes this DD/MM/YYYY and in the US they are presented like
this MM/DD/YYYY.
Title
Forename
Surname
Height
Eye Colour
Hair Colour
...
Mr
Rowan
Bean
200cm
Brown
Brown
...
Prof.
Enid
Gumby
190cm
Blue
Brown
...
Database Keywords:
A field must contain only one piece of information.
A record is simply a collection of ALL fields relating to ONE object.
When you put records together you form a database table or file.
A field
Forename
Surname
Height
Eye Colour
Hair Colour
ID
Mr
Rowan
Bean
200cm
Brown
Brown
A1245
Mr
Rowan
Bean
190cm
Blue
Brown
B1562
When two attributes are the same, an ID is added on the table a person
can be identified individually. These fields are also known as primary
fields. They are unique to a person and can never be reused when
deleted.