In terms of ICT, data is simply any numbers, letters or symbols that can be entered into a computer system. Data is a collection of facts, such as values or measurements.Information that is either digital or analogue and can be manipulated to produce a result.”
Data can exist in many forms. For example:
- Text (letters/words)
- Numbers (whole numbers, decimals, currency)
There are two main categories of data:
- Digital Data – Data that is stored and manipulated on a computer.
- Analogue Data – Data which is gathered without a computer.
Digital data is often stored in a database. Databases allow for easy access and searching of the data.
- Boolean (True/False) – sometimes also called ‘logical’
- Numeric (Numbers)
- Currency (Money)
Boolean data can only have one of two values – true or false.
Booleans are used when there are only two possible responses to a question. Examples of responses that can be stored as a boolean are:
NOTE! Booleans can also be shown using tick boxes:
- A tick means ON
- No tick means OFF
# Text data is used for data that is made up of letters only.
For example:- a password using the word ‘JUPITER’ would be regarded as text.
# Alphanumeric data is used for data that is made up of letters AND numbers.
For example:- a password of ‘JUPITER123’ would be regarded as alphanumeric.
# Integers are made up of whole numbers (numbers without decimals).
# Integers can be both positive and negative values.
For example:- the number 123 is an integer. -123 is also an integer.
# Real numbers are those that include decimals.
# Real numbers can be both positive (above zero) and negative (below zero).
For example:- the number 33.5 is a real number. -33.5 is also a real number.
# Currency values that use decimals are usually shown to 2 decimal places.
For example:- £19.99 is a typical use of the currency value in England.
# Currency values can be both positive (above zero) or negative (below zero)
# Percentage numbers are real numbers (decimals) that have been formatted to show values out of 100. For example:
# Percentage are usually shown with the percentage symbol (%).
# Percentage values can be positive and negative.
Date and Time Data
# Date and Time data can be shown in many different ways.
The most common ways are shown in the table below:
Difference Between Data & Information
Facts, statistics used for reference or analysis.
Numbers, characters, symbols, images etc., which can be processed by a computer.
Data must be interpreted, by a human or machine, to derive meaning
“Data is a representation of information” *
Latin ‘datum’ meaning “that which is given”
Data plural, datum singular (M150 adopts the general use of data as singular. Not everyone agrees.)
Knowledge derived from study, experience (by the senses), or instruction.
Communication of intelligence.
“Information is any kind of knowledge that is exchangeable amongst people, about things, facts, concepts, etc., in some context.”
“Information is interpreted data”
What is database?
Databases are designed to offer an organized mechanism for storing, managing and retrieving information. They do so through the use of tables.
In order for a database to be truly functional, it must not only store large amounts of records well, but be accessed easily. In addition, new information and changes should also be fairly easy to input.
Lets take the example of a phone book. The phone book contains several items of information – name, address and phone number – about each phone subscriber in a particular area. Each subscriber’s information takes the same form.
What is a table?
A single store of related information. A table consists of records, and each record is made up of a number of fields
Database files are viewed as tables. The medical patients database is holding its data in a table. Lets have another look at it.
The patients table is made up of 8 columns and 5 rows. Column headings are known as fields and one complete row is a full record of data
What Is a record?
A table consists of records, and each record is made up of a number of fields. A record contains all the information about a single ‘member’ of a table.
What is a field?
Fields describe a single aspect of each member of a table. A student record, for instance, might contains a last name field, a first name field, a date of birth field and so on.
Each cell of a table indicates a single field. A single field can hold one piece of data.
Fields are given field names so we know what kind of data they hold. Field names are found at the top of each column.
For example:- I have highlighted in green all of the field names in the patient database and in red a single field holding individual data:
What is a Key Field?
Keys are crucial to a table structure for many reasons, some of which are identified below:
They ensure that each record in a table is precisely identified.
They help establish and enforce various types of integrity.
They serve to establish table relationships.
Key fields are used to differentiate one record from another
For example:- In our patients database the key field is the Patient Id. Every patient has a different Id Number. This is vital so we can identify each patient uniquely and correctly. Imagine if the doctor mixed two patients up and gave them the wrong medicine!!
Primary key will uniquely identify each record. It may or may not provide information about the record it identifies. It must not be Null-able, that is if it exists in a record it cannot have the value Null. It must be unique. It cannot be changed.
What is a foreign key and what are they used for?
A foreign key is a regular field in one table which is being used as the key field in another table.
Foreign keys are used to provide the link (relationship) between the tables.
In our patient database, Patient Id is a key field in the Doctor Table but is also being used in the Patient Table as a foreign key:
The foreign key (Doctor Id in the patient table) can then be used to match to the primary key (Doctor Id in the doctor table) and share the correct data.
For example:- A patient with a Doctor Id of 01 will be automatically assigned to Doctor Hyde and Room 03.
Now that we have linked our two tables we can update our doctor information very quickly.
For example: If Dr Hyde changed his room number to 02, we only need to change this information once in the doctor table. The new room would automatically be assigned to every patient who was under the care of Dr Hyde.
Types of Database
There are two main types of computer databases:
A ‘flat-file‘ database is one that only contains a single table of data
They are only suitable for very simple databases.
The patient database is an example of a flat-file as all of the information is stored in one single table:
LIMITATION OF FLAT DATABASE
- Duplicated Data is often unnecessarily entered.
- Database space is wasted with this duplicated data.
- Duplicated Data takes a long time to enter and update (unnecessarily).
A ‘relational‘ database is one that contains two or more tables of data, connected by links called relationships.
Relational Databases do not store all the data in the same table.
Repeated data is moved into it’s own table as shown in the image below:
Benefits of using a Relational Database
The advantages of using a relational database instead of a flat-file database are as follows:
- Duplicated Data is reduced.
- Database space is not wasted (due to unnecessary duplicated data.
- Quicker to enter Data as there are less duplicates.
- Quicker to update Data