Step by Step Databases Second Edition Assignments, Sample Exams and Project Guidelines

Alan Dillon

Gill & Macmillan

ASSIGNMENT 1

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie 1. Which of the following icons starts Microsoft Access? (a) (b) (c) (d) 2. Which of the following is a function of a database? (a) Displaying web pages (b) Storage, retrieval and sorting of records (c) Financial analysis using formulas (d) Editing digital photos 3. Which of the following are advantages of a computerised database over a paper database? (a) Ability to sort records into different orders (b) Ability to retrieve records matching certain conditions (c) Ability to summarise data using the reporting facility (d) All of the above

Step by Step Databases

4

4. Which of the following are disadvantages of a paper database? (a) Retrieval of records is slow (b) Records cannot be sorted into different orders (c) It can only be updated at specified intervals, e.g. annually (d) All of the above 5. Which of the following is a common example of a database? (a) Your ESB bill (b) RTÉ Guide (c) The telephone directory (d) A computer magazine 6. Which of the following companies use databases and the postal system to contact their customers? (a) Amazon.com (b) Reader’s Digest (c) National Car Testing Service (d) All of the above 7.

One of the most important functions of a database is to store data. In order for stored data to be classified as a database, the data must be stored using __________ and ___________. (a) Order, programming (b) Structure, programming (c) Programming, records (d) Structure, order

8. An Access database consists of a number of: (a) Sheets (b) Files (c) Modules (d) Objects

Assignment 1 Review Questions

9. Which of the following buttons should you click to create a new record using a Form? (a) (b) (c) (d) 10. An Access Table consists of a number of rows. These rows are commonly referred to as: (a) Fields (b) Records (c) Forms (d) Reports 11. The main function of a Form is to: (a) Store data (b) Facilitate data entry (c) Retrieve records (d) Summarise records 12. The file extension for an Access database is: (a) .accdb (b) .xlsx (c) .docx (d) .pptx 13. A textbook is not a database even though it stores data in a particular sequence. This is because not every page in a book will have the same: (a) Data (b) Records (c) Structure (d) Information

5

Step by Step Databases

6

14. Access will not let you create a database unless you: (a) Name the database (b) Save the database (c) Create the Table (d) Save the Table 15. An Access database contains four object types. Write down the names of the objects below. (a) ____________________________________________________________________ (b) ____________________________________________________________________ (c) ____________________________________________________________________ (d) ____________________________________________________________________

16. To prevent values from being duplicated in a particular field, you should set that field as the __________ ________. 17. A basic Access Form has two sections. Write the names of these sections below. (a) ____________________________________________________________________ (b) ____________________________________________________________________

18. In form design, each field from the Table is represented by a ___________ and a _________ _______. 19. Which of the following buttons should you click to find a record using a Form? (a) (b) (c) (d)

Assignment 1 Review Questions

20. Which of the following allows you to edit a Form while viewing the record currently displayed in the Form? (a) Form view (b) Layout view (c) Design view (d) Datasheet view

7

ASSIGNMENT 2

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie 1. The function of a query is to: (a) Store data (b) Sort records (c) Retrieve records (d) Summarise records 2. A table is divided into columns. These columns are called: (a) Bytes (b) Fields (c) Records (d) Characters 3. The maximum number of characters that can be entered in a text field is: (a) 50 (b) 100 (c) 155 (d) 255

Assignment 2 Review Questions

4. A database designer has set up the Student Name field in Table design (Figure 2.33). What is wrong with this field?

Figure 2.33 (a) (b) (c) (d)

The field should have been set up as the primary key The field size should have been set to Byte The data type should have been set to Text There is nothing wrong with this field

5. If you forget to name your database, which of the following names will Access use? (a) db1.accdb (b) database1.accdb (c) dbase1.accdb (d) msdb1.accdb 6. The __________ data type is the only data type where the database designer can adjust the field size. 7. The data below is an example of data that will be stored in a database: Peter Murphy, 25 Garden Crescent, Bray, Co. Wicklow How many fields should be used to store this data in a Table? (a) 3 (b) 4 (c) 5 (d) 6

9

Step by Step Databases

10

8. Which of the following is not a valid number type in Access? (a) Byte (b) Integer (c) Short Integer (d) Long Integer 9. Pizza Perfection has added the Cajun Chicken Deluxe to their range of Pizzas. When details of the first order were entered in the Form, the data entry operator was only able to type Cajun Chicken De, as shown in Figure 2.34. Access would not allow her to enter any more letters in the Pizza Type field. What is causing this problem?

Figure 2.34 (a) (b) (c) (d)

The Form has not been linked to the Table The data type of the Pizza Type field has been set to Number instead of Text The Form has been saved incorrectly The field size of the Pizza Type field is too small

10. You want to store a car registration number, such as 09LH3012, in a field. The data type for this field should be set to: (a) Text (b) Number (c) Alpha-numeric (d) Autonumber 11. Query conditions are entered in the: (a) Field row of the Query design grid (b) Sort row of the Query design grid (c) Criteria row of the Query design grid (d) Show row of the Query design grid

Assignment 2 Review Questions

11

12. The field size for a Date/Time field is: (a) 1 byte (b) 2 bytes (c) 4 bytes (d) 8 bytes 13. You want to store the ages of your customers in a Number field. This field size of this field should be set to: (a) Byte (b) Integer (c) Long Integer (d) Single 14. (i) In an Access Table, a Date/Time field can be assigned one of four date formats. List these formats below. (a) (b) (c) (d) (ii) List the three time formats below. (a) (b) (c)

15. A database designer wants to find all trains from Westport using a Query. The design of this Query is shown in Figure 2.35. When he runs this Query, no records are found. What is causing this problem?

Figure 2.35

Step by Step Databases

12

(a) (b) (c) (d)

He entered the condition in the wrong field There is a spelling error in the condition He needs to delete the quotation marks He should have entered the condition in the “or:” line

16. The main function of the Table is to ____________ data. The rows in the Table are called _____________s. The columns in the Table are called _____________s. 17. You need to store phone numbers, e.g. (086) 2096771, in a field. The data type of this field should be set to: (a) Number (B) Autonumber (c) Text (d) Date/Time 18. List two important characteristics that data must have in order to qualify as a database. (a) ____________________________________________________________________ (b) ____________________________________________________________________

19. List four common examples of commercial databases. (a) ____________________________________________________________________ (b) ____________________________________________________________________ (c) ____________________________________________________________________ (d) ____________________________________________________________________

20. Write down the main functions of the database objects listed below. (a) Table: ______________________________________________________________ (b) Query: ____________________________________________________________ (c) Form: ______________________________________________________________ (d) Report: ____________________________________________________________

ASSIGNMENT 3

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie 1. The Form title should be entered in the: (a) Page header (b) Form header (c) Detail section (d) Form footer 2. In the Table displayed in Figure 3.10, which field is the primary key field?

Figure 3.10 (a) (b) (c) (d)

Order Number Date Pizza Type This Table does not have a primary key field

Step by Step Databases

14

3. What is wrong with the Table design shown in Figure 3.11?

Figure 3.11 (a) (b) (c) (d)

The data type for the PPS number should be number There is no primary key defined Employee name is a bad choice of field for the primary key There is nothing wrong with this Table design

4. The default field size for a text field is: (a) 5 bytes (b) 55 bytes (c) 155 bytes (d) 255 bytes 5. List two effects of setting up the Order Number field as the primary key. (a) ____________________________________________________________________ (b) ____________________________________________________________________

6. Write down the field sizes for the data types listed in Table 3.18. Data Type

Field Size

Currency Yes/No Date/Time Number, Byte

Table 3.18

Assignment 3 Review Questions

15

7. Complete the following questions using the data displayed in Figure 3.12.

Figure 3.12 (a) In Table 3.19, write down the Query condition to find all books issued between 07/11/2010 and 14/11/2010 inclusive using the Between logical operator. Field Name

Issue Date

Criteria Table 3.19 (b) In Table 3.20, write down the Query condition to find all books issued between 07/11/2010 and 14/11/2010 inclusive using greater than or equal to and less than or equal to Field Name

Issue Date

Criteria Table 3.20

(c) In Table 3.21, write down the Query condition to find all books except for those written by Julie King. Field Name

Author

Criteria Table 3.21 (d) In Table 3.22, write down the Query condition to find all books issued on or before 10/11/2010. Field Name

Issue Date

Criteria Table 3.22

Step by Step Databases

16

8. Write down the names of the logical operators listed in Table 3.23. Logical Operator

Name

< >= Table 3.23 9. In a Form, each field in the Table is represented by a label and a: (a) Criteria (b) Text box (c) Condition (d) Module 10. In the Form Wizard, you should link the Form to the: (a) Table (b) Query (c) Form (d) Report 11. The ________ contains a list of all the fields in the Table that the Form is linked to. (a) Report (b) Data types (c) Configuration list (d) Field list 12. To enter data in a Form, it must be viewed in: (a) Form view (b) Design view (c) Datasheet view (d) Layout view

Assignment 3 Review Questions

17

13. To ensure that each record can be uniquely identified, you should create a ___________ _____ in the _____________. 14. Fill in the blanks: A database is a collection of ____________. Each ___________ carries out a specific task. The ___________ is responsible for storing data. A _____________ is used to enter data in the _____________. 15. To find specific records in a database, you should create a: (a) Table (b) Query (c) Form (d) Report 16. Which of the following is the same as between 12 and 25? (a) >12 and =12 and 12 and