What is data? Chapter 1 Introduction • This presentation covers the following: – What is data? – What is information? – Representing data – What is knowledge? – Data Types What is data? • Looking at these pieces of data: – – – – 11071984 106.16 CV12BT 94500000 • What do the pieces of data represent? What is data? • Looking at these pieces of data: – – – – 11071984 106.16 CV12BT 94500000 – Birthday? Historic Event? Member ID? – Average score? Distance to something? – Post Code? Licence plate? – Diameter of a planet? Seconds I have lived? • What do the pieces of data represent? What is data? Data The raw facts and figures Structure How the data is presented. Are the numbers actually numbers or should they be read as text? Context An environment where our prior knowledge and understanding can make sense of data. Meaning Data in the correct structure and placed within context. Knowledge The application of information to a solution. Information = Data + Meaning Information = Data + [Structure] + [Context] + Meaning Data representation • Data can be presented in different ways. • Presenting data in different ways has its advantages and disadvantages. • Thinking about the way the data is to be used and who will be using it will help you chose the best way to present the data. Data representation • Text – Advantages: • Clear to understand • Detailed – Disadvantages: • Need to be able to read the text and understand it (different languages) • Can it be read by all ages or is it too confusing for children? • Lots of text takes time to read and may not be suitable. Data representation • Graphics – Advantages: • Good designs can be understood by people who speak different languages. • You can match images to what you can actually see. – Disadvantages: • Some graphics you need to learn in order to understand them (road signs, scientific symbols) • Some graphics/symbols mean different things in different countries. Data representation • Sound – Advantages: • Great for visually impaired people • You don’t need to have ‘line of sight’ • No fixed location required. – Disadvantages: • Large areas will end up distorting the sound. • Usually language based. • May need to learn what different sounds mean (fire alarm, school bell etc) • Need to be able to hear. Data representation • Moving images – Advantages: • No language required • Lots of information can be conveyed • Can be used to show the meaning of the text – Disadvantages: • If you miss the beginning you might not understand the meaning. • May be a problem if sound is also required. Data representation • Graphics – Advantages: • Good designs can be understood by people who speak different languages. • You can match images to what you can actually see. – Disadvantages: • Some graphics you need to learn in order to understand them (road signs, scientific symbols) • Some graphics/symbols mean different things in different countries. Data representation • LED – Advantages: • Can be simple to understand if context is clear. • Can be used in noisy places. • Can allow data to be kept secure. – Disadvantages: • Need to be able to see lights. • May need to know what combinations of lights mean. Take note: • Give three situations where the use of sound to convey information would be appropriate. • Give three situations where the use of text to convey information would be appropriate. • Why are road signs symbols and not text? Data Information: Data Structure Context Meaning 12102005 12/10/2008 UK DATE Date of a hotel booking 31 32 34 32 31 Numbers Celsius Temperatures for the last 5 days in Venice SKBL10 First 2 letters: Type of garment Second 2 letters: Colour Last 2 numbers: Size Shop stock code A black shirt, size 10 1 Selected from a scale of 1-4 How enjoyable was the film? 1Good, 4 – Bad The film was good Take note: • Fill in the following table using the contexts which are given: Data Fish Shop Holiday Website TV programme listing magazine ...you choose one... Structure Context Meaning Take note: • Answer the following questions: – Give a definition of information. – Within the definition of information, what is meant by structure? – Within the definition of information, what is meant by context? – Within the definition of information, what is meant by meaning? – Within the context of a car sales garage, show how data can become information. What is knowledge? • Think of knowledge as the application of information. • For example, – Data: 62, 57 – Information: Driver Standings for Hamilton and Raikkonen, respectively, after Hungarian Grand Prix 2008 – Knowledge: Hamilton is leading the championship. What is knowledge? • As we receive more information our knowledge may change in accordance with what we have learnt. • For example, – Data: 62, 62 – Information: Driver Standings for Hamilton and Raikkonen, respectively, after the following race. – Knowledge: Hamilton and Raikkonen are now tied for the championship. Data Types • It is important to use the correct data types when storing data. • Different data types are selected depending on how you want to use the data and what the represent. • There are five different data types you need to be familiar with: – – – – – Boolean Real Integer Text/String Date/Time Boolean • Essentially, the simplest of all data types. • It can only contain one of two possible values: – – – – True or False, Yes or No, Male or Female Etc • Consider the following examples: – Is the motorway open yet? – Is Hamilton winning the race? – Are you dead? Real • This data type contains numbers with decimal values. • It holds values where precision is important. • Consider the following examples: – Price of bread - £1.20 – Car length – 4.2 metres Integer • Used to store WHOLE numbers only. • It does not allow decimal places to be stored. • Consider the following examples: – Age in years – 24 – Code response – 1 to 4 Text/String • This is any alphanumeric number. • It can contain numbers, symbols, text or a combination of all of them. • Consider the following examples: – – – – – 12345 Mickey Mouse 123GD56 101 ICT Road • Use Text/String if you want to store a number that is not going to be used for any calculation. • A common mistake is to store telephone numbers as an integer, but because numbers start with a zero it is often removed when saved. Date/Time • Depending on the format used, it can save numbers or numbers and text. • Consider the following examples: – 12:45:45 – 1995 – 7th September 2007 • A computer will work out dates using numbers, but we format dates so we can understand them better. Take note: • Within the context, give an example of how each data type could be used: Estate Agency Boolean Real Integer String Date/Time Removal Company School Choosing the correct data type • Its important to select the correct data type because certain processes can only be carried out on certain data types. – Combining text values to create a new string can only be done using the text data type (this is known as concatenation). – Storing a range of numbers, e.g. 1-4, can not be done by Boolean. – Multiplying numbers can not be done using a text data type. Take note: • Using an example, describe the Boolean data type. • Give three examples where the use of an integer data type would be more appropriate than a real data type. • Give two reasons why a telephone number is stored as a text data type.