database fundamentals · web viewwhen instructed to locate information in a database with phrases...

83
Database Fundamentals graphic organizer Student Activity Student Name Period Date DATABASE FUNDAMENTALS Page 1 of 83 Main Topic: Organizati on of a Database Four Major Database Objects: 1. 2. 3. 4. Table s Field – Definition and Example Record – Definition and Example Entry – Definition and Example Definition: Examples:

Upload: others

Post on 21-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

DATABASE FUNDAMENTALS

Page 1 of 62

Main Topic:

Organization of a Database

Four Major Database Objects:1.

2.

3.

4.

Tables

Field – Definition and Example

Record – Definition and Example

Entry – Definition and Example

Definition:

Examples:

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

GUIDED PRACTICE: SEARCH AN ONLINE DATABASE Directions: You will search an online database of airlines. Go to www.expedia.com and search for 5 round-trip flights to 5 different destinations. Answer the questions at the end of the activity when you have completed the search.

1. Flight One

Flight # Airline

Departure City Arrival City

Departure Time Arrival Time

Length of Flight Date Leaving

# of Stopovers Cost of Trip

2. Flight Two

Flight # Airline

Departure City Arrival City

Departure Time Arrival Time

Length of Flight Date Leaving

# of Stopovers Cost of Trip

3. Flight Three

Flight # Airline

Departure City Arrival City

Departure Time Arrival Time

Length of Flight Date Leaving

# of Stopovers Cost of Trip

Page 2 of 62

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

Page 3 of 62

Guided Practice: Search an Online Database Teacher-Demonstration

Student Name Period Date

4. Flight Four

Flight # Airline

Departure City Arrival City

Departure Time Arrival Time

Length of Flight Date Leaving

# of Stopovers Cost of Trip

5. Flight Five

Flight # Airline

Departure City Arrival City

Departure Time Arrival Time

Length of Flight Date Leaving

# of Stopovers Cost of Trip

Questions:1. What are the field names?

2. What is the name of the database?

3. How many entries were recorded in your search?

4. How many records were searched?

Page 4 of 62

Data Types and Field Properties graphic organizer Student Activity

Student Name Period Date

DATE TYPES AND

FIELD PROPERTIES

Text-based – used for data that will be sorted in alphabetical order or listed randomly, but will not be used in mathematical calculations

Yes/No (data type)Example:

Caption (field property)Example:

LookUp Wizard (data type)Example:

Input Mask (field property)Example:

Number-based – data type used for data that may be calculated, sorted, or filtered

Decimal places (field property)Example:

Currency (data type)Example:

Date (data type)Example:

Time (data type)Example:

Auto Number (data type)Example:

Primary key (data type)Example:

DATE TYPES AND

FIELD PROPERTIES

Text-based – used for data that will be sorted in alphabetical order or listed randomly, but will not be used in mathematical calculations

Yes/No (data type)Example:

Caption (field property)Example:

LookUp Wizard (data type)Example:

Input Mask (field property)Example:

Number-based – data type used for data that may be calculated, sorted, or filtered

Decimal places (field property)Example:

Currency (data type)Example:

Date (data type)Example:

Time (data type)Example:

Auto Number (data type)Example:

Primary key (data type)Example:

DATE TYPES AND

FIELD PROPERTIES

Text-based – used for data that will be sorted in alphabetical order or listed randomly, but will not be used in mathematical calculations

Yes/No (data type)Example:

Caption (field property)Example:

LookUp Wizard (data type)Example:

Input Mask (field property)Example:

Number-based – data type used for data that may be calculated, sorted, or filtered

Decimal places (field property)Example:

Currency (data type)Example:

Date (data type)Example:

Time (data type)Example:

Auto Number (data type)Example:

Primary key (data type)Example:

DATA TYPES AND

FIELD PROPERTIES

Text-based – used for data that will be sorted in alphabetical order or listed randomly, but will not be used in mathematical calculations

Yes/No (data type)Example:

Caption (field property)Example:

LookUp Wizard (data type)Example:

Input Mask (field property)Example:

Number-based –used for data that may be calculated, sorted, or filtered

Decimal places (field property)Example:

Currency (data type)Example:

Date (data type)Example:

Time (data type)Example:

Auto Number (data type)Example:

Primary key (data type)Example:

Review of Database Tables Student Activity

Student Name Period Date

REVIEW OF DATABASE TABLES

Part I Directions: Match the letters above with their definition below.

1. Field ______

2. Record ______

3. Entry ______

Part II Directions: Answer the questions below using the above diagram.

1. Number of entries _________

2. Number of records _________

3. Number of fields _________

Part III Directions: Identify the correct data type for each item using the list below

• Text • Number • Date/Time

• Yes/No

• Currency

• Memo • Lookup Wizard

1. 123-45-6789 (social security number) __________________

2. John __________________

3. $257.98 __________________

4. 12587 (employee ID number) __________________

5. Paid/Not Paid __________________

6. This item needs to be reordered. It is one of our best selling items. __________________

7. Series of choices (low, medium, high) __________________

A

B

C

Review of Database Tables Student Activity

Student Name Period Date

8. December 15, 2006 __________________

9. (555) 555-5555 (phone number) __________________

10. Pets Allowed/Pets Not Allowed __________________

11. Age of students __________________

12. Cost of trip __________________

13. Date of Purchase __________________

Part IV Directions: Place the parts of a database in order from the smallest unit to the largest unit. (1 being the smallest, 5 being the largest)

• Field • Character • Entry • Recor

1.2.

3.4.

5.

Part V: Match the definition to the correct term.

1. FieldA. Is also a true/false field. Will contain a

checkbox for yes no. Default is No.

2. Entry B. Monetary values

3. RecordC. Creates fields that automatically enter a unique

number when a record is added

4. TextD. Includes words and/or numbers not used in

calculations

5. NumberE. This format is applied to a field that will be

sorted chronologically

6. Input Mask F. Data and formulas keyed in a field

7. Yes/NoG. An efficient means of storing and retrieving data

and printing reports from the stored data

8. CurrencyH. One item of information in a record.

Represented by a column

9. Lookup Field

I. A group of related fields of information

10. Memo J. A format often applied to dates and times

11. Database K. Like text, but max of 64,000 characters

12. AutoNumb L. Allows you to create a finite set of choices for

Review of Database Tables Student Activity

Student Name Period Date

er that field’s entry values

Guided Practice: Create a Database: Computers Teacher Demonstration

Student Name: Period: Date:

GUIDED PRACTICE: CREATE A DATABASE: COMPUTERS Directions: In this activity, you will follow along with your teacher to create a database and complete the following tasks:

• Plan the structure• Enter data

• Add records• Delete records

1. The first step is to plan the structure. You will be creating a computer inventory database. For each item, you have the name of the manufacturer, the serial number, the room location, and the ID number of the student to which it is assigned. Based on this information and the data below, how many fields are needed in the database?

Notes:

2. What are appropriate field names?

Compaq 12345 214 5

Dell 54321 110 6

Dell 98765 310 9

Packard Bell 45678 214 3

Compaq 34567 110 4

Compaq 95425 111 8

Gateway 55557 109 8

Dell 90864 222 12

Dell 123674 214 15

Gateway 87093 119 27

Hewlett Packard 83765 111 22

3. In addition to assigning field names, the caption field property allows the user to enter more user-friendly column headings that will be visible when the database is viewed or printed.

Guided Practice: Create a Database: Computers Teacher Demonstration

Student Name: Period: Date:

Use the caption field property for each field name to assign user-friendly column headings

4. The next step is to determine the format and size of each field

Notes:

5. Name the database according to teacher directions and enter the data

Notes:

6. Edit the database to add the following records:

Hewlett Packard 88334 109 25

Compaq 22990 211 26

Dell 34419 110 27

Gateway 22334455 214 28

Notes:

7. Edit the database to delete the following 2 records:

Compaq with Serial Number 34567

Dell with Serial Number 123674

Notes:

Guided Practice: Database Management: Anti-Virus Teacher Demonstration

Student Name Period Date

INDEPENDENT PRACTICE: CREATE A DATABASE: SCAVENGER HUNT

Directions: In this activity, you will work independently to create a database based on information you gather from your classmates.

You will need to determine field names and captions, data types, and field properties by reading the questions below.

Once you have determined the fields, you will survey your classmates as assigned by your teacher.

You will then create a database to record your results.

Survey Questions:1. What is your first and last name?

2. Do you have blue eyes?

3. What is your favorite sport?

4. Do you have your driver’s license?

5. Are you a Senior, Junior, Sophomore or Freshman?

6. What is your favorite music group or band?

7. What is your favorite food?

8. What is your favorite color?

9. Are you left-handed or right-handed?

10. How old are you?

Guided Practice: Database Management: Anti-Virus Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: DATABASE MANAGEMENT: ANTI-VIRUS

Directions: In this activity, you will follow along with your teacher to complete the following tasks as you create a database of antivirus software:• Plan a database structure• Determine data types and field properties • Enter data• Use AutoNumber

• Add captions• Add a field• Delete a field• Print a table

Step 1: Determine the structure of the database and field properties. Item 3 has been completed for you as an example.

Field Name Data Type

Caption Field Propert

yScal

eDecimal Places

1. NA NA NA

2. Memo NA NA

3. NA NA

4. Rating Number Decimal 2 2

5. NA NA

6. NA NA

Step 2: Name the database and enter the data

Popular AntiVirus Software Titles Price Rating

.Mac 2.5 Retail $76.99 4.78

PC-Cillin 2003 $26.99 4.2

Norton AntiVirus 2002 Professional Upgrade $39.54 4.17

Bullguard AntiVirus Firewall $39.99 4

Norton Personal Firewall 2005 $42.50 4

Stomp Spy Ware X-terminator $22.79 3.83

eTrust EZ AntiVirus 2005 $24.99 3.8

Zone Alarm Internet Security Suite $59.99 3.6

PC-Cillin Internet Security 2005 $39.99 3.55

Webroot Spy Sweeper Internet Essentials Suite $54.99 3.67

Guided Practice: Database Management: Anti-Virus Teacher Demonstration

Student Name Period Date

Popular AntiVirus Software Titles Price Rating

McAfee AntiVirus Suite $39.99 4.25

Ad-Aware $59.99 4

Step 3: Add a field and its data to the database.

Compatibility Size

1. MAC 64 MB

2. W93 264 MB

3. MAC 264 MB

4. MAC 264 MB

5. XP 1 G

6. XP 1 G

7. W95 264 MB

8. W98 264 MB

9. W95 64 MB

10. XP 1 G

11. XP 1 G

12. XP 264 MB

Step 4: Delete a field.

Notes:

Notes

Independent Practice: Create a Database: Survey Student Activity

Student Name Period Date

INDEPENDENT PRACTICE: CREATE A DATABASE: SURVEY

Directions: In this activity, you will work independently to create a database of survey information as you complete the following tasks:

•Plan a database structure•Determine data types and field

properties•Enter data

•Use AutoNumber•Add a field•Delete a field•Print a table

Step 1: Plan the database structure. Use the table below to plan the field names and structure of the database based on the information in Step 2.

Field Name Caption Data Type Field Size

Step 2: Enter the data

Number Age Income Gender Number of Children

1 34 $25,000.00 M 2

2 45 $100,000.00 M 3

3 88 $50,000.00 M 1

4 25 $26,000.00 F 1

5 21 $39,000.00 M 0

6 58 $57,000.00 F 3

7 45 $37,000.00 M 3

8 46 $90,000.00 M 0

9 40 $58,000.00 F 2

10 36 $60,000.00 M 2

11 36 $72,000.00 F 2

Independent Practice: Create a Database: Survey Student Activity

Student Name Period Date

12 66 $22,000.00 M 2

Step 3: Add a field. Add the field Marital Status and enter the data in order as listed.

Marital Status

1. S

2. S

3. S

4. M

5. M

6. S

7. M

8. M

9. S

10. S

11. M

12. S

Follow teacher directions for printing, completing the final step of this activity (deletion of a field), and submitting your work. Ask your teacher which field to delete.

Guided Practice: Create a Database: MusicFun Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: CREATE A DATABASE: MUSICFUN

Directions: In this activity, you will follow along with your teacher to create a database and complete the following tasks:

• Add fields • Rearrange fields• Add entries

• Apply field formats: Date with

Input Mask AutoNumber

(review) Lookup Yes/No

1. Create the database structure as indicated in the table below.

Field Caption Type Size Format Description

Artist Artist Text 25 NA Name of the artist or group

CD Album Title Text 100 NA NA

Release Release Date Date/Time Format as Short Date

(Use Input Mask) Original release date

Notes:

Guided Practice: Create a Database: MusicFun Teacher Demonstration

Student Name Period Date

2. Enter the records in the table below. When keying the date, enter a zero before any single digit numbers, such as 04/03/2008.

Artist CD Title Release DateU2 How to Dismantle an Atomic Bomb 11/23/2004Green Day American Idiot 9/21/2004Ray Charles Genius Loves Company 8/31/2004John Legend Get Lifted 12/28/2004Alicia Keys Maximum Alicia Keys 12/14/2004Brooks and Dunn Red Dirt Road 7/15/2003Prince Purple Rain 10/25/1990Doobie Brothers Minute by Minute 2/22/2002Maroon 5 Songs About Jane 6/25/2002Kelly Clarkson Breakaway 11/30/2005Rolling Stones It’s Only Rock and Roll 7/26/1974Rolling Stones Made in the Shade 4/5/1975Rolling Stones Beggar’s Banquet 8/27/1968U2 War 5/15/1983U2 Achtung, Baby 11/19/1991

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

3. Add a new field named MusicianID. Use Auto-Number and set this field as a primary key.

Notes:

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

4. Add another new field named Genre.

a. Format the field as a Lookup and use the Lookup Wizard (or similar command relative to software) to create a drop-down list of genre options.

b. Enter the following values for the drop-down list:

Classical Country Pop R & B Reggae Rock

Notes:

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

5. Use the drop-down box just completed to select the correct genre for each of the artists.

Artist Genre Artist Genre1. Alicia Keys Pop 6. Kelly Clarkson Pop

2. Brooks and Dunn Country 7. Maroon 5 Rock

3. Doobie Brothers Rock 8. Prince R&B

4. Green Day Rock 9. Ray Charles R&B

5. John Legend R&B 10. Rolling Stones Rock

11. U2 Rock

6. Rearrange the fields: a. Move MusicianID to the first field in the table.

b. Make Genre the 2nd field

Notes:

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

7. Add the following entries.

Genre CD Title Artist Release Date

Classical Phantom of the Opera Andrew Lloyd Weber 11/23/2004

R & B The Essential Stevie Ray Vaughan and Double Trouble

Stevie Ray Vaughan 10/01/2002

Reggae Legend (The Definitive Remasters) Bob Marley 5/21/2002

Country Who Am I? Jessica Andrews 2/27/2001

R & B Best of Bonnie Raitt (US) Bonnie Raitt 9/30/2003

Classical Requiem Wolfgang Amadeus Mozart

NA

Classical Crimson Tide Soundtrack Hans Zimmer 5/16/1995

Country Here for the Party Gretchen Wilson 5/11/2004

Country Greatest Hits Shania Twain 11/9/2004

R & B Confessions Usher 10/5/2004

Pop Under the Table and Dreaming Dave Matthews Band 8/24/2004

8. Create a yes/no field. Add a new field to the database named Under25. The caption should be Under 25?

a. Format the field as yes/no

b. Click the box for each artist that is under the age of 25.

Notes:

Artist Under 25?Alicia Keys Y

Kelly Clarkson Y

Usher Y

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

INDEPENDENT PRACTICE: CREATE A DATABASE: B&BDirections: In this activity, you will work independently to create a database and complete the following tasks:

• Add fields • Rearrange fields• Add entries

• Format data types and field properties: Date with Input Mask AutoNumber (review) LookUp Yes/No

Part I1. Open a new database and save it as B&B (or as instructed by your teacher).

You will create a database for the Bed and Breakfast Association. Name the database table HistoricInns.

2. Plan the database structure. Determine the appropriate field names, types, and sizes according to the information in number 3 (on the next page) and write your answers in the spaces provided in the table below. The first one has been completed for you.

Name CaptionData Type/

Field Property

Format/Comments

Field 1 Inn Memo Field size = 50

Field 2

Field 3

Field 4

Field 5

Field 6

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

3. Enter the data using the table below.

Historic InnNo.

Rooms Available

Children under 10 allowed

Located in the city

Small Town or Mountain Community

Full Breakfast

WhiteGate Inn and Cottage (1889)

6 Yes Yes Mountain Yes

Inn on Montford (1900) 5 No Yes Mountain Yes

Secret Garden (1904) 3 No No Town Yes

Abbington Green 8 Yes Yes Mountain Yes

Albermarle Inn 11 No Yes Mountain Yes

A Bed of Roses 5 No Yes Mountain Yes

Biltmore Village Inn 6 No Yes Mountain Yes

Blake House Inn 6 Yes Yes Mountain Yes

Carolina Bed & Breakfast 7 Yes Yes Mountain Yes

Cedar Crest Victorian Inn 12 No Yes Mountain Yes

Chestnut Street Inn 8 Yes Yes Mountain Yes

Colby House 5 Yes Yes Mountain Yes

Dry Ridge Inn 8 Yes Yes Mountain Yes

The Hawk & Ivy 4 Yes No Town Yes

Inn on Main Street 7 No No Town Yes

The Lion and The Rose 5 Yes Yes Mountain Yes

North Lodge on Oakland 6 Yes Yes Mountain Yes

Owl's Nest Inn at Engadine

7 No No Town Yes

4. Add a new field so guests will know if pets are allowed. Inns allowing pets include the following:

Abbington Green Biltmore Village Inn Blake House Inn

Carolina Bed & Breakfast Owl’s Nest Inn at

Engadine

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

Independent Practice: Create a Database: B&B Student Activity

Student Name Period Date

Part II: Answer the following questions:

1. What is the default value of a Yes/No field?

2. How many records are in the database?

3. How many fields are in the database?

4. What advice would you give someone about assigning field names?

5. How could this database be used on the Internet?

6. How would Internet users benefit from this list if posted on the Internet?

7. How would the owners of the B & Bs benefit from this list if posted on the Internet?

8. What other fields might be useful?

9. What are two ways to toggle the yes/no field when entering data?

10. Save and submit according to teacher instructions.

Determining Sort Order Student Activity

Student Name Period Date

DETERMINING SORT ORDER

Directions for Part I: Place an A in the Order column for each scenario that is an example of ascending order or a D if the scenario is of descending order

Order Scenario

1. The class should line up from the shortest student to the tallest for the vault contest.

2. The library books were shelved in alphabetical order by author’s first name.

3. The most expensive items were listed first.

4. The family reunion photograph shows the babies in the front row and the great-grandparents in the last row.

5. The cities with the most snow days were listed first.

6. The first grade teacher’s mailboxes were assigned before the fifth grade teacher’s.

7. Bus 13 left the parking lot first, Bus 37 was second and Bus 73 left last.

8. The oldest student was allowed to go first in the lunch line, while the youngest was last to get his tray.

9. The mountains were listed on the board. The ones with the highest elevation were listed first while the ones with the lowest elevation were listed last.

10. The cities with the least snow days were listed first.

Determining Sort Order Student Activity

Student Name Period Date

Directions for Part II: Study each list below and determine the sort order. Write A for ascending and D for descending.

Order Scenario Order Scenario

1). a). a full tank of gas

b). ¼ tank of gas

c). running on empty

2). a). a can of coke

b). a 16 oz. bottle of coke

c). a 2 liter bottle of coke

3). a). a penny

b). a nickel

c). a dime

4). a). Seniors

b). Juniors

c). Freshmen

5). a). 1923

b). 1945

c). 1990

6). a). 04/15/2006

b). 07/04/2006

c). 09/25/2006

7). a). David

b). Christine

c). Becky

8). a). Rock

b). Pop

c). Classical

9). a). 150

b). 110

c). 90

10). a). Abbington Green

b). Dry Ridge Inn

c). Secret Garden

Understanding Operators Student Activity

Student Name Period Date

UNDERSTANDING OPERATORS

Understanding mathematical operators is necessary when conducting database searches and sorts and applying filters and queries. When instructed to locate information in a database with phrases such as shorter than, taller than, older than etc, you will need to translate the phrase into words that the database understands.

In this activity, you will demonstrate your skill at determining what operator to use by matching the mathematical symbol with the words or phrases below.

Directions for Part I: Match the symbols with their meanings

1. Less Than A. <>

2. Greater Than B. <=

3. Equal To C. >=

4. Less Than or Equal To D. =

5. Greater Than or Equal To E. <

6. Not Equal To F. >

Understanding Operators Student Activity

Student Name Period Date

Directions for Part II: Write the correct statement that would find each of the criteria.

Example: Criteria: At most 36 Answer: <=36

Criteria Statement

1. No more than 5

2. After 1950

3. Before 1920

4. Older than 18

5. Lower than 100

6. Taller than 6 feet

7. Students except Juniors

8. 100 or more

9. 100 or less

10. More than 2000

11. Under 32

12. Over 75

13. Smaller than 3

14. Shorter than 23

15. Not lower than 30

16. Younger than 50

17. At most 63

18. Population growth of 1.9%

19. Since 1941

20. All students except freshmen

Guided Practice: Filtering and Sorting a Database Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: FILTERING AND SORTING A DATABASE

You will follow along with your teacher on this activity to apply sort and filter operations to databases you have already created. You will discuss and explain the procedures as you proceed through the activity in order to confirm an understanding of database logic.

Part I: Retrieve the Survey database from Independent Practice: Create a Database: Survey and perform the following tasks:

1. Filter by selection for all males. How is this accomplished?

2. Filter/Advanced Filter Sort for all females with income over $25,000

o What fields will be used in the filter?

o What operator is used for each?

3. Filter for all participants with no children

o What filter was used?

4. Filter/Advanced Filter Sort for all males under the age of 50

o What filter was used?

5. Filter/Advanced Filter Sort for all females with income over $30,000 with children

o What filter was used?

Guided Practice: Filtering and Sorting a Database Teacher Demonstration

Student Name Period Date

6. In your own words, describe how filter and sort operations are used to manage information in a database. Think about the questions below when writing your answer using the back of this handout or on a separate sheet of paper.

o What purpose does a filter or sort operation serve

o What effect do filter and sort operations have on the user who is trying to retrieve information?

o When might a filter or sort operation be most beneficial?

o When might a filter or sort operation be least beneficial?

Part II: Retrieve the Computers database from Guided Practice: Create a Database: Computers. Imagine that the database contains 1,000 records and that it is an inefficient use of time to search by simply scrolling through the entries.

Use filter and sort to answer the following questions:

1. In which room will you find the computer with the Serial Number 87093?

o What filter was used?

2. What is the Serial Number of the computer used by Student #9?

o What two methods can be used to find this information?

3. Sort the Student # field in ascending order. List the room number, manufacturer and serial number of the next to last entry.

4. Format the Student Number field as text and perform the sort in Number 3 again. What happens and why?

5. Search for all computers in Rooms 109 or 111. List the serial number(s).

Independent Practice: Filtering and Sorting a Database Student Activity

Student Name Period Date

INDEPENDENT PRACTICE: FILTERING AND SORTING A DATABASE

You will complete this activity independently to apply what you have learned about sorting and filtering a database. For each item, you must copy the results of the affected field(s) into a word document. You should end up with 9 tables in one word document. Label each table appropriately and provide an explanation of how the sort/filter was performed for each.

Part I: Open the B&B database and complete the following sort tasks in the HistoricInns table.

1. Simple sort: Sort by the B&B Name in ascending order. Copy/paste the sorted B&B field to a word processing document.

2. Simple sort: Sort by the Number of Rooms field in descending order. Copy/paste the Inn field and Rooms field to a word processing document.

3. Complex sort: Move two appropriate fields adjacent to each other to accomplish the sort. Primary field: Rooms in ascending order; Secondary Field: Inn in ascending order.

If using Access, the left-most field will be sorted first, so for this sort, you must drag the Rooms field in front of the Inn field. Copy/paste the two fields to a word document.

Note: Be careful not to click a yes/no box by accident and change its value

Part II: Using the same database, complete the following filter by selection tasks

4. Historic Inns which do not allow pets

5. Historic Inns which allow pets

6. Historic Inns which allow children under the age of 10

7. Historic Inns located in town

(continued on the next page)

Independent Practice: Filtering and Sorting a Database Student Activity

Student Name Period Date

Part III: Using the same database, complete the following advanced selections8. Apply an advanced filter that selects records according to the following

conditions: Historic Inns that have more than 4 rooms available Descending order Allow both children and pets.

Write a criterion statement using operators

9. Apply an advanced filter that selects records according to the following conditions:

Historic Inns that have less than 6 rooms available Ascending order Located in a small town/country place Allows children.

Write a criterion statement using operators

10. Save and submit your work according to teacher directions.

Types of Relationships graphic organizer Student Activity

Student Name Period Date

TYPES OF RELATIONSHIPS

What is a database relationship and what are the benefits?

What is a primary key and why is it used?

What is a foreign key and why is it used?

What is referential integrity and why is it used?

Types of Relationships graphic organizer Student Activity

Student Name Period Date

One-to-One

One-to-Many

Defining Characteristic

s

Examples

Continued on next page

Types of Relationships

Types of Relationships graphic organizer Student Activity

Student Name Period Date

Many-to-Many

Examples

What is junction table and why is it used?

Defining Characteristic

s

Guided Practice: Database Relationships Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: DATABASE RELATIONSHIPS

In this activity, you will follow along with your teacher to establish a one-to-one relationship between two database tables.

1. Open the B&B Database.

2. Create a new table named Locations and enter the data below. The Inn field should be set as the primary key.

Inn Street City State Zip PhoneWhite Gate Inn and Cottage (1889) 173 E Chestnut St Asheville NC 28801 800-485-3045Inn on Montford (1900) 296 Montford Ave Asheville NC 28801 800-254-9569Secret Garden (1904) 56 N Main St Weaverville NC 28787 800-797-8211

Abbington Green 46 & 48 Cumberland Cir Asheville NC 28801 800-251-2454

Albemarle Inn 86 Edgemont Rd Asheville NC 28801 800-621-7435A Bed of Roses 135 Cumberland Ave Asheville NC 28801 888-290-2770Biltmore Village Inn 119 Dodge St Asheville NC 28803 866-274-8779Blake House Inn 150 Royal Pines Dr Asheville NC 28704 888-353-5227Carolina Bed & Breakfast 177 Cumberland Ave Asheville NC 28801 888-254-3608Cedar Crest Victorian Inn 674 Biltmore Ave Asheville NC 28803 828-525-1389Chestnut Street Inn 176 E Chestnut St Asheville NC 28801 800-894-2955Colby House Asheville NCDry Ridge Inn 26 Brown St Weaverville NC 28787 800-839-3899The Hawk & Ivy 133 N Fork Rd Barnardsville NC 28709 888-395-7254Inn on Main Street 88 S. Main St Weaverville NC 28787 877-873-6074The Lion and The Rose 276 Montford Ave Asheville NC 28801 800-546-6988North Lodge on Oakland 84 Oakland Ave Asheville NC 28801 800-282-3602Owl's Nest Inn at Engadine

2630 Smokey Mountain Park Hwy Candler NC 28715 800-665-8868

Guided Practice: Database Relationships Teacher Demonstration

Student Name Period Date

3. Open the B&B table and set the Inn field as the primary key there as well.

Notes:

4. Create a relationship between the two tables.Notes:

5. Set the link property to enforce referential integrity. What is referential integrity and what purpose does it serve?

Notes:

Guided Practice: Database Relationships Teacher Demonstration

Student Name Period Date

Answer the following questions:6. Describe and provide an example of a database relationship between two tables.

7. Describe and provide an example of referential integrity.

Independent Practice: Database Relationships Student Activity

Name: Period: Date:

INDEPENDENT PRACTICE: DATABASE RELATIONSHIPS

In this activity, you will work independently to create a one-to-one relationship between two database tables.

1. Create a new database using the information in the table below. Name the database StudentActivities and the table Student (or according to teacher directions). This table represents individual student records.

Format the Class field as a LookUp Field (drop-down box) with the following choices: Freshmen, Sophomore, Junior, and Senior.

Set the IDNo field as a primary key field and format it as number.

IDNo FirstName

LastName

Middle

Class Mentor

Parent

123654 Alice Anderson A. Freshmen Adams Arthur Anderson

147852 Bill Baker B. Freshmen Bowma

n Bonita Baker

159753 Chris Clark C. Sophomor

e Cook Charles Clark

456987 Debra Davis D. Junior Deaver Don Davis

789321 Eddie Epperson E. Senior Ellison Earl Epperson

963258 Frank Fox F. Sophomor

e Feldon Fred Fox

595936 Greg Getty G. Senior Goode Glenn Getty

159438 Hillary Hanson H. Senior Hague Harold Hanson

Independent Practice: Database Relationships Student Activity

Name: Period: Date:

224493 John Johnson J. Junior Jackson Jayson Johnson

2. Once all data has been entered, save and close the table.

Independent Practice: Database Relationships Student Activity

Name: Period: Date:

3. Create another table using the data below and name it Participation.

Format IDNo as number and set it as the primary key.

IDNo Activity

123654 Foreign Language

147852 Chess

456987 FBLA

789321 Skills USA

963258 FBLA

224493 SGA

4. Once all data has been entered, save and close the table.

5. Establish a relationship between the two tables using the ID field as the link.

6. Open the Student table and select the + button at the left on each student name to expand the relationships.

7. Answer the following questions:a. Why is this one-to-one relationship an effective method of displaying and

keeping records of student information?

b. How many students are involved in a club?

c. How many students are involved in a sport?

d. Which is the primary key?

e. Which is the foreign key?

f. What would make this data a one-to-many relationship?

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: ONE-TO-MANY RELATIONSHIPS

Directions: In this activity, you will follow along with your teacher to create a one-to-many relationship between two database tables.

1. Create the database table below. Name the database Pet Registry and the table PetOwners. Set the OwnerID field as the primary key.

PetOwners

OwnerID Name Street City State Zip

(919) 237-5454 Alvarez, Carlos 532 Compton Dr Raleigh NC 27609

(919) 444-3200 Archdale, Andy 234 Anderson Rd Raleigh NC 27608

(919) 541-8500 Blaine, Thomas 885 Tomato Ln Garner NC 27563

(919) 533-8566 Boxer, Rene 545 Irongate Rd Wake Forest NC 27555

(919) 555-3611 Carter, Jack 858 Miner Ln Clayton NC 27999

(919) 574-8567 Cheek, Libby 3843 John Riker Rd Burlington NC 28388

(919) 303-5208 Fuller, Cindy 23 Marks Dr Raleigh NC 27699

(919) 793-8574 Greggs, Tammy 2319 Southeast Rd Garner NC 28586

(919) 851-0787 Hall, Phyllis 2885 Winthrop Rd Raleigh NC 27569

(919) 854-8574 Hinson, Ted 5670 Ascot Way Wendell NC 27601

(919) 340-5350 Jones, Alice 434 Hope Church Rd Raleigh NC 27609

(919) 851-5688 Kline, Don 69 Candler Rd Burlington NC 27699

(919) 534-3421 Landis, Tony 658 Lumbar Dr Wendell NC 27800

(919) 857-8568 Lowery, Dana 674 Pebblecreek Ln Raleigh NC 28699

(919) 447-0007 Manness, Helen 342 Northcliff Rd Raleigh NC 27609

(919) 327-5618 Mannix, Joan 543 Anderson Dr Raleigh NC 27609

(919) 555-5235 Martin, Tad 8454 Low Country Rd Garner NC 27999

(919) 369-8545 Matthews, Ben 17 Blount St Raleigh NC 27555

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

PetOwners

OwnerID Name Street City State Zip

(919) 584-8578 McIntosh, Angela 8989 St Albans Rd Raleigh NC 29807

(919) 555-8645 Myers, Amy 894 Tar Heel Ln Chapel Hill NC 27890

(919) 567-8950 Nelson, James 838 Duke St Durham NC 28485

(919) 584-8546 Oriole, Madge 4534 Logan Rd Wendell NC 28553

(919) 568-8574 Pulasky, Cam 333 New Castle Rd Durham NC 28384

(919) 743-5655 Reynolds, Bonnie 2311 Nifong Way Garner NC 28563

(919) 856-7896 Sprinkly, Dwight 907 Wolfpack Rd Raleigh NC 28977

(919) 584-5558 Tims, Delores 8999 Capital Blvd Raleigh NC 28388

(919) 333-9089 Tomlinson, Lucy 79 Glenwood Ave Raleigh NC 27601

(919) 752-2345 Wilson, James 4521 Robinhood Ln Raleigh NC 28694

(919) 855-0507 Yow, Donna 9678 Peace St Raleigh NC 27699

2. Create another table in the PetRegistry database using the information below. Name the table PetRoster. Set the PetID field as the primary key.

PetRoster

OwnerID PetID Pedigree Weight Age AdoptionDate S/N Shots

(919) 534-3421 5101Sheepdog 100 2 yr 10/9/2009 Yes Yes

(919) 534-3421 5102Cocker Spaniel 34 2 yr 12/9/2009 Yes Yes

(919) 752-2345 5103Shepherd 5 6 mo 10/8/2009 No No

(919) 856-7896 5104Poodle 14 2 yr 9/1/2009 Yes Yes

(919) 555-5235 5105Coon Hound 50 1 yr 11/8/2009 Yes Yes

(919) 555-3611 5106Yorkie 7 3 yr 12/12/2009 Yes Yes

(919) 327-5618 5107Weimaraner 70 2 yr 2/6/2009 Yes Yes

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

PetRoster

OwnerID PetID Pedigree Weight Age AdoptionDate S/N Shots

(919) 327-5618 5108Weimaraner 72 2 yr 2/6/2009 Yes Yes

(919) 567-8950 5109Corgi 25 1 yr 1/3/2009 Yes Yes

(919) 369-8545 5110Vizsla 45 1 yr 3/3/2009 Yes Yes

(919) 547-8500 5111Tosa Inu 170 2 yr 4/4/2009 Yes Yes

(919) 333-9089 5112Tibetan mastiff 140 3 yr 4/5/2009 Yes Yes

(919) 857-8568 5113Scottish Terrier 21 4 yr 3/5/2009 Yes Yes

(919) 574-8567 5114Schnauzer 45 3 yr 5/2/2009 Yes Yes

(919) 743-5655 5115Rottweiler 130 2 yr 6/6/2009 Yes Yes

(919) 555-8645 5116Rat Terrier 12 1 yr 7/5/2009 Yes Yes

(919) 555-8645 5117Papillon 10 3 yr 6/6/2009 Yes Yes

(919) 584-5558 5118Otterhound 115 2 yr 7/6/2009 Yes Yes

(919) 854-8574 5119Newfoundland 150 3 yr 10/8/2009 Yes Yes

(919) 237-5454 5120Mastif 190 4 yr 11/10/2009 Yes Yes

(919) 584-8546 5121Lhasa Apso 13 2 yr 12/12/2009 Yes Yes

(919) 584-8546 5122Lowchen 18 3 yr 12/12/2009 Yes Yes

(919) 854-8574 5123Komondor 70 2 yr 12/12/2009 Yes Yes

(919) 534-3421 5124Kuvasz 114 3 yr 11/11/2009 Yes Yes

(919) 447-0007 5125Great Pyrenees 90 2 yr 12/25/2009 Yes Yes

(919) 568-8574 5126Keeshond 19 4 yr 4/2/2009 Yes Yes

(919) 752-2345 5127Jack Russell 17 3 yr 4/3/2009 Yes Yes

(919) 793-8574 5128 Ibizan Hound 50 4 yr 8/3/2009 Yes Yes

(919) 369-8545 5129 Irish Terrier 27 3 yr 9/8/2009 Yes Yes

(919) 541-8500 5130Havanese 10 2 yr 10/9/2009 Yes Yes

(919) 333-9089 5131Golden Retriever 75 4 yr 10/6/2009 Yes Yes

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

PetRoster

OwnerID PetID Pedigree Weight Age AdoptionDate S/N Shots

(919) 854-8574 5132Finnish Spitz 25 3 yr 11/9/2009 Yes Yes

(919) 857-8568 5133English Bulldog 54 2 yr 12/12/2009 Yes Yes

(919) 851-5688 5134Dachshund 11 3 yr 11/9/2009 Yes Yes

(919) 444-3200 5135Dalmation 40 2 yr 12/12/2009 Yes Yes

(919) 340-5350 5136Doberman Pinscher 90 3 yr 8/8/2009 Yes Yes

(919) 533-8566 5137Cairn Terrier 13 2 yr 2/3/2009 Yes Yes

(919) 303-5208 5138Basset Hound 45 3 yr 3/29/2009 Yes Yes

(919) 584-8578 5139Akita 120 2 yr 3/31/2009 Yes Yes

(919) 855-0507 5140Affenpinscher 9 1 yr 4/25/2009 Yes Yes

(919) 851-0787 5141Great Dane 100 5 yr 5/28/2009 Yes Yes

1. Once the data is entered, set a one-to-many relationship between the PetOwners table and the PetRoster table. It is one-to-many because the pet owners may have more than one pet and all pet adoptions are kept on file in the PetRoster table. Follow the procedures for creating a relationship by joining the OwnerID field in the PetOwners table with the same field of the PetRoster table.

Notes:

2. The county restricts the number of pets per household to three. Using the PetOwners table, determine how many additional pets can be adopted by the following pet owners by expanding the relationship column beside each owner’s name.

a. Tony Landis, (919) 534-3421

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

b. Dana Lowery, (919) 857-8568

c. Ted Hinson, (919) 854-8574

d. Phyllis Hall, (919) 851-0787

3. In your own words, explain the difference between one-to-one and one-to-many.

4. How do you know which is the “one” and which is the “many” in this relationship?

Independent Practice: One-to-Many Relationships Student Activity

Student Name Period Date

INDEPENDENT PRACTICE: ONE-TO-MANY RELATIONSHIPS

Directions: In this activity, you will work independently to create a one-to-many relationship between two database tables.

1. Open a new database and create the table below. Unless instructed otherwise, save the database as Publishers. Do not set a primary key.

Publications

Author Book Title

Hosseini, Khaled A Thousand Splendid Suns

Hopkins, Ellen Crank

Meyer, Stepheni Eclipse

Evanovich, Janet Four to Score

Rowling, J K Harry Potter and the Chamber of Secrets

Rowling, J K Harry Potter and the Deathly Hallows

Rowling, J K Harry Potter and the Goblet of Fire

Rowling, J K Harry Potter and the Half-Blood Prince

Rowling, J K Harry Potter and the Order of the Phoenix

Rowling, J K Harry Potter and the Prisoner of Azkaban

Rowling, J K Harry Potter and the Sorcerer's Stone

Rowling, J K Harry Potter: Paperback Box Set

Evanovich, Janet Lean Mean Thirteen

Meyer, Stepheni New Moon

Evanovich, Janet Plum Lovin'

Dungy, Tony Quiet Strength

Hillerman, Tony Skeleton Man

Hautman, Pete Sweetblook

Independent Practice: One-to-Many Relationships Student Activity

Student Name Period Date

Publications

Author Book Title

Hillerman, Tony The Dark Wind

Hosseini, Khaled The Kite Runner

Hillerman, Tony The Shape Shifter

Hillerman, Tony The Wailing Wind

Evanovich, Janet Three to Get Deadly

Evanovich, Janet Twelve Sharp

Meyer, Stephenie Twilight

2. Save the table as Publications unless otherwise instructed by your teacher

3. Create another table using the information below. Unless instructed otherwise, save the table as Authors. Set Author as the primary key.

Authors

Author Publisher

Evanovich, Janet Penguin Putnam Inc

Hautman, Pete Fulcrum Books

Hillerman, Tony Random House

Hopkins, Ellen Penguin Putnam Inc

Hosseini, Khaled Harper Books

Meyer, Stepheni Reader's Choice

Rowling, J K Markee Brothers

4. Once both tables have been created, saved, and closed, establish a one-to-many relationship between the Authors table and the Publications table

5. Open the Authors table and expand the relationship for each author

6. Save and submit your work according to teacher directions

Independent Practice: One-to-Many Relationships Student Activity

Student Name Period Date

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

GUIDED PRACTICE: MANY-TO-MANY RELATIONSHIPSDirections: For this activity, you will follow along with your teacher to complete a many-to-many relationship. In a many-to-many relationship, two tables with a one-to-many relationship are linked by a junction table. The Beach Rentals database contains three tables. The Properties table contains the names of the properties, property addresses, and owner information. The Customers table lists the names and contact information of renters. The Rentals table is the junction table.

Notes:

Which are the primary keys?

Which are the foreign keys?

If referential integrity is enforced, what affect will it have on the data?

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

Create three database tables from the information below in one database.Customers Table. Set the CustomerID field as the primary key. Use an input mask for the Phone field.

Properties Table. Set the PropertyID field as the primary key. Use an input mask for the OwnerPhone field.

Notes:

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

Rentals Table. This is the junction table. Use the Lookup property for the CustomerName and PropertyName fields using data from the Customers and Properties tables. Use AutoNumber for the ID field and set it as the primary key.

Notes:

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

View/establish the relationships and enforce referential integrity

Questions for discussion:

How can this type of relational database be used in business?

Why is it important to understand database relationships?

Why is it important to enforce referential integrity in this database?

Notes:

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

INDEPENDENT PRACTICE: MANY-TO-MANY RELATIONSHIPSDirections: For this activity, you will work independently to create a many-to-many relationship.

1. Create a new database named Flights2. Create a new table named Pilots using the information in the

table on the right

3. Set the PilotID field as the primary key

4. Format the PilotID field as Number

5. Use PilotName as the field name for the next column and enter the caption Pilot Name

6. Create another table named Flights and format it as follows:

Field Name Data Type Caption Notes

Flight# Number Same Make this the primary key

Airline LookUp Same Create a lookup field with theses choices:

• US Airways• Northwest• Continental• Delta

DepartureCity Text Departs from

DepartureTime Input Mask; medium time Depart Time

ArrivalCity Text Arrives at

ArrivalTime Input Mask; medium time Arrive Time

FlightTime Input Mask; _hr _m (custom format)

Duration Your teacher will guide you through this step

Cost Currency Same

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

7. Enter the data below into the Flights table and then save and close the table

8. Create a Reservations table using CustomerName, IDNo, and Flight# as field names

9. Enter Customer Name as the caption the CustomerName field

10. Format IDNo as number and the primary key

11. Insert a comment indicating that IDNo is the customer’s ID

12. Format the Flight# field as number

13. Enter the data on the right

14. Save and close the table

15. Create a fourth table and name it Junction16. The table will have three fields: IDNo, Flight#,

and PilotID

17. Format all fields as number

18. Enter the data (on the left)

19. Save and close the table

Reservations

Flights

Junction

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

20. Create a relationship between all tables by linking the primary keys of the Reservations, Pilots, and Flights tables to their matching fields in the Junction table.

21. Open the Flights table and answer the following questions:

a. How many pilots does Flight 919 have?

b. How many customers does Flight 919 have?

c. How many customers does Flight 1701 have?

d. How many pilots does Flight 1701 have?

22. Open the Pilots table and answer the following questions:

a. Which pilot has the most passengers?

b. Which pilot has the least?

23. How is the cross referenced information provided by the relationships helpful to the following people:

a. Customers

b. Pilots

c. Airline stewards

d. Reservations specialists

24. Save and submit your work according to teacher dirctions

Guided Practice: Importing Data Teacher Demonstration

Student Name: Period: Date:

GUIDED PRACTICE: IMPORTING DATAData used in a database table can be imported from other sources. In this exercise, you will follow along with your teacher to import a word processing file into a database. The procedures for importing data require that the data be arranged in rows and columns. When importing a data processing document, the file format must be saved as text.

Directions: 1. Using word processing software, key the information below (raw data) in the

exact format with the commas, spacing, and line returns.

Raw Data:Event No.,Event,Level,Transcript,Objective Test

1,Accounting I,HS,Y,Y

2,Accounting II,HS,Y,Y

4,Banking and Financial Systems,HS,N,Y

5,Business Calculations,HS,N,Y

6,Business Communication,HS,N,Y

10,Business Law,HS,Y,Y

11,Business Math,HS,Y,Y

14,Business Procedures,HS,Y,Y

2. Save the data in text format.

3. Open the database software and name the database FBLA unless otherwise instructed.

4. Follow procedures for importing the data into a database table.

Notes:

5. Store the data in a new table. Name the table Competitive Events unless instructed otherwise.

Guided Practice: Importing Data Teacher Demonstration

Student Name: Period: Date:

INDEPENDENT PRACTICE: IMPORTING DATA

Directions: In this exercise, you will work independently to import a word processing file into a database. Key the data below using word processing software and save it in text format using a file name assigned by your teacher. Import the data into a database table and submit your work according to teacher directions. Complete the written response section at the end of this activity.

Points to Remember: Remember, you must have an open database before you can import a file.

Once the data has been imported, format the field properties so that the Enrollment field has comma separators and zero decimal places and the Tuition fields are formatted as currency.

Name the database according to teacher directions.

Answer the questions at the end of this activity and submit your work.

Raw Data:Name,Ownership,Type,Enrollment,InState,OutofState

Appalachian State,Public,4 yr,14653,$4000,$13600

East Carolina,Public,4 yr,22767,$4487,$15000

Fayetteville,Public,4 yr,5441,$3860,$13596

A & T,Public,4 yr,10383,$4200,$13000

UNC Chapel Hill,Public,4 yr,26878,$5513,$19311

UNC Greensboro,Public,4 yr,15329,$49440,$16500

UNC Wilmington,Public,4 yr,11574,$4694,$14405

Winston-Salem State,Public,4 yr,4805,$3905,$12545

Written Response:Write a step by step procedure for importing data from a word processing file into a database table.

Database Concept Review Student Activity

Student Name: Period: Date:

DATABASE CONCEPT REVIEW

Directions: Answer the questions below.

1. In your own words provide the definition of a database.

2. List 3 examples of a database.

3. What is a database relationship?

4. Number the following database elements in order from largest to smallest.

a. _____ Field

b. _____ Database

c. _____ Record

d. _____ Entry

Independent Practice: Create a Database: Scavenger Hunt Student Activity

Student Name Period Date

5. Match the field types with the correct definition.

Texta. Allows you to create a finite set of choices for

that field’s entry values.

Number b. Is a true/false field

Lookup Wizard c. Date and time entries in various formats.

Date/Timed. This includes not only words, but also

numbers not used in calculations.

Currencye. This field may not include anything other than

numbers.

AutoNumber f. Like text, but max of 64,000 characters.

Yes/Nog. Creates fields that automatically enter a

unique number when a record is added.

h. Currency values expressed in various formats.