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
...
Currency is software that will automatically add a or $ to data and
include decimal places. For example 22.99.
Images Some databases will allow pictures. For example a photo of a
criminal and their fingerprint on a crime database.
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
The record is the
whole row which
contains information
relating to one
person.
The whole database
table is a file.
Primary Key/Key fields:
Title
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.