5.02 Notes Student
Upcoming SlideShare
Loading in...5
×
 

5.02 Notes Student

on

  • 2,686 views

 

Statistics

Views

Total Views
2,686
Views on SlideShare
2,654
Embed Views
32

Actions

Likes
1
Downloads
39
Comments
0

1 Embed 32

http://moodle.ucps.k12.nc.us 32

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    5.02 Notes Student 5.02 Notes Student Document Transcript

    • 5.02 Notes Database Reports • What is a database query, how is it used, and how does it differ from a filter? • What is a form, how is it used and formatted, and how does it differ from a table? What is a database report? How is it used? What report components are used to control and enhance the appearance of the report and why? Database Objects I. Query. A query is a database object created by placing filters and selecting multiple criteria (comparison operators) to extract information from one or more tables. The resulting data becomes an object that can be saved, recalled, and used to perform other operations. A. Advantages of a Query 1. A query can be saved and used to perform other operations 2. One table can be associated with multiple queries 3. A query can perform specialized operations, such as performing calculations on field values, and placing the results in a new column or datasheet B. Difference Between a Query and a Filter 1. A filter is a one-time deal. It allows application of a set of selection criteria and/or sorting instructions to the records in a table. It is a quick temporary tool that is created for one-time use in the context of a particular table. 2. A query is reusable. It allows selection criteria and/or sorting instructions to be saved and reused. C. Comparison Operators used in Queries 1. Less than or equal to (<=) 2. Greater than or equal to (>=) 3. Not equal to (<>) 4. Less than (<) 5. Greater than (>) 6. Equal to (=) D. Conditional Operators 1. And – reduces the number of records because both conditions must be met. 2. Or – increases the number of records because one or the other condition must be met. 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 192
    • 5.02 Notes Database Reports II. Form. A form is a database object that is used to create a user-friendly format for data entry and retrieval. Forms may include drop-down menus, instructions, navigational controls, and graphics. A. Advantages of Forms 1. Expedite the search and data entry processes 2. Easy to read and understand 3. Allow information to be censored B. Common Elements of Forms 1. Graphics, such as lines, images, and shapes are stored in the form’s design. 2. Data displayed on forms is derived from the fields in the underlying table or query or may be added by the user. 3. Calculations are performed by properties that are set by a user within the form’s design. 4. Controls define how data can be entered, viewed, or used in calculations 5. Descriptive text can be added to a form for the purpose of identifying fields and forms or adding captions or prompts. 6. Subforms are forms within and related to a main form through a common field. III. Report. A report is a database object used to organize, summarize, and print some or all of the data from one or more database tables or queries. It is used to present data in an attractive format with user selected fonts, colors, shading, borders, graphics, and other enhancements. A. Advantages of Reports 1. Reports can group data from multiple tables, use the data in calculations, and add headings and other format enhancements to clarify database information. 2. Reports can be saved and updated. 3. Reports can be printed in landscape or portrait orientation. 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 193
    • 5.02 Notes Reports B. Report Components 1. Report header – appears once at the beginning of a report and usually contains items such as the company name, address, and logo. 2. Page header – appears at the top of every page and usually contains field names. 3. Group header – lists the field names in which the data is grouped 4. Detail section – contains the report details or content information; required 5. Group footer – used to display sums, counts, or averages of groups of data 6. Page footer – used to display page numbers and dates. 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 194
    • Q-F-R graphic organizer Student Activity Student Name Period Date 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 195
    • Q-F-R graphic organizer Student Activity Student Name Period Date Q–F–R A query is: Advantages of a Query 1. 2. 3. The difference between queries and filters: Comparison Operators Conditional Operators 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 196
    • Q-F-R graphic organizer Student Activity Student Name Period Date 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 197
    • Guided Practice: Query: B&B Database Teacher Demonstration Student Name Period Date GUIDED PRACTICE: QUERY: B & B DATABASE Directions: In this activity, you will follow along with your teacher to query a database. Using the B&B database and the HistoricInns table last edited in Objective 5.01, create and name the following queries. Be certain that only the desired fields are shown in the results of the query. Instructions for Query 1: 1. Query for records that meet the following conditions and save it as Choice: • Name of inn in ascending order • Greater than 4 rooms available AND • Located in the city AND • Allows children. Field Inn Rooms Children City Sort Ascending Criteria >4 =yes =yes Record the steps for creating the query below: 2. Look at the bottom of the query in design view and notice that no filter has been applied. This means that the query has extracted the data from the Historic Inns table and placed it into the Choices query. As far as this query is concerned, the remaining data no longer exists. 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 198
    • Guided Practice: Query: B&B Database Teacher Demonstration Student Name Period Date 3. Save and close the query 4. Select the Historic Inns table and perform an advanced filter/sort using the following criteria and sort order. Field Inn Rooms Children City Sort Ascending Criteria >4 =yes =yes Record the steps for creating the filter below: 5. Once the filter has been applied, are the results the same as the query? 6. What happens when you try to save the filter? 7. Look at the bottom of the filter and notice that the Filtered box is highlighted (or active). This means that the filter has hidden the data from the Historic Inns table that does not match the criteria. If you click on the filtered box to turn the filter off, the hidden records will reappear. 8. In your own words, summarize the difference between a query and a filter. 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 199
    • Guided Practice: Query: B&B Database Teacher Demonstration Student Name Period Date Instructions for Query 2: 1. Query the Historic Inns and Location tables for the following information: Historic Inns Table • Name of inn in ascending order • Less than 10 rooms available AND • Located in the city (do not show this field) AND • Allows pets Location Table • Street • City • State • Zip • Phone Table Historic Inns Location Field Inn Rooms City Pets Street City State Zip Phone Sort Ascending Criteria <10 =yes =yes 2. Save the query as Pets. 3. Describe the results. a. What are the names of the Inns? b. Which inns have the same number of rooms? c. Which inns have the same zip code? 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 200
    • Guided Practice: Query: B&B Database Teacher Key GUIDED PRACTICE: QUERY: B & B DATABASE KEY Query 1 Difference between query and filter: A query provides permanent listing of only the information requested whereas the filter provides all information, but simply hides fields that are not requested. A filter is not permanent. A filter can be applied to a query. Query 2 5. Once the filter has been applied, are the results the same as the query?............................Yes 6. What happens when you try to save the filter?.................................The whole table is saved 3a. Names of the inns:.....................................................Abbington, Biltmore, Blake, Carolina 3b. Inns with the same number of rooms......................................................Biltmore and Blake 3c. Inns with the same zip code............................................................Abbington and Carolina 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 201
    • Guided Practice: Query: B&B Database Teacher Key 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 202
    • Independent Practice: Query: Pet Registry Database Student Activity Student Name Period Date INDEPENDENT PRACTICE: QUERY: PET REGISTRY DATABASE Directions: In this activity, you will work independently to query a database. Using the Pet Registry database last edited in Objective 5.01, create and name the queries listed below. Be certain that only the desired fields are shown in the results of the query. Save and submit your work according to teacher instructions. Query 1: 1. Query the PetRoster table for the sort order and criteria listed below. Save the query as LargeBreed and answer the questions that follow. • Pedigree in ascending order AND • Adoption date after 3/29/2009 AND • Weight greater than 70 lbs. Field Pedigree Adoption Date Weight Sort Ascending Criteria >3/29/2009 >70 2. Perform an advanced filter on the query for large breeds weighing more than 100 lbs. Questions for Query 1 1. How many records resulted from the query? 2. How many breeds? 3. What is the latest date of adoption? 4. How many records resulted from the filter? 5. What is the effect of filtering a query? 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 203
    • Independent Practice: Query: Pet Registry Database Student Activity Student Name Period Date Query 2: 1. Query the PetRoster and PetOwners tables for the sort order and criteria listed below. • Pedigrees equaling Doberman Pinscher, Mastif, or Rottweiler in ascending order • Owner Name • Owner Street • Owner City • Owner State • Owner Zip Table Pet Roster Pet Owners Field Pedigree Owner Owner Owner Owner Owner Zip Name Street City State Sort Ascending Ascending Criteria =Doberman Pinscher OR Mastif Rottweiler 2. Save the query as Power Breeds and answer the following questions. Questions for Query 2 1. How many records resulted from the query? 2. How many of each breed? 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 204
    • Independent Practice: Query: Pet Registry Database Teacher Key INDEPENDENT PRACTICE: QUERY: PET REGISTRY DATABASE KEY Query 1 1. How many records resulted from the query? • 14 2. How many breeds? • 14 3. What is the latest date of adoption? • 12/25/2009 4. How many records resulted from the filter? • 8 5. What is the effect of filtering a query? • It further refines the data. Query 2 1. How many records resulted from the query?........................................................3 2. How many of each breed?.....................................................................................1 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 205
    • Q-F-R graphic organizer Student Activity Student Name Period Date Q–F–R A form is: Uses: Advantages of a Form: 1. 2. 3. 4. Common Elements of Forms: 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 206
    • Q-F-R graphic organizer Student Activity Student Name Period Date 6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.02 page 207
    • Guided Practice: Forms Teacher Demonstration Student Name Period Date GUIDED PRACTICE: FORMS Directions: For this activity, you will follow along with your teacher to take notes and create a form. 1. Design an address book database using the fields and field types listed. Name the database AddressBook and the table Contacts. Once you have created the database, save and close. You will add records to the table after a form has been created. Data Field Name Properties Type Last Text 15 First Text 10 Street Text 25 City Text 20 State Text 3 ZIP Text 10 Home Phone Text Use Input Mask to format phone number Work Phone Text Use Input Mask to format phone number Cell Phone Text Use Input Mask to format phone number Birthday Date Short Date Anniversary Date Short Date Business Text 50 Contact Type Text Look Up Field (friend, family, business) Notes:
    • Guided Practice: Forms Teacher Demonstration Student Name Period Date 2. Create a form and save it as Contacts or according to teacher directions. Notes: 3. Enhance the form’s design by including some of the following modifications: a. Arrange the fields into a design that is both attractive and allows for easy data input b. Change the background color c. Add a graphic d. Format the labels by changing font color/size e. Add a header label indicating the address book owner’s name Notes:
    • Guided Practice: Forms Teacher Demonstration Student Name Period Date Note the example forms demonstrating font style changes, header added, background color change, and rearranged fields.
    • Guided Practice: Forms Teacher Demonstration Student Name Period Date 4. Enter data into the address book using the form. In addition to the contacts listed in the table, add five personal entries for a total of 15 records in the database. Home/Work/Cell Birthday Business Type of Name and Address Phones Anniversary (if any) Contact Ronnie Caldwell H-828-555-1232 6019 Sand Hill Road B-Feb. 19, 1987 Friend C-828-555-2321 Hot Springs, NC 28743 John Bond 437 Nathan Drive W-828-555-2574 Bond’s Used Busines Beech Mountain, NC C-828-555-1122 Cars s 28604 Dee Dee Trilling H-678-555-8858 Williams and B-June 3, 1981 56 College Street C-678-555-3312 Willis Family A-July 1, 2005 Company Atlanta, GA 30301 W-678-555-2577 Edward Jones H-919-555-2264 B-Nov. 22, 56 Central Avenue 1960 Computer C-919-555-4622 Family Durham, NC 27722 A-June 15, Controls W-919-555-9992 1988 Sandra English C-903-555-3124 Acme Web Busines 13245 Cowboys Lane W-903-555-4213 Designers s Dallas, TX 75222 Lynn Keith H-828-555-1414 Carolina B-March 3, 29 North Market Street C-828-555-6379 Tractor Friend 1990 Asheville, NC 28801 W-828-555-2507 Company Melinda Owens 226 Hazel H-865-555-9651 B-May 23, 1995 Family Knoxville, TN 37902 Keith Black H-803-555-9611 Bilt-Rite Busines 44 Columbia Road C-803-555-1217 Buildings s Camden, SC 29020 W-803-555-3627 Brenda Fisher C-704-555-3212 Carolina Fine Busines 19 Orchard Circle W-704-555-2020 Furnishings s Charlotte, NC 28212 Wayne Anderson H-919-555-1976 B-Dec. 2, 1988 1056 Bailey Street C-919-555-6565 Ace Hardware Friend A-Jan. 1, 2005 Raleigh, NC 27634 W-919-555-4185 Notes:
    • Guided Practice: Forms Teacher Demonstration Student Name Period Date 5. Sort the forms in ascending order by name (last, first). Print the data table. 6. Find the record for Wayne Anderson and change the cell phone number to 555-7256. Print this individual form. Notes: 7. Filter the records for Friends. Sort these records in ascending order and print the last form. Notes:
    • Guided Practice: Forms Teacher Key GUIDED PRACTICE: FORMS KEY Printed form for Wayne Anderson Printed form of last Friend in sort Student answers will vary.
    • Independent Practice: Forms Student Activity Student Name Period Date INDEPENDENT PRACTICE: FORMS Directions: In this activity, you will work independently to create a database form and add entries. 1. Open the Customers table from the United Grocers database that has been sent to you electronically by your teacher. 2. Save the database to your files. 3. Create a form using all fields in the customers table 4. Set the Store ID as the primary key 5. Make any design changes you wish, but make sure all data is aligned to the left 6. Save the form as Customers 7. Add the following records using the form just created and then save and submit according to teacher directions
    • Independent Practice: Forms Teacher Key INDEPENDENT PRACTICE: FORMS KEY In this activity, you will work independently to create a database form and add entries
    • Guided Practice: Add Subforms Teacher Demonstration Student Name Period Date GUIDED PRACTICE: ADD SUBFORMS Directions: The goal of this activity is to add a subform to the Customers form created in the previous activity. You will follow along with your teacher and the Forms and Subforms PowerPoint to complete this activity. 1. Open the United Grocers database that has been sent to you electronically by your teacher and save it to your files 2. The United Grocers database should contain four tables (Slide 2): a. Purchase Orders b. Orders c. Customers d. Grocery Products 3. Before the subform is created, it must be planned. What information is desired? What information is required in order to extract the desired information? 4. Queries are an easy way to extract data for use in subforms. 5. View Slide 3 to understand the building blocks of the query and how each table is dependent upon and related to its neighbor. 6. View Slides 4 and 5 to understand why certain fields are required in the query. 7. One additional field must be included in the query so that the subform will communicate with the main form. View Slide 6. 8. Create a query using the tables and fields below and save the query as Table Customers Orders Purchase Orders Grocery Products Field Store ID Store Order Order Order Quantity ISBN ISBN Unit Product ID No Date No. Price Customers Query 9. View the query results on Slide 7 10. Open the Customers form in design view (Slide 8) 11. Insert a subform to the right of the customer data 12. Select the option to use existing queries and select the Customers Query 13. Include the following fields from the query: a. Customers_Store ID b. Orders_Order No
    • Guided Practice: Add Subforms Teacher Demonstration Student Name Period Date c. Order date d. Purchase Orders_ISBN e. Quantity f. Unit Price g. Product 14. Select the option to show customers query for each record in customers using store ID 15. View Slide 9 for a graphic of the subform in design view 16. Open the properties menu on the subform and set the default view for the subform to single form (Slide 10) 17. View the form and verify that the subforms are consistent with the main forms (Slide 11) a. Record 1 of the main form is for Harris Teeter, Store ID 410432 b. Record 1 of the subform is for the same store, Order No 1 c. Record 2 of the subform is for the same store, Order No 3 18. View Slide 12 to see the subform and main form for a different store
    • Independent Practice: Add Subforms Student Activity Student Name Period Date INDEPENDENT PRACTICE: ADD SUBFORMS Directions: In this activity, you will work independently to add a subform. The subform will be the result of a query created from the two tables you will create below. 1. Create a new database and name it Hair 2. Create a table and enter the records below. Save the table as Prices and set the ID field as the primary key. 3. Create another table and enter the records below. a. Save the table as Orders. b. Use the PO# field as the primary key and use AutoNumber. c. Use the lookup property to retrieve the products from the Prices table and enter them in the Product field. Notes:
    • Independent Practice: Add Subforms Student Activity Student Name Period Date 4. Create a query named Orders and include the following fields: a. Orders table: i. PO # ii. Customer iii. Quantity iv. Product b. Prices table: Include only the Prices field 5. Establish the relationships indicated in the graphic below: 6. Create a main form from the Orders table that includes only the Customer field. 7. Create a subform using the Orders query that includes all fields. a. Adjust the size of the subform to fit attractively within the main form. b. Set the view property to continuous forms. 8. Describe the process used to complete this activity. 9. Save and submit your work according to teacher directions.
    • Independent Practice: Add Subforms Student Activity Student Name Period Date
    • Independent Practice: Add Subforms Teacher Key INDEPENDENT PRACTICE: ADD SUBFORMS KEY
    • Q-F-R graphic organizer Student Activity Student Name Period Date Q–F–R A database report is Common Uses: Advantages: Report Components Header Section Report header Page header Group header Detail section Footer Section Page footer Group footer
    • Q-F-R graphic organizer Student Activity Student Name Period Date Identify the Parts of the Report 1 1. 2 2. 3 3. 4. 4 5. 5 6. 6
    • Guided Practice: Reports Teacher Demonstration Student Name Period Date GUIDED PRACTICE: REPORTS In this activity, you will follow along with your teacher to prepare mailing labels and a report from the United Grocers database. Labels 1. Select the option to create labels 2. Select the Customers database table 3. Select Avery, product number 5160 4. Select font size and weight (12 pt, Normal) 5. Select all fields from the Customers Table except Manage and Phone and align them on the prototype label 6. Sort by the Store Name 7. Save the labels as Customer Labels and view Report 1. Create a report using the following fields from the Products table a. ISBN b. Product c. Category d. Unit Price e. Quantity per Unit 2. Select the option to group the data by category and to sort the data in ascending order by product name 3. Grab and move the Unit Price column in front of the ISBN column 4. Make any enhancements to the report 5. Save
    • Guided Practice: Reports Teacher Demonstration Student Name Period Date
    • Guided Practice: Reports Teacher Key GUIDED PRACTICE: REPORTS KEY For a clear view of this document, view the report in the United Grocers Database
    • Guided Practice: Reports Teacher Key
    • Independent Practice: Reports Student Activity Student Name Period Date INDEPENDENT PRACTICE: REPORTS Directions: In this activity, you will work independently to create two reports. Once you have created the report, add enhancements that make the form attractive and user- friendly. You will need the Pet Registry database to complete this report. The Moore County Animal Shelter wants to view a report of all adoptions in the database to analyze the data and determine when and what kind of dogs are most often adopted. 1. Create a query saved as Report Query that is sorted according to the following criteria: a. PetOwners table i. Owner ID ii. Name iii. Street iv. City v. State vi. Zip b. Pet Roster table i. Pedigree ii. Adoption Date 2. Create a report using all of the fields in the query. a. The report should be grouped by Pet Roster first and Adoption Date second. b. Sort the data by adoption date and sorted by Pedigree and Owner Name, both in ascending order. c. Format the report to print in landscape view. d. Key Adoption Trends as the header of the report and save it by the same.
    • Independent Practice: Reports Teacher Key INDEPENDENT PRACTICE: REPORTS KEY For a clear view of this data, view the report in the Pet Registry Database