Word Processing, Spreadsheets, Databases
Computer Studies · WAEC and JAMB · SS2 and SS3
These three packages carry the practical marks in Computer Studies and feed directly into Paper Three. The examiner wants the correct technical word for each feature and the exact syntax of a spreadsheet formula.
What you need to know
- A word processor is application software for creating, editing, formatting, storing and printing text documents. Examples are Microsoft Word, LibreOffice Writer, WordPerfect, WordStar and Google Docs.
- The editing features are insert, delete, cut, copy, paste, undo and redo, and find and replace, which locates every occurrence of a word and substitutes another. The formatting features are font type, size, colour and style such as bold, italic and underline; alignment left, centre, right or justified; line spacing; indentation; bullets and numbering; columns; borders and shading.
- Page-level features are page setup with margins and paper size, orientation as portrait or landscape, header and footer, automatic page numbering, footnotes and endnotes, page break and print preview. Word wrap moves a word to the next line automatically when the current line is full, and WYSIWYG means that the screen shows the document exactly as it will print.
- Mail merge produces many personalised copies of one letter by combining a main document, which carries the fixed text and the merge fields, with a data source, which carries the list of names and addresses. A school uses it to print the same letter to five hundred parents with each parent's name inserted. This is a favourite examination question.
- A spreadsheet is application software that arranges numeric and text data in rows and columns and recalculates automatically when a value changes. Examples are Microsoft Excel, LibreOffice Calc, Lotus 1-2-3 and Google Sheets.
- The vocabulary is precise. A workbook is the whole file; a worksheet is one sheet within it; a column is identified by a letter and a row by a number; a cell is the intersection of a row and a column, and its cell address or reference is the column letter followed by the row number, such as B7. The active cell is the one currently selected, and a range is a block of cells written as A1:A10.
- Every formula begins with an equals sign. The operators are plus, minus, asterisk for multiplication, slash for division and the caret for exponentiation. A formula such as =B2*C2 multiplies the contents of two cells, and the answer updates automatically whenever either cell changes.
- The functions required are =SUM(B2:B10) to add a range, =AVERAGE(B2:B10) for the mean, =MAX and =MIN for the largest and smallest, =COUNT to count cells containing numbers and =COUNTA to count non-empty cells, =COUNTIF(B2:B10,">=50") to count only the cells meeting a condition, =IF(B2>=50,"PASS","FAIL") to test a condition and return one of two results, =VLOOKUP to fetch a value from a table using a key, and =ROUND, =RANK and =SUMIF for rounding, positions and conditional totals.
- Cell referencing decides what happens when a formula is copied. A relative reference such as B2 shifts as the formula is copied down or across. An absolute reference such as $B$2 stays fixed wherever it is copied, which is what you use for a single rate or constant. A mixed reference such as $B2 or B$2 locks only the column or only the row. Dragging the fill handle at the corner of a cell copies the formula down a column.
- Spreadsheets also produce charts, column, bar, line, pie and scatter, and support sorting, filtering and conditional formatting. In a school they are used for computing termly results, class averages and positions, for payroll, for fee records and for stock and budget tracking.
- A database is an organised collection of related data stored so that it can be retrieved, updated and managed efficiently. A database management system is the software that creates and controls it. Examples are Microsoft Access, MySQL, Oracle, Microsoft SQL Server, PostgreSQL and the older dBase and FoxPro.
- The data hierarchy runs bit, character, field, record, file or table, then database. A field is a single item of data such as Surname, and it forms a column. A record is the complete set of fields about one entity, such as everything stored about one student, and it forms a row. A table is a collection of records of the same type.
- A primary key is a field that uniquely identifies each record in a table and may not be duplicated or left empty, for example the admission number. A foreign key is a field in one table that refers to the primary key of another table, and it is what creates the relationship between tables, for example a ClassID in the Students table pointing to the Classes table. Relationships are one-to-one, one-to-many or many-to-many.
- The other objects are the query, which asks the database a question and returns only the records that match, written in SQL or built with query by example; the form, which gives a friendly screen layout for entering and viewing one record at a time; and the report, which arranges selected data for printing. A simple query reads: SELECT Surname, Score FROM Students WHERE Score >= 50 ORDER BY Score DESC. Using a DBMS instead of separate files reduces data redundancy, improves consistency and security, allows controlled sharing and makes backup and recovery systematic.
Key terms
- Mail merge
- A word processing feature that combines a main document with a data source to produce many personalised copies of the same letter.
- Cell address
- The reference identifying a cell in a worksheet, made up of its column letter followed by its row number, such as C14.
- Field
- A single item of data within a record, forming one column of a database table, such as Surname or Date of Birth.
- Record
- A complete set of related fields describing one entity, forming one row of a database table.
- Primary key
- A field that uniquely identifies each record in a table and which may not contain duplicate or empty values.
- Foreign key
- A field in one table that refers to the primary key of another table, thereby linking the two tables.
- Query
- A request to a database to retrieve, filter, sort or modify records that satisfy stated conditions.
Formulae
Every spreadsheet formula begins with = ; operators are + - * / and ^=SUM(B2:B6) adds a range; =AVERAGE(B2:B6) gives the mean; =MAX(B2:B6) and =MIN(B2:B6) give the largest and smallest=COUNT(B2:B6) counts numeric cells; =COUNTA(B2:B6) counts non-empty cells; =COUNTIF(B2:B6,">=50") counts cells meeting a condition=IF(condition, value_if_true, value_if_false) e.g. =IF(B2>=50,"PASS","FAIL")=VLOOKUP(lookup_value, table_range, column_number, FALSE) fetches a value from a table using a keyRelative reference B2 shifts when copied; absolute reference $B$2 stays fixed; mixed references $B2 and B$2 lock one part onlyData hierarchy: bit, character, field, record, file or table, database
Worked examples
The scores of five students are in cells B2 to B6 as 45, 62, 78, 51 and 38. Write the formula for the total, the formula for the average, the formula in C2 that prints PASS for 50 and above and FAIL otherwise, and the formula that counts how many passed. State the value each returns. (10 marks)
- For the total, use SUM over the range: =SUM(B2:B6). Adding 45 + 62 + 78 + 51 + 38 gives 274.
- For the average, use AVERAGE over the same range: =AVERAGE(B2:B6). That is 274 divided by 5, which is 54.8.
- For the pass or fail, use IF with the condition on the cell in the same row: =IF(B2>=50,"PASS","FAIL"). Since B2 holds 45, which is below 50, it returns FAIL.
- For the count of passes, use COUNTIF with the condition in quotation marks: =COUNTIF(B2:B6,">=50"). The scores 62, 78 and 51 qualify, so it returns 3.
- Remember that the formula in C2 is dragged down with the fill handle so that B2 becomes B3, B4 and so on, because the reference is relative.
Answer: =SUM(B2:B6) returns 274. =AVERAGE(B2:B6) returns 54.8. =IF(B2>=50,"PASS","FAIL") returns FAIL for B2. =COUNTIF(B2:B6,">=50") returns 3.
A school keeps a Students table and a Classes table. Explain the role of a primary key and a foreign key in linking them, and name three database objects apart from the table. (8 marks)
- Define the primary key by what it guarantees: uniqueness within its own table.
- Define the foreign key by what it points at: the primary key of the other table.
- Apply both to the named tables so the answer is about this school and not about databases in general.
- For the objects, name the query, the form and the report, and give the purpose of each.
Answer: The primary key of the Students table, for example AdmissionNumber, uniquely identifies each student record and cannot be duplicated or left empty. The Classes table has its own primary key, for example ClassID. A ClassID field placed in the Students table is a foreign key: it holds a value that already exists as a primary key in the Classes table, and it is this correspondence that links each student to exactly one class while allowing one class to contain many students. The other objects are the query, which retrieves only the records satisfying a stated condition; the form, which provides a screen layout for entering and viewing one record at a time; and the report, which arranges selected data in a formatted layout for printing.
The mistake to avoid
Spreadsheet formulas are written without the equals sign, or with the range separated by a comma instead of a colon, so SUM(B2 B6) and =SUM(B2,B6) appear in place of =SUM(B2:B6). The colon means through, the comma means and, and the equals sign is what tells the program this is a formula at all. In databases, candidates swap field and record: the field is the column, the record is the row.
In the exam
Write spreadsheet formulas exactly, with the equals sign, the colon in the range and the quotation marks around text results in an IF. Marks are lost for syntax even when the thinking is right. Where a question gives data and asks for a value, state both the formula and the figure it returns. For database questions, use the formal words field, record, table, primary key, foreign key, query, form and report rather than column, row and list.