TOPIC 1: MANAGEMENT OF DATABASE INFORMATION SYSTEM – COMPUTER NOTES FORM FOUR
Updating Database
The Record in an Existing Database
Search a Record in an Existing Database
- You use update queries to add, change, or delete part (but not all) of one or more existing records. You can think of update queries as a powerful form of the Find and Replace dialog box. You enter a select criterion (the rough equivalent of a search string) and an update criterion (the rough equivalent of a replacement string). Unlike the dialog box, update queries can accept multiple criteria, allow you to update a large number of records in one pass, and allow you to change records in more than one table.–Remember that you cannot use update queries to add entire records. To do that, you use an append query.
Use Data Collection to update records
- Use the Find and Replace dialog box to change data
- The Find and Replace dialog box provides another way to change small amounts of data in less time and with less effort.
- When you enter text in the Search box, the first matching value is highlighted in real time as you enter each character. You can use this feature to quickly search for a record with a matching value.You can also search for a specific record in a table or form by using the Find option.

- Open the table or form, and then click the field that you want to search.
- On the Home tab, in the Find group, click Find.
- The Find and Replace dialog box appears, with the Find tab selected.

- In the Find What box, type the value for which you want to search.
- To change the field that you want to search or to search the entire underlying table, click the appropriate option in the Look In list.
- Tip: The Match list represents your comparison operator (such as “equals” or “contains”). To broaden your search, in the Match list, click Any Part of Field.
- In the Search list, select all, and then click Find Next.
- When the item for which you are searching is highlighted, click Cancel in the Find and Replace dialog box to close the dialog box. Records that match your conditions are highlighted
Query Database Using Logical Operators
- Select query
- An action query
- Update-update data in a table
- Append Query-add data in a table from one or more tables.
- Make table Query-Creates a new table from a dynaset
- Delete query-Delete specified records from one or more tables
Select Query Is a type of query used for searching and analyzing data in one or more tables. It lets the user specify the search criteria and the records that meet those criteria displayed in a dynaset or analyzed depending on the user requirement.
- Ensure that the database you want to create a query for is open
- Click the query tab, then new
- In the new query dialog box, choose either to create a query from in designing view or using Wizard
- To design from scratch, click design view. The show table dialog box appears from which you can add a table or tables you wish to create in a query form.
- Click the table from the query list and then click add
- Click close to close the show table dialog box.
- The query design grid opens. In Microsoft Access it is called query example (Q.BE)
- To search for a particular set of records, you have to enter a conditional statement or statements in the criteria.Example:If you have a table called employees with one of fields as salary, you can display all the employees earning more than shs.5000 by typing > 5000 in the criteria row, salary column.
- To define criteria, use either relational or logical operations, Relational operators include
- Less than <
- Greater than >
- Greater than or equal to >=
- Less than or equal to <=
- Not equal to <>
- Equal to =
- Logical operators include AND, OR and NOT
- AND is used to display values in a specific range.Example: if you type >4000 AND <6000 on criteria row in salary column. All employees who meet this condition will be displayed
- OR is used to display either one of the two values eg: if you wish to get those employees either in Dar es Salaam or Morogoro
- TO Display data in a particular range, use the word between eg in steady of typing >4000 AND >6000, type between 4000 AND 6000
- NOT is used to display all records except that you do not want to see.Eg if you type NOT 8000 in salary column of the employees table. All employees’ records will be displayed except those with the salary 8000.

- Open the desired query in design view
- Position the mouse pointer at the boundary that separates columns, then drag it to the required size. Alternatively, double click the boundary to auto fit cell content.
- Click the save button to save the changes
- To test whether the changes have been affected, click the run button to display the results of the query
Generating Reports
Create Report Layout by Using Design View Mode
- In a database windows, click the reports card then new
- In the new report dialog box, click design view
- Click the name of the table or query you want to generate a report from
- Click the OK button. You will get a report grid where you can place data controls.
- From the view menu, click Field list.
- To design the layout, drag each field from the field list to the layout grid and drop it where you want the data column to appear.
- Once you finish placing controls, click save button
- In the save as dialog box, enter the name of the report and click ok
- To view the report click the print preview button alternatively click print preview from the file menu
- Open the report in design view
- Click the report header or footer you want to modify
- Make the necessary changes and then click modify
- Click the print preview button to view changes
- Open a report in design view.
- Display the field list by clicking the field list button or using the view.
- Select one or more fields in the field list and drag view to the report design view grid.
- Click the control to select it. Position the mouse pointer on the place holder, until the mouse pointer changes to a double sided arrow.
- Drag the pointer to resize the control
- To move a control, select it and placed the mouse pointer on the place holder until it changes to a hand then drag.
Print a Report
- Open the database that contains the report you want to print
- Click the reports tab, select the report you want to print, and then click the preview button
- On the file menu click print
- Set the printer options i.e. the printer type, print range and number of copies.
- Click ok to print.

































Leave a Reply