Step by Step Databases - Gill€¦ · 6 Step by Step Databases. 20. Which of the following allows...

83
Step by Step Databases Second Edition Assignments, Sample Exams and Project Guidelines Alan Dillon Gill & Macmillan

Transcript of Step by Step Databases - Gill€¦ · 6 Step by Step Databases. 20. Which of the following allows...

Step by StepDatabases

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 paperdatabase?

(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

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 contacttheir 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 forstored 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

Step by Step Databases4

9. Which of the following buttons should you click to create a new record using aForm?

(a)

(b)

(c)

(d)

10. An Access Table consists of a number of rows. These rows are commonly referredto 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. Thisis because not every page in a book will have the same:

(a) Data

(b) Records

(c) Structure

(d) Information

Assignment 1 Review Questions 5

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

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

16. To prevent values from being duplicated in a particular field, you should set that fieldas 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)

Step by Step Databases6

20. Which of the following allows you to edit a Form while viewing the record currentlydisplayed in the Form?

(a) Form view

(b) Layout view

(c) Design view

(d) Datasheet view

Assignment 1 Review Questions 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

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) The field should have been set up as the primary key

(b) The field size should have been set to Byte

(c) The data type should have been set to Text

(d) 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 canadjust 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

Assignment 2 Review Questions 9

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. Whendetails of the first order were entered in the Form, the data entry operator was onlyable to type Cajun Chicken De, as shown in Figure 2.34. Access would not allowher to enter any more letters in the Pizza Type field. What is causing this problem?

Figure 2.34

(a) The Form has not been linked to the Table

(b) The data type of the Pizza Type field has been set to Number instead of Text

(c) The Form has been saved incorrectly

(d) 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 datatype 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

Step by Step Databases10

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 thisfield 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 wantsto find all trains fromWestport using a Query. Thedesign of this Query isshown in Figure 2.35. Whenhe runs this Query, norecords are found. What iscausing this problem?

Figure 2.35

Assignment 2 Review Questions 11

(a) He entered the condition in the wrong field

(b) There is a spelling error in the condition

(c) He needs to delete the quotation marks

(d) 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 arecalled _____________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 ofthis 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 adatabase.

(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: ____________________________________________________________

Step by Step Databases12

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) Order Number

(b) Date

(c) Pizza Type

(d) This Table does not have a primary key field

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

Figure 3.11

(a) The data type for the PPS number should be number

(b) There is no primary key defined

(c) Employee name is a bad choice of field for the primary key

(d) 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

Step by Step Databases14

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 between07/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 between07/11/2010 and 14/11/2010 inclusive using greater than or equal to and lessthan 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 thosewritten 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 orbefore 10/11/2010.

Field Name Issue Date

Criteria

Table 3.22

Assignment 3 Review Questions 15

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

Step by Step Databases16

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 <25

(b) <12 and >25

(c) >=12 and <=25

(d) >12 and <=25

17. To specify the records you want to search for, you must create a Query __________.

(a) Condition

(b) Formula

(c) Function

(d) Search

18. Figure 3.13 is called the:

Figure 3.13

Assignment 3 Review Questions 17

(a) Table design grid

(b) Form design grid

(c) Query design grid

(d) Report design grid

19. You have set up a field called Age in an Access Table. You have mistakenly set thisfield as Text instead of Number. What set of numbers will the condition <2 find?

(a) 0, 1, 2

(b) 0, 1

(c) 0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20

(d) 0, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19

20. When the Query displayed in Figure 3.14 is run, it will:

Figure 3.14

(a) Display all players

(b) Display all players who are Forwards

(c) Display all players who are not Forwards

(d) Not display any records

Step by Step Databases18

ASSIGNMENT 4

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. To search for specific records using a query, you should enter ___________ in theCriteria row.

(a) Formulas

(b) Functions

(c) Algorithms

(d) Conditions

2. The Query condition Between 7 and 12 finds which of the following sets ofnumbers?

(a) 8, 9, 10, 11

(b) 7, 8, 9, 10, 11

(c) 8, 9, 10, 11, 12

(d) 7, 8, 9, 10, 11, 12

3. Which of the following buttons shows the results of a Query?

(a)

(b)

(c)

(d)

4. The field size for a Yes/No field is:

(a) 1 byte

(b) 2 bytes

(c) 4 bytes

(d) 8 bytes

5. Using the data displayed in Figure 4.7, write down the data types and field sizes inTable 4.11.

Figure 4.7

Field Name Data Type Field Size

Membership Number

Firstname

Surname

Date Joined

Membership Type

Membership Fee

Paid

Table 4.11

6. Complete the following questions using the data displayed in Figure 4.7 above.

(a) In Table 4.12, write down the Query condition to find all members who joined inFebruary, March or April.

Field Name Date Joined

Criteria

Table 4.12

Step by Step Databases20

(b) In Table 4.13, write down the Query condition to find all members except forassociate members.

Field Name Membership Type

Criteria

Table 4.13

(c) In Table 4.14, write down the Query conditions to find all full members who havepaid their membership fee.

Field Name Membership Type Paid

Criteria

Table 4.14

7. In Figure 4.8, which field should be set up as the primary key field?

Figure 4.8

(a) Manufacturer

(b) Year of Manufacture

(c) Engine Size

(d) Registration Number

8. To increase the size of a label in a Form, it must be viewed in:

(select all that apply)

(a) Form view

(b) Design view

(c) Layout view

(d) Module view

Assignment 4 Review Questions 21

9. The highest number that can be stored in a Number field with a field size of Byte is:

(a) 55

(b) 155

(c) 255

(d) 355

10. The storage space per record for a Number, Byte field is:

(a) 1 byte

(b) 2 bytes

(c) 4 bytes

(d) 8 bytes

11. Storing a number in a currency field requires ___ bytes of storage.

(a) 2

(b) 4

(c) 6

(d) 8

12. Write down the names of the toolbar buttons displayed in Table 4.15.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

Table 4.15

Step by Step Databases22

13. In the Form, each field is represented by a label and a:

(a) Data box

(b) Detail box

(c) Text box

(d) Field box

14. Complete Table 4.16.

Data Type Field Size

Criteria

Currency

Yes/No

Date/Time

Table 4.16

15. The Query displayed in Figure 4.9 did not find any records because:

Figure 4.9

(a) The condition has been entered in the wrong field

(b) There is a spelling error in the condition

(c) There is only 1 Back on the team

(d) The condition has been entered in the wrong section of the Query design grid

16. You need to store PPS numbers in a Table. All PPS numbers consist of 7 numbersfollowed by a single letter. What is the most appropriate data type for this data?

(a) Number, Byte

(b) Number, Integer

(c) Number, Long Integer

(d) Text

Assignment 4 Review Questions 23

17. A database Table is divided into rows and columns. The columns are called____________ and the rows are called ____________.

18. List two features of the primary key.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

19. In a database that stores data about food products, you create a Query to find allproducts costing less than €5. You type the condition <€5 in the price field andreceive the error message displayed in Figure 4.10 when you run the Query. Whatis causing this error?

Figure 4.10

(a) There are no products costing less than €5

(b) There are no records currently in the table

(c) The PC hasn’t been updated to recognise the euro sign

(d) You cannot use the euro sign in a Query condition

20. The default field size for a text field is _______ bytes.

Step by Step Databases24

ASSIGNMENT 5

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. You are the database administrator for an online holiday company. You have beenasked to produce a list of people who have booked a holiday in the last month,showing the total number of holidays booked and the average cost of a holiday.Which of the following would be most appropriate for this task?

(a) A Report linked to a Query

(b) A Report linked to the Table

(c) A Report linked to a Form

(d) A Report linked to a macro

2. (a) What is the main advantage of indexing a field in the Table?

______________________________________________________________________

(b) What is a potential disadvantage of setting up an index?

______________________________________________________________________

3. The records displayed in a Report are produced by a series of ________ _____controls, which are positioned in the ______________ section.

4. The error message in Figure 5.53 was displayed while typing a new record into aForm. Which of the following would have caused this message to be displayed?

Figure 5.53

(a) There is no primary key field in the table

(b) There are too many primary key fields in the table

(c) You attempted to duplicate a value already entered in the primary key field

(d) You attempted to duplicate a value already entered in a sorted field

5. Complete Table 5.15.

Number Type Range of Values Decimals (Y/N) Storage Size

Byte

Integer

Long Integer

Single

Table 5.15

6. Write down the three main functions of a Report.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

7. In a Form, a __________ _____ speeds up data entry by allowing the database userto select items from a drop-down list.

8. In a Form, the _______ _________ determines the sequence in which the cursormoves from one text box to the next.

Step by Step Databases26

9. A standard Access Report contains four sections. Write down the names of thesesections below.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

10. You need to store the number 57.301 in a field. The field size for this field should beset to:

(a) Byte

(b) Integer

(c) Long Integer

(d) Single

11. What is the most appropriate field type to store the mileage in a fleet of cars?

(a) Currency

(b) Number, Byte

(c) Number, Integer

(d) Number, Long Integer

12. List three advantages of using a combo box in a Form.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

13. To create a combo box, first delete the appropriate ___________ from the Form. Next

click the ____________ button in the Toolbox. Drag the field from the __________

__________ and drop it in the detail section of the Form. If the Wizard doesn’t start,

click the ______________ button.

Assignment 5 Review Questions 27

14. You have created a combo box in your Form. You now need to:

(a) Change the tab order

(b) Change the sort order

(c) Change the tab stop

(d) Update the field list

15. You have created a combo box (Figure 5.54) to enter data in a field called Subject.However, when you select the first item in the list, Access displays the error messageshown in Figure 5.55. What is causing this error?

Figure 5.54

Figure 5.55

(a) The combo box is unbound

(b) The field size for the Subject field is too small

(c) The combo box is linked to the wrong field

(d) You forgot to run the Combo Box Wizard

16. Which of the following buttons should you click to create a combo box?

(a)

(b)

(c)

(d)

Step by Step Databases28

17. To prevent a data entry operator from typing data in a combo box, you should:

(a) Set the Tab Stop property to No(b) Set the Default Value property to Locked(c) Set the Enabled property to No(d) Set the Limit to List property to Yes

18. Write down the appropriate field or number types for the data listed in Table 5.16.

Data Data Type/Number Type

Age of a person

PPS number

Car mileage

Seat numbers in a 50,000-seat football stadium

Car registration number

Telephone numbers with area codes

Engine size (in litres)

Table 5.16

19. In a Report, each field is represented by a label and a text box. The labels arenormally positioned in the:

(a) Report header

(b) Page header

(c) Detail section

(d) Page footer

20. You have created a combo box for the Rating field (Figure 5.56). On viewing theForm in design view, you notice thatthe combo box is not linked to theRating field in the Table. What causedthis error?

Figure 5.56

(a) The field list is not up to date

(b) You forgot to turn on the Combo Box Wizard

(c) You clicked List Box instead of Combo Box

(d) You forgot to drag the Rating field from the field list

Assignment 5 Review Questions 29

ASSIGNMENT 6

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. You want to store a car registration number, such as 07LH3012, in a field. The datatype for this field should be set to:

(a) Text

(b) Number

(c) Alpha-numeric

(d) Autonumber

2. Which of the following is not a valid number type in Access?

(a) Byte

(b) Integer

(c) Super Integer

(d) Single

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

Figure 6.40

(a) The data type for PPS Number should be number

(b) There is no primary key defined

(c) Employee name is a bad choice of field for the primary key

(d) There is nothing wrong with this Table design

4. (a) The conditions displayed in Figure 6.41 are joined using the _______ logicaloperator.

Figure 6.41

(b) The conditions displayed in Figure 6.42 are joined using the _______ logicaloperator.

Figure 6.42

5. Which database object can be used to produce address labels?

(a) Table

(b) Query

(c) Form

(d) Report

Assignment 6 Review Questions 31

6. The conditions in Figure 6.43 are joined using which of the following the logicaloperators?

Figure 6.43

(a) And

(b) Or

(c) Between

(d) Not

7. Which of the following buttons should you click to create a list box?

(a)

(b)

(c)

(d)

8. After you click the List Box button, you should:

(a) Click in the detail section of the Form to start the wizard

(b) Drag the field from the field list and drop it in the detail section

(c) Draw the outline of the list box using the mouse

(d) Drag the field from the Table and drop it in the Form

9. Using the data displayed in Figure 6.44 as a guide, write down the Query conditionsin Tables 6.11, 6.12, 6.13 and 6.14.

Figure 6.44

(a) Display Films rated 15 or 18 that are on DVD format

Step by Step Databases32

Field Rating Format

Criteria

Or

Table 6.11

(b) Display all films that were released in 2009 except for those rated 15

Field Date Released Rating

Criteria

Or

Table 6.12

(c) Display films that are either rated 12 or whose running time is less than 100

minutes

Field Rating Running Time

Criteria

Or

Table 6.13

(d) Display Thrillers and Dramas released in 2008 or 2009

Field Genre Date Released

Criteria

Or

Table 6.14

10. In Figure 6.45, Jacek has edited the Form control for the Title field, replacing it withName of Film. When he viewed the Form in Form view, he noticed that there seemsto be a problem. What did Jacek do wrong?

Figure 6.45

(a) He edited the text box of the Title field instead of the label

(b) He edited the label of the Title field instead of the text box

(c) He didn’t drag the field from the field list when he was making a combo box

(d) He typed the field name into a label instead of a text box

Assignment 6 Review Questions 33

11. Susan ran her Query using the conditions displayed in Figure 6.46. However, theQuery did not find any records. What did Susan do wrong?

Figure 6.46

(a) She entered the conditions in the wrong field

(b) She should have used OR instead of AND(c) Both conditions should be in the “or:” line instead of the Criteria line

(d) There is a spelling error in the condition

12. Dave just spent two hours designing his Form and has entered his first record. Afterhe entered the data, bright green triangles appeared in the top left-hand corner ofeach text box control, as shown in Figure 6.47. What did Dave do wrong?

Figure 6.47

(a) He forgot to link the Form to the Table

(b) He formatted the text boxes incorrectly

(c) He put the Form title in the Form header instead of the detail section

(d) He forgot to click the Form View button before entering the data

Step by Step Databases34

13. Write down the appropriate field or number types for the data listed in Table 6.15.

Data Field or Number Type

Weekly sales figures for a national newspaper

Top speed in kilometres per hour of a car

Daily outside temperature, e.g. 18

Width of a room in metres, e.g. 4.5

ISBN number of a book, e.g. 0-7171-3738-4

Size of a hard drive in gigabytes

Price of a product

Table 6.15

14. You have created a list box (Figure 6.48) for the Format field by clicking the List Boxbutton and then dragging and dropping the Format field using the field list. Younoticed that the List Box Wizard didn’t run as normal, and when you viewed the listbox in Form view, it was empty. Why has this happened?

Figure 6.48

(a) You dragged the wrong field from the field list

(b) The list box is empty because no records have been entered in the Form

(c) The Control Wizard is turned off

(d) The field size for the From field is too small

15. You have produced a set of labels using the Label Wizard. However, when youprinted the labels, the print didn’t line up properly with the labels and some of theprinted text went off the edge of the labels. What is the most likely cause of thisproblem?

(a) You selected the wrong label code in the wizard

(b) You forgot to sort the labels

(c) You added the fields incorrectly to the labels

(d) You should have set up the labels in design view

Assignment 6 Review Questions 35

16. You have created a combo box to enter data in the Engine Size field. However, everytime you enter a number, Access either rounds the number up or rounds it down.In Figure 6.49, 1.6 has been selected in the combo box but Access has changed thenumber to 2. What could be causing this problem?

Figure 6.49

(a) The Engine Size field has been set to Text instead of Number

(b) The Engine Size text box control in the Form has not been linked to the EngineSize field in the Table

(c) The field size of the Engine Size field has been set to Long Integer

(d) The Combo Box Wizard was used incorrectly

17. To create a list box, first delete the appropriate ________ and ______ box controls

in the Form. Next click the ___________ button. Drag the field from the ___________

and drop it in the Form. Follow the steps in the ________________. Having created

the list box, you should adjust the tab ________ of the Form.

18. Fill in Table 6.16 with the data types and field sizes for the data displayed in Figure6.50.

Figure 6.50

Step by Step Databases36

Field Name Data Type Field Size

Product Code

Title

Format

Difficulty Level

Price

Release Date

Stock Level

Table 6.16

19. Each field in the Form is represented by a _______________ and a

___________________. The _________________ links to a specific field in the

_________________.

20. Fill out Table 6.17 below with the field sizes and ranges of values for each numbertype listed.

Number Type Range of Values Decimals (Y/N) Storage Size

Byte

Integer

Long Integer

Single

Table 6.17

Assignment 6 Review Questions 37

ASSIGNMENT 7

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. List two important characteristics that data must have in order to qualify as adatabase.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

2. List four common examples of commercial databases.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

3. Write down the main functions of the database objects listed below.

(a) Table: ______________________________________________________________

(b) Query: ____________________________________________________________

(c) Form: ______________________________________________________________

(d) Report: ____________________________________________________________

4. A database Table is divided into rows and columns. The columns are called

____________ and the rows are called ____________.

5. Fill in Table 7.12 with the data types and field sizes for the data displayed in Figure7.25.

Figure 7.25

Field Name Data Type Field Size

ISBN

Title

Author

Date Released

Sales to date

Pages

Star Rating

Price

Table 7.12

6. Write down the appropriate field or number types for the data listed in Table 7.13.

Data Field or Number Type

Population of a country

Distances from Cork to other Irish towns and cities, in kilometres

Rate of inflation, e.g. 5.2

Price of a holiday

Seat numbers in a plane, e.g. 21a, 21b, 21c

Date of an exam

Whether someone has ticked the terms and conditions box or not

Table 7.13

Assignment 7 Review Questions 39

7. Fill out the Table 7.14 with the field sizes and ranges of values for each number typelisted.

Number Type Field Size Range of Values

Byte

Integer

Long Integer

Table 7.14

8. List two features of the primary key.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

9. The function of a Query is to find __________ matching __________s entered in the

_____________ row of the Query design _________.

10. Write down the names of the logical operators listed in Table 7.15.

Logical Operator Name

<

<=

=

<>

>

>=

Table 7.15

11. The conditions displayed in Figure 7.26 are joined using:

Figure 7.26

Step by Step Databases40

(a) AND

(b) OR

(c) NOT

(d) Both AND and OR

12. In Figure 7.27, a student is trying to find all Dell PCs with either Core i7 or Core i9processors. What is wrong with the conditions shown below?

Figure 7.27

(a) Incorrect use of AND

(b) Incorrect use of OR

(c) Missing condition

(d) Nothing is wrong with the conditions

13. Using the data displayed in Figure 7.28 as a guide, write down the Query conditionsin Tables 7.16, 7.17, 7.18 and 7.19.

Figure 7.28

(a) Display records of blue or black cars

Field Colour

Criteria

Or

Table 7.16

Assignment 7 Review Questions 41

(b) Display records of cars with a 1.0 engine size that have either SatNav or iPod

connectivity

Field Engine Size SatNav iPod connectivity

Criteria

Or

Table 7.17

(c) Display records of cars that don’t have SatNav and don’t have iPod connectivity

Field SatNav iPod connectivity

Criteria

Or

Table 7.18

(d) Display records of red or black cars with an engine size of 1.3

Field Colour Engine Size

Criteria

Or

Table 7.19

14. An Access Form can have three sections. Write the names of these sections below.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

15. In Form design, each field from the Table is represented by a ___________ and a

_________ ______ control.

16. The button is used to:

(a) Create a combo box

(b) Create a list box

(c) Create a check box

(d) Create an option group

Step by Step Databases42

17. A Report can be linked to either a ____________ or a ____________.

18. A standard Access Report contains four sections. Write down the names of thesesections below.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

19. The Report displayed in Figure 7.29 has been sorted by Student Number. Whenyou preview the report, the records are not in the correct order. What is causing thisproblem?

Figure 7.29

(a) You sorted From Largest to Smallest instead of From Smallest to Largest(b) You set data type of the Student Number field to Text

(c) The field size of the Student Number field is incorrect

(d) You have mistakenly sorted the Report by the Phone field

Assignment 7 Review Questions 43

20. Write down the names of the toolbar buttons displayed in Table 7.20.

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

(i)

(j)

Table 7.20

Step by Step Databases44

ASSIGNMENT 8

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. The database feature that allows you to produce standard letters by linking adocument created in Microsoft Word with data stored in a Table or Query is called:

(a) Data merge

(b) Address merge

(c) Record merge

(d) Mail merge

2. Write down the three ways of viewing an Access Form.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

3. What is the maximum number of sorting levels that can be used with the datadisplayed in Figure 8.104?

Figure 8.104

(a) 1

(b) 2

(c) 3

(d) 4

4. An Access Report can contain up to seven sections. Write down the names of thesesections below.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

(e) ____________________________________________________________________

(f) ____________________________________________________________________

(g) ____________________________________________________________________

5. You are designing a database to store customer orders that will be taken over thephone. You are expecting a high volume of orders each day and need to give eachorder a unique order number. Which of the following is the most appropriate datatype for the Order Number field?

(a) Number, Byte

(b) Number, Integer

(c) Number, Long Integer

(d) Autonumber

6. To ensure that the text “Co. Dublin” is automatically entered in the Address3 field,you should set this up as the:

(a) Default value

(b) Field value

(c) Text value

(d) Validation rule

7. Figure 8.105 is an exam report, detailing student subjects and grades. The fields inFigure 8.105 are Student Name, Subject, Marks and Grade. Write down the functionsto calculate the following.

Step by Step Databases46

Figure 8.105

(a) Average mark: ______________________________________________________

(b) Highest mark: ______________________________________________________

(c) Lowest mark: ______________________________________________________

(d) Number of exams: __________________________________________________

8. Write down the appropriate data types and field sizes for the data listed in Table8.22.

Data Data Type Field Size

Total monthly rainfall for Belmullet in millimetres, e.g. 213.7

Mobile phone number, e.g. (087) 2309971

Percentage of the recommended daily intake of vitamin B, e.g. 27

Code number of a product, e.g. PX:899/33/7

Expiry date of a product, e.g. 31/12/2014

Weight of a packet of sweets e.g. 28g

Ticket sales for a U2 concert at Croke Park, e.g. 82208

Table 8.22

Assignment 8 Review Questions 47

9. Figure 8.106 displays details of members in a sailing club. Using the data displayedin Figure 8.106, write down the Query conditions in Tables 8.23, 8.24, 8.25, 8.26 and8.27.

Figure 8.106

(a) Display records of members whose surname begins with B

Field Surname

Criteria

Or

Table 8.23

(b) Display records of members whose surname includes the letter O but does notbegin with the letter O

Field Surname

Criteria

Or

Table 8.24

(c) Display records of membership codes that do not end with 2

Field Membership Code

Criteria

Or

Table 8.25

Step by Step Databases48

(d) Display records of members whose surname doesn’t include the letters T or E

Field Surname

Criteria

Or

Table 8.26

(e) Display records of members whose membership code includes the number 1but does not end with 1

Field Membership Code

Criteria

Or

Table 8.27

10. You have created a SUM function but see the error shown in Figure 8.107 when youpreview your Report. The error message in Figure 8.107 indicates:

Figure 8.107

(a) Incorrect use of brackets in the function

(b) Positioning of the function in the page footer instead of the Report footer

(c) Incorrect spelling of the function name

(d) Incorrect spelling of the field name

11. Completing a Mail Merge involves four steps, as follows.

(a) Create the ___________________ using Microsoft Word.

(b) Set up the ___________________ in Access.

(c) Insert ____________ fields in the ____________________.

(d) Merge the ____________________ with the ____________________.

Assignment 8 Review Questions 49

12. The Autonumber data type requires ____ bytes of storage

(a) 1

(b) 2

(c) 4

(d) 8

13. Report functions are generally positioned in the:

(a) Report header

(b) Detail

(c) Page footer

(d) Report footer

14. You have produced a set of labels using the Label Wizard. However, when youprinted the labels, the print didn’t line up properly with the labels. Some of the printedtext went off the edge of the labels. What is the most likely cause of this problem?

(a) You selected the wrong label code in the wizard

(b) You forgot to sort the labels

(c) You added the fields incorrectly to the labels

(d) You should have set up the labels in design view

15. In an Access Form, controls can be organised using two different types of layout.These are the:

(a) ________________ layout

(b) ________________ layout

16. The Attachment data type requires ____ bytes of storage.

(a) 1

(b) 2

(c) 4

(d) 8

17. A Report function is displayed in Figure 8.108. When this report is previewed:

Figure 8.108

Step by Step Databases50

(a) The function will add all values in the Cost field

(b) The function will count all values in the Cost field

(c) The function will display a summary of the Cost field

(d) An error message will be displayed

18. To identify a Query condition as a Parameter Query, you should enclose thecondition in:

(a) [ ]

(b) { }

(c) ( )

(d) < >

19. Which of the following conditions will find all car registrations except for thosestarting with 10?

(a) <>10

(b) <>10*

(c) Except 10*

(d) Not Like 10*

20. What is wrong with the Query conditions displayed in Figure 8.109?

Figure 8.109

(a) The conditions should include wildcards

(b) The conditions should be joined with the AND logical operator

(c) Each condition should be entered on a separate line in the Model column

(d) There is nothing wrong with the conditions displayed in Figure 8.109

Assignment 8 Review Questions 51

ASSIGNMENT 9

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. The output from a Query is displayed in Figure 9.76. This Query is called a:

Figure 9.76

(a) Select Query

(b) Parameter Query

(c) Crosstab Query

(d) Totals Query

2. You have linked a Report to a Query instead of a Table. Which of the followingproperties should you access to change this?

(a) Record source

(b) Record filter

(c) On open

(d) Tab stop

3. Figure 9.77 displays data from an outdoor adventure database. The databasecontains a number of reports linked to Parameter Queries where different county orprovince names can be entered. Report titles should adjust to reflect the countyentered in the parameter value dialog box each time a particular Report is previewed.

Figure 9.77

(a) Referring to the field names in Figure 9.77, write down the single expressioncapable of generating three Report titles as follows: Mountains climbed in Mayo,Mountains climbed in Donegal, Mountains climbed in Derry.

____________________________________________________________________

(b) Referring to the field names in Figure 9.77, write down the single expressioncapable of generating two Report titles as follows: Mountains of Connaught,Mountains of Ulster.

____________________________________________________________________

4. Using the data in Figure 9.77, write down the Report functions required to calculatethe following.

(a) Average height: ____________________________________________________

(b) Height of highest mountain: __________________________________________

(c) Height of lowest mountain:____________________________________________

(d) Number of mountains climbed: ______________________________________

(e) Number of mountains not yet climbed: ________________________________

Assignment 9 Review Questions 53

5. List the fields that a Report linked to the Table in Figure 9.77 could be grouped by.

____________________________________________________________________

6. Using the data displayed in Figure 9.77, write down the Query conditions in Tables9.22, 9.23 and 9.24.

(a) Display records of mountains that have been climbed

Field Date Climbed

Criteria

Or

Table 9.22

(b) Display records of mountains that have not been climbed

Field Date Climbed

Criteria

Or

Table 9.23

(c) Display records of mountains that include the word Croagh in the name

Field Mountain

Criteria

Or

Table 9.24

7. To ensure that each record can be uniquely identified in the database, you shouldcreate a ________________ in the _______________.

8. Write down the appropriate data types and field sizes for the data listed in Table9.25.

Step by Step Databases54

Data Data Type Field Size

Eircom account number, e.g. 86537288

Mean time before failure (in hours) of a power supply unit, e.g. 20000

Credit card number, e.g. 4602118623300

Percentage return on a pension fund, e.g. 22.3

CO2 emission rating, e.g. 119g/km

Population of a country, e.g. 5607800

Car engine size, e.g. 1.2

Table 9.25

9. Write down the validation rules required for the following.

(a) Restrict house prices to the range €300,000 to €950,000 inclusive

____________________________________________________________________

(b) Only allow Cork, Kerry, Waterford, Limerick and Clare to be entered in the Countyfield

____________________________________________________________________

(c) Allow all colours except for yellow and green to be entered in the Colour field

____________________________________________________________________

(d) Restrict ages to the range 16 to 65 inclusive

____________________________________________________________________

(e) Ensure that the value entered in the Amount Sold field is not greater than thevalue stored in the Stock Level field

____________________________________________________________________

10. (a) Write down the name of the Query used to produce the output in Figure 9.78

____________________________________________________________________

Figure 9.78

Assignment 9 Review Questions 55

(b) In Figure 9.79, two additional calculations have been added to the Querydisplayed in Figure 9.78. Briefly describe how to add these two calculations tothe Query.

____________________________________________________________________

____________________________________________________________________

Figure 9.79

11. The main function of a Table is to ___________ data. The rows in a Table are called

____________s. The columns in a Table are called _________s. The order of records

in a Table is determined by the __________ _______ field.

12. Figure 9.80 displays data from a Tech Support database. The technician has decidedto increase the performance of the PCs by overclocking the processor andcompressing the hard drive. Calculated fields will be used to work out the newprocessor speeds and hard disk sizes.

Figure 9.80

(a) The overclocked processor speed is 20% faster. Write down the expression tocalculate Overclocked Processor Speed.

____________________________________________________________________

Step by Step Databases56

(b) The compressed hard drive has 50% more capacity. Write down the expressionto calculate Compressed Hard Disk Gb.

____________________________________________________________________

13. Using Table 9.26, write down the appropriate data types and field sizes for the fieldsin Figure 9.80.

Data Data Type Field Size

Model

Processor

Processor Speed GHz

Hard Disk Gb

Table 9.26

14. In order for a calculation to be repeated a number of times in a Report, the functionmust be created in the:

(a) Report header

(b)Page footer

(c) Group footer

(d) Report footer

15. Figure 9.81 displays data from a Pizza Delivery database. You have created a Queryto find Ham and Mushroom pizzas. However, when you enter the condition in theQuery design grid, Access encloses the words in double quotes, as shown in Figure9.82.

Figure 9.81

Assignment 9 Review Questions 57

Figure 9.82

When you run the Query, an error message is displayed. Write down the correctQuery condition below.

______________________________________________________________________

16. Figure 9.83 displays a validation rule for the TV Channel field. The validation ruleshould prevent the data entry operator from entering BBC1, BBC2 and Channel 4in the TV Channel field. However, it doesn’t work. All these values can be entered.

Figure 9.83

(a) Briefly explain why the validation rule in Figure 9.83 doesn’t work

____________________________________________________________________

(b) Write down the correct validation rule

____________________________________________________________________

17. A database is a collection of ____________. Each ___________ carries out a specific

task. The ___________ is responsible for storing data. A _____________ is used to find

specific records. A _________________ is used to enter data. _______________ are

used to present information, sort records and perform calculations.

Step by Step Databases58

18. Write down the four ways of viewing an Access 2007 Report.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

(d) ____________________________________________________________________

19. Figure 9.84 displays output from a Report linked to a Crosstab Query. Write downthe functions to calculate:

Figure 9.84

(a) The number of films in Blu-ray format: ________________________________

(b) The number of films in DVD format: ____________________________________

20. When the Query displayed in Figure 9.85 is run, it will find:

Figure 9.85

(a) All cars registered in 2008, 2009 and 2010

(b) All cars that were not registered in 2008, 2009 and 2010

(c) No records

(d) All records

Assignment 9 Review Questions 59

ASSIGNMENT 10

Review Questions

Answers to the review questions are available on www.gillmacmillan.ie

1. Briefly describe the three effects of enforcing referential integrity when setting upthe relationship between two Tables.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

2. A Query that makes changes to data in a Table is called a:

(a) Select Query

(b) Make Table Query

(c) Update Query

(d) Append Query

3. A one-to-many relationship is created by dragging the ___________ ______ field from

the Table on the One side of the relationship and dropping on the related

___________ in the Table on the Many side of the relationship.

4. Write down three effects of setting up a primary key field.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

(c) ____________________________________________________________________

5. When setting up a relationship between fields in two Tables, Access will not createthe relationship unless the following conditions are satisfied.

(a) ____________________________________________________________________

(b) ____________________________________________________________________

6. To automate a process in a database, you should create a:

(a) Table

(b) Query

(c) Form

(d) Macro

7. What is the function of this button?

(a) Create a macro

(b) Create a command button

(c) Set up relationships between Tables

(d) Create an Update Query

8. In Figure 10.26, the relationship between the Students Table and the Subjects Tableis:

Figure 10.26

(a) One-to-one

(b) One-to-many

(c) Many-to-many

(d) Many-to-one

Assignment 10 Review Questions 61

9. In Figure 10.27, a one-to-many relationship between the Mentors Table and the

Students Table is created by dragging the ______________________ field from the

_______________ Table and dropping on the _______________________ field in the

___________________ Table.

Figure 10.27

10. What does the ∞ symbol signify?

(a) Referential integrity

(b) Infinity

(c) Index

(d) Primary key

Step by Step Databases62

SECTION 5

Project Guidelines and Past Exams

DATABASE PROJECT GUIDELINES

As part of the FETAC Level 5 Database Methods Module, you are required to complete adatabase project. The project tests if you can apply what you have learned aboutdatabases to a fictitious problem and then design and create a database to solve theproblem. The problem may be in a business context, such as the need to computerise thestock control system of a small business, or it may be in relation to an interest or hobby,such as creating a database to manage the administration of membership in a local club.

The database project must be completed in three distinct phases:

� Phase 1: Design (40%).

� Phase 2: Implementation (40%).

� Phase 3: Proposed Modifications (20%).

The project must be completed in this order. You must design your database on paperbefore you set it up in Access. It is worth noting that there are more marks for designingyour database and for suggesting modifications than for actually creating the databasein Access. Many students spend too much time working on their database in Access andnot enough time on design and modifications.

Phase 1: Design (40%)

1. Describe the aims of your project.2. Specify Table structure.3. Design a data capture form.4. Specify Queries and Reports.

Describe the Aims of Your Project

1. Provide some background information to set the scene for your project.

ExampleRiverstown Karate Club was established in 2008. Since the club was formed, allinformation about the club and its members has been kept in a paper-based filing system.This is very cumbersome and takes up valuable space. Mistakes have been made fromtime to time when locating and retrieving information. Not only does it take time to find amember’s application form or progress sheet, but it is difficult and time consuming tokeep records up to date. The aim of this project is to create a database to store theinformation relevant to the running of the club. The database will reduce the amount oftime required for administration work and make it easier for the instructors to run the club.

2. Identify problems that exist in the system you have decided to computerise using adatabase. For each problem that you identify, describe in detail how the databasewill solve the problem.

ExampleProblemGradings occur twice yearly. To prepare for the gradings, the instructors draw up lists ofmembers in each Belt Ranking Category, e.g. black belt, brown belt, etc. This is verytime consuming and sometimes members are unintentionally omitted from the lists.Producing lists of members in alphabetical order is very difficult because the lists arecreated using Microsoft Word. If new members join the club prior to a grading, thesehave to be added to the list of members to be graded by inserting their names in separateword processing documents.

SolutionIn the database system, a Report will be created to group members according to theircurrent belt ranking. Within each group, members will be sorted in alphabetical order ofsurname. A Report function will count the number of members in each belt rankingcategory so the instructors know exactly how many students to expect at each grading.If new members join prior to the grading, they will be picked up automatically by theReport and listed in alphabetical order once they have been entered in the database.

Specify Table Structure

1. Identify where the data that will be stored in your database exists in the currentsystem.

ExampleThe data relating to members is taken from the club’s paper files, i.e. the old system ofkeeping records. Information on black belt club members is taken directly frominstructors, as is the data on all the club members due to be graded for their black belt.

Step by Step Databases64

2. Specify fields included in the Table. For each field, indicate the data type, field sizein bytes and give an example of data that will be stored in the field. Identify whichfield is the primary key.

ExampleMembership Table

Field Name Data Type Field Size Example

Membership No Number Integer (2) 298

First Name Text 25 Richard

Surname Text 25 Butler

Gender Text 7 Male

Address1 Text 35 1 Riverstown Wood

Address2 Text 25 Clonmel

Address3 Text 25 Co. Tipperary

Age Number Byte (1) 16

Current Belt Text 10 Yellow

Membership Fee Currency 8 €360

Date of Last Fee Renewal Date/Time 8 15/05/2011

Paid Yes/No 1 Yes

Table 11.1

Membership No is the primary key field.

Design a Data Capture Form

A data capture form is a printed form used to collect data before it is entered in thedatabase. It should be designed to capture all the input data. We have all filled in datacapture forms at one time or another, such as club membership forms, an applicationfor a bank account or the CAO form. It is a good idea to look at how data capture formsare designed in practice before you create your own data capture form. A well-designeddata capture form will:

� Be easy to complete.

� Contain instructions on how to complete the form.

� Indicate to whom the form is to be returned or where the form is to be sent when it iscompleted.

� Be well laid out on the page using appropriate fonts, colours, tick boxes and lines (forwriting names and addresses).

Project Guidelines and Past Exams 65

The data capture form must include all the fields that you have specified for your Table.A sample data capture form is shown below.

Step by Step Databases66

MEMBERSHIP FORM

Est. 1998

15 Canal DockRiverstownCo. Carlow

Riverstown Karate Club

Name:__________________________________________________________________

Address:____________________________________________________________________________________________________________________________________________________________________________________________________________

Age:__________________ Gender: Male �Female �

Current Belt: � White � Purple �Yellow � Brown �Green � Black �

Membership Fee: € ______________

Date of Last Renewal: ��������Paid: �

For Official Use Only

Membership Number: ���

Specify Queries and Reports

1. Specify Query structure.The database project must include two or more appropriate Queries. At least one Querymust have an and/or condition. The queries should solve problems identified earlier inthe project. Each Query should be specified using the following headings:

� Query Name

� Purpose of Query

� Table(s) Linked To

� Fields in Query

� Query Conditions

ExampleQuery Name: Members eligible for Black Belt grading

Purpose of Query: To find all members who currently hold a Brown Belt and who havepaid their membership fee.

Tables Linked To: Membership

Fields in Query: Membership No, First Name, Surname, Age, Current Belt, Paid

Query Conditions

Field Name Current Belt Paid

Criteria “Brown” “Yes”

Table 11.2

2. Specify Report structure.The project must include at least four appropriate Reports. Each Report must be sortedor grouped or both. (A mail merge can be used as a Report.) Labels must be producedby one of the Reports. Report functions should be used where appropriate. The Reportsshould solve problems identified earlier in the project. Each Report should be specifiedusing the following headings:� Report Title� Purpose of Report� Table or Query Linked To� Fields in Report� Sort and Grouping � Report Functions

Project Guidelines and Past Exams 67

Example

Report Title: Current Members Belt Rankings

Purpose of Report: This Report will display all members’ names and their belt rankings.It will allow instructors to determine which members are in a specific belt rankingcategory. The Report will be grouped by Current Belt.

Linked To: Membership Table

Fields in Report: Current Belt, Membership no, First Name, Surname

Sort and Grouping: The Report will be grouped by Current Belt and sorted in ascendingalphabetical order of Surname within each group.

Report Functions: The function =count([Membership No]) will be included in theCurrent Belt footer to calculate the number of members in each belt ranking category.

Phase 2: Implementation (40%)

1. Data accurately inputted.2. Database used to sort, query and organise data effectively.3. Reports with headings and sum and average calculation accurately produced.4. Labels with multiple fields accurately produced.5. Database Queries and Reports saved and printed.

Data Accurately Inputted

Your Table should include a minimum of 25 records and five fields and must have atleast one numeric field. Try to include as many different field data types (Text, Number,Date/Time, Currency, Yes/No, Autonumber, Memo) as possible in the Table – you willlearn more from your project as a result. The data should be inputted using a Form thatis linked to the Table. Marks will be deducted for spelling errors, as they will affect theaccuracy of the Queries. When you have finished inputting the data, proofread it andcorrect any errors.

Database Used to Sort, Query and Organise Data Effectively

Sorting should be implemented using Reports. Reports must be either sorted orgrouped or both. In the case of the Riverstown Karate Club database, a Reportdisplaying members in ascending alphabetical order of Surname could be created. Agrouped Report could be created splitting members into male and female with a functionto calculate the total number of male and female members.

Step by Step Databases68

Reports with Headings and Sum and Average Calculation Accurately Produced

The overall formatting of the Reports should be attractive and should be consistentacross all Reports. Data should be aligned under field headings in each Report.Headings should be spaced evenly across the page. Appropriate functions, i.e. Sum,Avg, Count, Max or Min, must be used in either the Report header, Report footer or thegroup footer. Calculated fields may also be used where appropriate. Check the resultreturned by each function by doing the calculations manually.

Labels with Multiple Fields Accurately Produced

In most cases, the Label Wizard is used to create name and address labels. It can alsoused to produce labels for other purposes, such as price tags and product identificationlabels or membership cards. Whatever purpose your labels serve, they will be stored ina Report linked to either a Table or a Query. If you create name and address labels,these could be used in conjunction with a mail merge letter created in Word.

Database Queries and Reports Saved and Printed

When printing Queries and Reports, select an appropriate page orientation for eachprintout. If there are a lot of fields in a particular Query or Report, set the page orientationto Landscape. Reduce paper wastage by checking your Queries and Reports in printpreview and making necessary adjustments before printing.

Phase 3: Proposed Modifications (20%)

1. List the aspects of your project that you are particularly pleased with.2. Suggest at least three ways in which your database could be improved if you had

more time. Students often notice limitations in their database design as they areworking on a project. These should be noted and used as potential modifications.Because this section of the project is worth 20%, an in-depth description of eachmodification is required. Modifications should be illustrated using examples anddiagrams where appropriate.

ExampleGiven more time, there are modifications that would have been quite relevant and usefulto include in my project. One such modification relates to the Query that finds clubmembers who are under 18. A point to note regarding this Query is that a member’s ageis not constant. As time passes, members get older, but this is not reflected in thedatabase because their ages are recorded as fixed numbers. So, for example, runningthe Under 18s Query today may find 25 members, but running this Query exactly oneyear from now should find fewer than 25 members because some members will nolonger be under 18. With the current database design, the Under 18s Query will alwaysfind the same number of members unless their ages are updated each year. Because ofthe way I set up my Table, the Under 18s Query will become more and more inaccurateas time progresses unless each member’s age is adjusted on their birthday. With more

Project Guidelines and Past Exams 69

and more members joining the club, this method is guaranteed to lead to errors. Giventhat the main purpose of the database is to reduce the administration work of instructors,this design flaw would be unacceptable in a real-life database.

To solve this problem I would first need a Date of Birth field in the Membership Table.I would then have to calculate a member’s age by subtracting their date of birth fromtoday’s date. In this way, their age would always be up to date because it would advancewith each passing day. This calculation could then be incorporated in the Under 18sQuery so that it always finds only those members who are under 18 on a particular date.

Possible Database Project Topics

1. Club membershipCreate a database to store details of members in a local club. Create Queries to findmembers who qualify for competitions – under 12s, under 15s, under 18s, etc. Createa mail merge to inform members of club events. Use the Label Wizard to createmembership cards. Create reports detailing competition lists and competition results.

2. Doctor’s surgeryStore details of patients attending a doctor’s surgery in a database. Create queries toidentify private patients and those on medical cards. Use reports to calculate the totalreceipts over a given time period. Create a mail merge to inform patients of upcomingappointments and to create reminders for those whose bill is overdue.

3. Technical supportCreate a database to store details of PCs repaired by technical support. Create Queriesto analyse the different problems that occur and who fixed them. Create a Report todisplay the number of PCs fixed per week and the average cost of fixing a PC. Createa Report that shows which brand of PC gives the most problems.

4. Personal music collectionSet up a database to store details of your personal music collection. Create ParameterQueries to find tracks by artist, category or title. Create a Report that groups tracks bycategory and calculates the total value of the collection.

5. Stock controlCreate a database to store details of stock in a shop or small company. Create Queriesto find products with low stock levels and products past their sell-by dates. CreateReports detailing stock movements, the total value of stock by product and the averagestock level.

Step by Step Databases70

6. Dating agencySet up a database to store details of a dating agency’s clients. Record clients’ hobbiesand interests, then create queries to match up clients. Use the Label Wizard to create amembership card. Create a mail merge to inform clients of upcoming dates. Analyseweekly and monthly receipts using a Report

7. Car dealershipStore details of cars for sale in a database. Create a Parameter Query that allows acustomer to specify their preferences (model, engine size, colour) and then finds recordsmatching their requirements. Create a Report detailing cars for sale grouped bymanufacturer. Create labels that display the registration number, model and colour.

For more ideas, have a look through the examples and database assignments in thisbook.

The above are only suggestions. The list of possible database projects is endless.What works best is if you can do your database project on a topic that interests you, e.g.a hobby or an area that you have worked in before.

Project Guidelines and Past Exams 71

FETAC LEVEL 2 DATABASE METHODS

Sample Exam 1

Michael O’Brien runs a retail outlet in Nenagh, Co. Tipperary. He specialises in a broadrange of adhesive and sealing compounds. Recently he has started to record details ofthe various products that he stocks. Michael wishes to set up a database to record thesedetails and to enable him to retrieve information easily from the data stored.

Task 1

1.1 Create a database named Stock Control

� Create a Table named Current Stock to store the data extracted from the records ofMichael O’Brien (see Table 11.3).

Rec No Product Agent Qty (kg) Price Location Life (wks)

3201 Impact Adhesive Doyle Bros 5.0 €56.45 Stores 14

3202 Impact Adhesive Doyle Bros 2.5 €28.50 Shop 12

4215 Sealing Compound JJ Williams 4.5 €24.80 Stores 28

5247 Roof Sealer Geo Ryan 5.5 €56.50 Stores 24

5248 Roof Sealer Geo Ryan 2.5 €28.00 Shop 20

6480 General Adhesive Geo Ryan 10.0 €120.00 Warehouse 13

6481 General Adhesive Geo Ryan 5.0 €65.00 Stores 0

6482 General Adhesive Geo Ryan 2.5 €38.50 Shop 8

7246 Jointing Cement JJ Williams 25.0 €85.00 Warehouse 6

7247 Jointing Cement JJ Williams 12.5 €50.00 Stores 5

7248 Jointing Cement JJ Williams 6.0 €27.50 Stores 4

Table 11.3

Step by Step Databases72

� Set up the Rec No field as the primary key.

� Set up a validation rule that ensures that values entered in the Life (wks) field arerestricted to the range 4 to 104 inclusive. If the data entry operator attempts to entera number outside this range, the error message “Life (weeks) must be in the range4 to 104 inclusive” should be displayed.

1.2 Complete the database structure form provided to show field names, data typesand field sizes (see Table 11.6 on p. 000).

Task 2

2.1 Design and create a Form to allow the data entry operator to enter the data shownin Table 11.3. The format of the Form should be as follows:

� Insert the title Stock Registration centrally on the Form.

� Display two fields on each line (except the last line).

� Place a label or title beside each field.

� Edit the Rec No label so that it reads Record Number

� Adjust the width of text box controls to accommodate the data.

� Set the alignment of the Rec No, Qty (kg), Price and Life (wks) text box controls tocentre.

� Create a combo box for the Product field. Each product should appear once in thecombo box in alphabetical order (see Table 11.3).

� Create a list box for the Location field. Each location should appear once in the listbox in alphabetical order (see Table 11.3).

� Line up the label and text box controls both horizontally and vertically

� Set up the tab order of the form using the order in Table 11.4.

Field Name

1 Rec No

2 Product

3 Agent

4 Qty (kg)

5 Price

6 Location

7 Life (wks)

Table 11.4

Project Guidelines and Past Exams 73

Save the Form as Stock Registration

Print the Stock Registration Form (either now or later) or call the specialist teacher, at theend of the examination, to award marks to your Form.

2.2 Input the data shown in Table 11.3 using the Stock Registration Form.

Task 3

Create Queries for each set of criteria listed below. (Note: Print each Query as youcomplete it.)3.1 Select and print all the records for products where the agent is Doyle Bros.

� Sort the Query in ascending order of Price.

� Save the Query as Doyle Bros

3.2 Select and print all the records for Adhesive products. Use a wildcard to select therequired records.

� Sort the Query in ascending order of Location.

� Save the Query as Adhesive Products

3.3 Select and print all records that are located in the Stores and where the Qty is lessthan 12.

� Sort the Query in descending order of Qty (kg).

� Save the Query as Stock below 12 in Stores

3.4 Select and print all the records for products where the Agent is Geo Ryan, where thePrice is between €25 and €90 inclusive and the Life (wks) is greater than 12.

� Sort the Query in ascending order of Location.

� Save the Query as Geo Ryan

3.5 Create a Parameter Query that will find records of stock in each of the three locations.The query should display the message “Enter stock location” when it is run.

� Sort the Query in descending order of Agent.

� Save the Query as Stock by Location

3.6 Create a Totals Query that calculates the total quantity of stock in each location andthe total value of stock in each location. Save this Query as Stock levels.

Step by Step Databases74

Task 4

4.1 Add a new field to the Current Stock Table as follows:

� Field name – Toxic.

� Data type – Yes/No.

Add the details of the Toxic field to the database structure form (see Table 11.6 on p.000).

4.2 Add the Toxic field to the Stock Registration Form and enter data as follows:

� All the Adhesive products are toxic.

� All other products are not toxic.

4.3 Delete the record with Rec No 7247.

4.4 Edit the Product combo box, then input the records displayed in Table 11.5 usingthe Stock Registration Form.

Rec No Product Agent Qty (Kg) Price Location Life (wks) Toxic

8324 Quick Adhesive Doyle Bros 0.5 €6.40 Shop 11 Yes

8325 Bonding Cement JJ Williams 3.5 €18.60 Stores 9 No

Table 11.5

Task 5

5.1 Generate a Report from the Current Stock Table including all fields. Sort the Report withthe Product field in ascending order (primary sort) and the Life (wks) field in descendingorder (secondary sort). The Report title is Current Stock List. Print the Report (in landscapeorientation) either now or after the exam has finished. Ensure that data is aligned undereach heading and that each text box and label are wide enough to display all data.

5.2 Generate a Report from the Current Stock Table, to include the following:

� Show all fields except Agent and Life (wks).

� Sort the Report in descending order on the Price field.

� Display the title, List of Products, centrally over the Report.

� Display the appropriate field heading centrally over each column of data.

� Use a function to display the average for the Qty (kg) field at the bottom of the Report.Insert a label with the text Average Quantity beside the function. Format the averagequantity to 1 decimal place.

Project Guidelines and Past Exams 75

Save this Report as List of Products. Print the Report (in portrait orientation) either nowor after the exam has finished.

Task 6

6.1 Produce a set of labels for all products except for roof sealer and sealing compound.The labels should have the following format:

� Layout as shown below.

� Have more than one label across the page.

� Sorted in ascending order of Product.

� Agent field in bold print.

Rec No Product

Agent

Price

Location

Save these labels as Stock Control Labels.

6.2 Print the Stock Control Labels (either now or later).

Task 7

Generate a report from the Current Stock Table, to include the following:

� Show all fields.

� Group the report by the Location field.

� Sort the records in each Location in descending order of Price.

� Display the title, Products by Location, centrally over the Report.

� Display the appropriate field heading centrally over each column of data.

� Use a function to display the total value of products in each location. Display theresult of the function in euro format with 2 decimal places. Insert a label with the textStock Value beside the function.

� Calculate the average Life (wks) for products in each location, using an appropriatefunction. Display the result of the function in Fixed format with 1 decimal place. Inserta label with the text Average Life in weeks beside the function. Position this functionbelow the stock value function.

Step by Step Databases76

� Use a function to display the total quantity of stock for all products displayed in theReport. Display the result of the function in Fixed format with 1 decimal place. Inserta label with the text Current Stock Level beside the function.

Save this report as Products by Location. Print the report (in landscape orientation)either now or after the exam has finished.

Database Structure Form

Field Name Data Type Field Size

Table 11.6

Project Guidelines and Past Exams 77

FETAC LEVEL 2 DATABASE METHODS

Sample Exam 2

Paddy Watt’s is a bookmaker’s chain with outlets in most towns in Ireland. At the headoffice in Galway, a database is required to keep track of bets placed in its various outlets.For this purpose, copies of all dockets are sent electronically to the head office. Detailsare then inserted into the database.

Task 1

1.1 Create a database named Paddy Watts Betting

� Create a Table named Betting Details to store the data displayed in Table 11.7.

Docket No Branch Received Date Stake Payout Type of Bet

101001 Harbour Road, Arklow 06/08/2011 €5.00 €105.00 Treble

101020 Arklow Road, Wicklow 09/08/2011 €100.00 €150.00 Single

101067 Shop St, Galway 07/08/2011 €20.00 €75.00 Double

101102 Main St, Arklow 06/08/2011 €40.00 €120.00 Single

101143 Shop St, Galway 08/08/2011 €200.00 €300.00 Single

101147 Shop St, Galway 08/08/2011 €500.00 €1,500.00 Single

101154 Bridge St, Waterford 10/08/2011 €15.00 €195.00 Yankee

101211 Harbour Road, Arklow 11/08/2011 €50.00 €3,000.00 Yankee

101244 Shop St, Galway 13/08/2011 €50.00 €400.00 Double

101261 Main St, Arklow 13/08/2011 €10.00 €90.00 Single

Table 11.7

� Set up the Docket No field as the primary key.

� Set up a validation rule that ensures that values entered in the Payout field are greaterthan or equal to the values entered in the Stake field. If the data entry operator

Step by Step Databases78

attempts to enter a number that breaks the validation rule, the error message “Payoutmust be greater than or equal to the stake” should be displayed.

1.2 Complete the database structure form provided to show field names, data typesand field sizes (see Table 11.11 on p. 000).

Task 2

2.1 Design and create a Form to allow the operator to enter the data shown in Table11.7 in the Betting Details Table. The format of the Form should be as follows:

� Insert the title Posting Details centrally on the Form.

� Display two fields on each line.

� Place a label or title beside each field.

� Adjust the width of text box controls to accommodate the data.

� Set the alignment of the Branch text box control to left. Set the alignment of all othertext box controls to centre.

� Create a combo box for the Type of Bet field. Each bet type should appear once inthe combo box in alphabetical order (see Table 11.7).

� Line up the label and text box controls both horizontally and vertically.

� Set up the tab order of the form using the order displayed in Table 11.8.

Field Name

1 Docket No

2 Branch

3 Received

4 Stake

5 Payout

6 Type of Bet

Table 11.8

Save the Form as Posting Details

Print the Posting Details Form (either now or later) or call the specialist teacher at the endof the examination to award marks to your Form.

2.2 Input the data shown in Table 11.7 using the Posting Details Form.

Project Guidelines and Past Exams 79

Task 3

Create Queries for each set of criteria listed below. (Note: Print each Query as youcomplete it.)

3.1 Select and print all records for bets at the Harbour Road, Arklow branch.

� Sort the Query in descending order of Payout.

� Save the Query as Harbour Road Arklow

3.2 Select and print all records for bets placed in either of the Arklow branches (use awildcard).

� Sort the Query in descending order of Payout.

� Save the Query as Arklow bets

3.3 Select and print all records for bets at the Shop St, Galway branch where the Stakewas greater than €50.00.

� Sort the Query in descending order of Stake.

� Save the Query as Galway bets above €50

3.4 Select and print all records for bets at the Galway or Wicklow branches, where thePayout was between €100.00 and €1,000.00 inclusive and where the Type of Bet wasSingle.

� Sort the Query in descending order of Payout.

� Save the Query as Single bets in Galway and Wicklow

3.5 Create a Parameter Query that can find records relating to any type of bet. The Queryshould display the message “Enter type of bet” when it is run.

� Sort the Query in descending order of Payout.

� Save the Query as Records by type of bet

3.6 Create a Totals Query that calculates the total payout by branch. Save this Query asPayout by Branch

Task 4

4.1 Add a new field to the Betting Details Table as follows:

� Field Name – Win.

� Data Type – Yes/No.

Step by Step Databases80

Add the details of the Win field to the database structure form (see Table 11.11 on p.000).

4.2 Add the Win field to the Posting Details Form and enter the data shown in Table 11.9.

Docket No Win

101001 Yes

101020 Yes

101067 No

101102 No

101143 No

101147 No

101154 No

101211 Yes

101244 Yes

101261 No

Table 11.9

4.3. Input the records displayed in Table 11.10 using the Posting Details Form.

Docket No Branch Received Date Stake Payout Type of Bet Win

101265 Bridge St, Waterford 15/08/2011 €25.00 €40.00 Single Yes

101272 Arklow Road, Wicklow 18/08/2011 €75.00 €600.00 Double No

Table 11.10

Task 5

5.1 Generate a Report from the Betting Details Table to include the following:

� Show all fields except Type of Bet.

� Sort in ascending order on the Branch field (primary sort).

� Sort in descending order on the Stake field (secondary sort).

� Display the title Summary of August Bets centrally over the data.

� Columns are to be aligned under column headings and evenly spaced across thepage.

� Display a grand total for the Payout field, in currency format with no decimals, at theend of the Report. Display the text Total Payout beside the grand total.

Save this report as Summary of August Bets. Print the Report (in portrait orientation)either now or after the exam has finished.

Project Guidelines and Past Exams 81

5.2 Generate a Report from the Betting Details Table, to include the following:

� Show all fields except Docket No and Received Date.

� Sort in ascending order on the Branch field (primary sort).

� Sort in descending order on the Payout field (secondary sort).

� Display the title, Betting Details by Branch, centrally over the Report.

� Display the appropriate field heading centrally over each column of data.

� Use a function to display the average for the Payout field at the bottom of the Report.Insert a label with the text Average Payout beside the function. Format average payoutto Currency, 2 decimal places.

Save this Report as Betting Details by Branch. Print the Report (in portrait orientation)either now or after the exam has finished.

Task 6

Produce a set of mailing labels for all dockets except those from the Waterford branch.The mailing labels should have the following format:

� Layout as shown below.

� Have more than one label across the sheet.

� Branch field in bold print.

� Print in ascending order by Branch.

Docket No Received Date

Branch

Type of Bet Win

Save these labels as Betting Labels

Task 7

Generate a report from the Betting Details Table, to include the following:

� Show all fields.

� Group the report by the Type of Bet field.

� Sort the records for each Type of Bet in descending order of Payout.

� Display the title, Analysis of Betting Results, centrally over the report.

� Display the appropriate field heading centrally over each column of data.

Step by Step Databases82

� Use a function to display the average payout for each type of bet. Insert a label withthe text Average Payout beside the function. Display the average payout in currencyformat with 2 decimal places.

� Use a function to display the total payout for each type of bet. Insert a label with thetext Total Payout beside the function. Display the total payout in Currency format withno decimals.

� Use a function to display the total payout for all bets displayed in the Report. Insert alabel with the text Overall Payout beside the function. Display the total payout inCurrency format with no decimals.

Save this report as Analysis of Betting Results. Print the report (in landscape orientation)either now or after the exam has finished.

DATABASE STRUCTURE FORM

Field Name Data Type Field Size

Table 11.11

Project Guidelines and Past Exams 83