Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spreadsheets, Modelling & Databases

Similar presentations


Presentation on theme: "Spreadsheets, Modelling & Databases"— Presentation transcript:

1 Spreadsheets, Modelling & Databases
Objectives Understand the basic features of Spreadsheet Software. Understand the basic features of Database Software Understand the need for validation & verification

2 Spreadsheets A spreadsheet package is a general purpose computer package that is designed to perform calculations. A spreadsheet is a table which is divided into rows and columns. Column B Row 7

3 Spreadsheets – Formulae
A formula is used on a spreadsheet to perform a calculation using the numbers in other cells. The result of the calculation is displayed in the cell where the formula has been entered. A simple formula can be used to add, subtract, multiply or divide numbers. To carry out these sorts of calculation symbols are used in a formula: + to add - to subtract * to multiply / to divide

4 Spreadsheets Formulas in spreadsheets Data modelling in spreadsheets

5 Databases A database provides tools to let the user search through the data that has been stored to find particular pieces of information. Data stored in the database must be organised so that the computer can analyse and search it automatically.

6 Databases Data in a database is usually organised into one or more files storing information relevant to the organisation that has created the database. A database keeping information for a doctors surgery may contain the following files :

7 Databases When setting up a database it is usual to define a set of queries which will be used to answer questions from the data in the database. The output that is produced by the database is called a… Report.

8 Databases There are two different types of database package that you are likely to find in a school. They are Flat file databases can only contain one file. Excel Relational databases. Can store more than one file within a database. The files can each have a different structure and relationships (or links) can be created between the files. Queries can answer questions by examining and comparing data in more than one file.

9 Table Design Data entered into a database is stored in files (also known as tables). A table is a collection of records, each of which contains information about one person or thing. The data in the records is separated into fields which each hold just one item of data. Each field is identified by a field name.

10 Table Design Example of a file, records and fields that might be used in a doctors’ surgery to keep information about patients.

11 Table Design To create a Table you need to tell the computer the names of the fields that will be stored in the records in the file. All of the records in a Table must contain the same fields. You will also have to specify what type of data can be stored in each field How much space should be reserved to store the data. Together, this information is known as the structure of the record.

12 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.

13 Field Data Types Each field in a record must have a Field Type
Description Example Data Numeric Numbers only 1545, 1.23, 12303 Alphabetic / Text Letters only hello, Hi, TEST Alphanumeric Letters and numbers robot 23, area 12, WA13 9IJ Boolean / Logical True or false true, yes, false, no Date A date 12/02/98, 1/12/71 Each field in a record must have a Field Type The Field Type refers to the kind of data that can be stored in the field. Only data that matches the type of a field can be stored in a field.

14 Fields Each field in a record has a fixed length. When you create a file you must decide whether the fixed length for each field. Usually one particular field of each record contains an item which is used to identify the record. This field is called the key field. The value in the key field must uniquely identify each record.

15 Coding Sometimes information is coded before it is typed into a database. E.G. Books in a library database Fiction coded as F Non-fiction coded as N Reference coded as R Coding information reduces the amount of storage space required and speeds up the process of typing the information in.

16 Data Entry Put a new record into the database. Add a Record
There are three important operations that you can carry out on data in a database : Add a Record Put a new record into the database. Amend a Record Change the contents of a record that already exists. Delete a Record Remove a record from the database. Sophisticated database packages will let you specify rules that can be used to check data as it is entered. They are known as validation rules.

17 Queries A query (also known as a filter or search) is used to answer a question from the data in a database. When a query is run it produces as output a list of all of the records that match the condition that defined the query.

18 Queries The following condition could be used to search this file to locate all of the patients who see Dr Jones

19 Queries Using More Then One Field
More complicated queries can be created by linking together more than one search condition. This condition can be used to find all of Dr Jones’ patients who have blood type O : Blood Type = "O" AND Doctor = "Dr Jones"

20 Queries Using More Then One Field
The words AND and OR can be used to link two simple conditions together to make a more complicated query. The difference between using AND or OR to join two conditions is : AND : Find only records which match both of the conditions. OR : Find records that match either or both of the conditions.

21 Sorting To sort a database into an order you must specify :
Which field in the database you wish to use to order the records. This will usually be the primary key field. Whether you want the records in ascending (going up) or descending (going down) order.

22 Reports Typically a report will let you specify these things :
Which fields to display. Where to display the fields. The order in which records should be displayed. How records should be grouped together. What statistics you want the database to calculate from the records (e.g. no. of records, average values of fields).

23 Designing a Database Decide what outputs you will want the database to produce - what questions must it answer ? Use the information about the outputs you want to get to decide what tables you need to set up and what fields you will have to put into these tables. What will the key field be for each file ?

24 Designing a Database Decide what type each field should be and whether the fields will be fixed or variable length. Could data be coded to reduce field size ? Design the queries and reports that you will use to get information out of the database.

25 Designing a Database Decide what validation rules to use.
Put some information into the database so that it can be tested. Run the queries and reports to test if the database is operating correctly. Design data collection forms to gather the real information to put into the database.


Download ppt "Spreadsheets, Modelling & Databases"

Similar presentations


Ads by Google