Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Types and Storing Data

Similar presentations


Presentation on theme: "Data Types and Storing Data"— Presentation transcript:

1 Data Types and Storing Data
Objectives: Understand the different data types and their uses. Understand the terms File, Record, Field & Key Field Be able to identify which data types to use for a given situation. Gain an overview of the construction of Data files. Understand the basic construction of questionnaires

2 Database construction - A reminder
File or table(s) Record Field name

3 Table Design Field Record Table
A single item of data stored in a database such as age or car registration number. Each field is identified by a field name. Record A record is all of the information that is stored about a person or thing. Table A collection of records, each of which has the same structure.

4 Types of Data Text Numeric Date/Time Boolean
Allows input of any letter, number, space, punctuation mark or special character like £ % & etc. Cannot do calculations with numbers stored as text. Numeric Can only be numbers. Can be whole or decimal. Can be formatted eg formatted to two decimal places = , formatted to currency = £ Date/Time Must only have days, months years and time format. Can be different layouts eg dd/mm/yy or dd/mm/yyyy Boolean Can only have two values; true or false (eg Yes/No)

5 Types of Data When setting up a database of pupil records which fields could we decide to use? Pupil registration number Forename Surname DOB House Number Street Name Town County Postcode Phone number School Meals What data types will we need to set for each field? Pupil registration number Numerical Forename Text Surname Text DOB Date House Number Number/Text if house name Street Name Text Town Text County Text Postcode Text School Meals Boolean

6 Types of Data Pupil No Forename Surname DOB Postcode School Meals 23
Alice Brown 14/12/89 WG12 3BR Yes 29 Molly Reece 12/09/88 WG12 4XV 54 Brian Trimble 05/05/90 NE1 34Z No 77 Vivien Jones 07/06/90 NE7 33X 88 Peter Martinez 08/04/90 NE8 44Q What data type do we use for date of birth? For Postcode? For School meals? How many fields are there in a pupil record? Which fields make up a pupil record? What is the date of birth of Brian Trimble? How many records are there in the file?

7 Storing Data One of the most important uses of computers is for storing and analysing data. For the computer to give you accurate information, you first have to input accurate data. GIGO Garbage In Garbage Out A questionnaire is simply a list of questions on a topic. The questions can be printed on a form to fill in, or an interviewee can ask the questions and fill in the answers. Whichever method you use you must think carefully about the questions you ask. Designing questions to find out precisely the information you need is an important skill.

8 Collecting Data - Methods
Observation The best method to use if you want precise numbers. Interviewing The best method to use if you want a wide range of ideas and comments. Questionnaires A good way of collecting data when you are trying to find out facts that require no additional explanation. You want to find out how many people visit a certain shop each day. If you ask the staff they will probably not be able to give an accurate figure as they will have been too busy working to count their customers. In this case observation would be a better way of collecting the data – sitting outside the shop and noting the number of people entering it. You want to prepare a report for your head teacher on how life at school could be improved. Interviewing pupils in groups, to see what ideas they come up with, could be the most effective way of collecting data for this. You are doing some market research for the school tuck shop. You want to know how often pupils use the tuck shop, how much they usually spend, and the items they buy most often. Getting every pupil to fill in a questionnaire would be a good way to do this.

9 Collecting Data For each situation decide whether a questionnaire, observation or an interview would be the best way of collecting the data. Finding out customers’ opinions about the taste of a new dessert. Logging the number of lorries that pass the entrance to a primary school. Collecting information about sporting activities. Collecting ideas from pupils for fund-raising events. Recording the number of males and females buying clothes from a store and collecting data about their purchases. Finding out whether a person is the best candidate for a job.

10 Designing a Questionnaire
Decide what you want to know. Decide who you will give the questionnaire to. Write the first draft of your questions. This process also forms the basis of designing interview and observation techniques. It is important to have a clear picture of what you would like to know before you begin to create your questionnaire. This helps you to write questions that will give you that information. Your target audience determines how you will write the questions. EG if you questionnaire is only for pupils at your school, asking whether they are married or single is not appropriate.

11 Writing the Questions What is your name? How old are you?
What are your hobbies? How often do you play sports? When were you born? How much do you spend on leisure activities each week? Which school do you attend? What are your favourite leisure activities? The leisure and tourism department of the local council want to find out what types of leisure facilities local people would be likely to use. They decide to send a questionnaire to every adult and school-age child in the town. Above is a draft of the questions. It is very difficult to write perfect questions on the first attempt. Once you have written the questions you can look at the draft critically and make any changes needed. Can you see any ways that you would change these questions? Do we really need to know the person’s name, people might give more honest answers if they were anonymous. Q2 and Q5 are asking the same thing. We don’t need precise ages and people might be embarrassed to give their age. Give boxes to tick eg Under 10, 10-17, 18-30, 31-50, over 50 People could give the same answers to Q 3 and Q8. Also, they are very open questions and we could get very long answers. We could ask them to list up to 3 hobbies. For Q8 we could give them a list and ask them to rank in order of preference. Q4 is open-ended – might exaggerate to make them appear fitter. Q6 unlikely to know an exact figure – give options eg 0-£5, £6-£10 etc Q7 not relevant, adults don’t attend school. Q9 biased. It encourages people to answer YES.

12 Things to Remember When Writing Questions
Avoid asking the same thing twice. Avoid sensitive or embarrassing questions. How easy is it to answer the question. Give boxes to tick, where appropriate. For quantities, how accurate do the answers need to be? Should the question be open or closed? Restrict the range of possible answers by giving a list. Use ranking to find out people’s preferences. Avoid biased questions.

13 The Final Version Questionnaires should be neatly produced with no typing or spelling errors. There should be a short introduction explaining who the questionnaire is for and why they want the information. Use a different typeface for this so it stands out from the questions on the sheet. The questionnaire should be as short as possible, so you don’t waste people’s time.

14 The Final Version Cont …
The order of the questions is important. Start with closed questions that are easy to answer. Next ask any more-complex questions Finally ask more personal questions. This way people are more likely to complete your questionnaire. Provide enough space for the answers. Add a note at the bottom of the questionnaire to say thank you. Always be polite – you never know when you will need to ask them again.

15 The Final Version Cont…
Finally, give your questionnaire to a friend to complete. What do you think? Does anything distract you? Are the questions clear?

16 Questions Reword these questions so that they can be answered as accurately as possible: How old is your eldest child? How much frozen food do you buy from the supermarket? How many miles do you walk every week? Do you wash as well as cook at home? In which age category are you? Teenager/Middle aged/Pensioner Explain what we mean by a ‘closed’ question. Why do you think closed questions make people feel more comfortable at the start of a questionnaire?


Download ppt "Data Types and Storing Data"

Similar presentations


Ads by Google