5.01 Activity Notes A

118
5.01 Student Activities Notes How is database information used, organized, and managed in business? For what purposes? Database Uses in Business I. Database Use and Purpose – A database is a tool used to organize, store, retrieve, and communicate groups of related information. A. Examples of databases and database uses in business and society: 1. phone book 2. online library card catalog 3. payroll data including employee names, social security numbers, pay rates, exemptions, etc. 4. eBay and other online businesses use databases to maintain inventory and keep track of customers, products, vendors, pay pal accounts B. Tables are the building blocks of all databases. They are used to group and organize the information within a database. 1. A table is an arrangement of columns and rows. It is the fundamental building block of all databases. 2. An entry is a single piece of data in a database table. 3. A field is a grouping or category of similar information contained in a table; a unique identifier for a category of information 4. A record is a complete description of all of the fields related to one item in a table. II. Data Types, Field Properties, Primary Keys, and Printing

description

 

Transcript of 5.01 Activity Notes A

Page 1: 5.01  Activity Notes A

5.01 Student Activities Notes

How is database information used, organized, and managed in business?

For what purposes?

Database Uses in Business

I. Database Use and Purpose – A database is a tool used to organize, store, retrieve, and communicate groups of related information.

A. Examples of databases and database uses in business and society:

1. phone book

2. online library card catalog

3. payroll data including employee names, social security numbers, pay rates, exemptions, etc.

4. eBay and other online businesses use databases to maintain inventory and keep track of customers, products, vendors, pay pal accounts

B. Tables are the building blocks of all databases. They are used to group and organize the information within a database.

1. A table is an arrangement of columns and rows. It is the fundamental building block of all databases.

2. An entry is a single piece of data in a database table.

3. A field is a grouping or category of similar information contained in a table; a unique identifier for a category of information

4. A record is a complete description of all of the fields related to one item in a table.

II. Data Types, Field Properties, Primary Keys, and Printing

A. Before a database can be built, the user must first define its purpose and determine how the data will be organized into fields.

1. Fields should be formatted in accordance with the data they contain so that the database can be searched, used in calculations, and sorted as needed.

2. A field name should be short and descriptive

3. A data type defines the value of a cell and a field property defines the format of the data within the cell

B. Data types: used to control how data in a particular field will be searched, sorted, or used in calculations. The default format is text.

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

Page 2: 5.01  Activity Notes A

5.01 Student Activities Notes

2. Memo – a data type used for lengthy entries that allows combinations of text and numbers

3. Number – used for data that may be calculated, sorted, or filtered.

4. Date/time – data type used to arrange and sort data chronologically, often used with the input mask field property

5. Currency – data type used to format numbers as decimal values with a dollar sign. The default format for currency is two decimal places.

6. Auto Number – used to automatically assign a number to each record and to assist in preventing duplication of data.

7. Yes/No – a data type in toggle format that allows a user to select a yes or no value in a database cell. The default setting is No.

8. Lookup Wizard – a data type used to define preset values for database entries. This feature increases productivity and accuracy by reducing the amount of data entry required.

C. Field properties – used to control how data is entered in a field

1. Field size – used to control the size of the field, measured in characters

2. Format – used to control the layout of the field, such as one or two decimal places

3. Input Mask – a template-like field property that regulates how data is entered in a cell. For example, if the phone number input mask is used, the user will be prompted to input data in a specific format, such as (919) 555-5555.

4. Caption – a field property used for column naming that allows a more user-friendly and properly formatted field name than the field name stored in the database design

D. Editing and Printing – Procedures to add and delete records and fields, edit field names, rearrange fields in a database and print.

III. Database Management – The effectiveness of a database can be measured by the user’s ability to retrieve useful information.

An effective database is one that contains timely information and thus requires continuous maintenance.

o Consider the telephone directory and the amount of information that must be gathered, edited, and processed to provide customers with accurate information.

Many tools are available to assist in the retrieval, processing, and manipulation of database information.

A. Filters allow for the retrieval of information that meets specific criteria.

Page 3: 5.01  Activity Notes A

5.01 Student Activities Notes

1. Filter by Selection – filters for information related to an active cell

2. Filter/Advanced Filter Sort – used to define specific search criteria

B. Sorts allow for information to be arranged in a specific order such as alphabetical, chronological, ascending, or descending.

C. Database Relationship – a link between two or more tables in a database

The relationship is developed when common fields in the tables are linked, such as the Customer ID field in a Customer Address table and the Customer ID field in a Purchases table.

The relationship enhances the power of the database by allowing retrieval of data from multiple tables and eliminating the need for data duplication.

1. Types of Relationships

a. One-to-Many is a type of relationship that occurs when a record in one table is linked to more than one record in another table.

b. Many-to-Many relationships are formed by connecting two or more tables that have a one-to-many relationship. The connection is made by a Junction Table.

2. Relationship Components

a. Primary Key – used to format each record in a database as a unique entity. Primary keys allow database tables to communicate.

i. May be assigned to an existing field that contains information unique to each record.

ii. May be assigned via an AutoNumber field that automatically assigns a unique number to each record.

iii. The linked fields must be of the same data type and size

b. Foreign key – when tables are linked by the primary key, the related field in the second table is known as the foreign key

c. Junction table – a table used to join primary key fields from multiple tables

d. Join line – a graphical representation of the link between two or more tables

Page 4: 5.01  Activity Notes A

5.01 Student Activities Notes

e. Referential integrity protects related data that is stored in multiple tables.

Referential integrity would prevent a customer in a customers table from being deleted if the customer’s ID also appears in the order table

IV. Raw Data Import - A useful and practical method for obtaining information from other sources and creating database tables. Eliminates the need for repetitive data entry and assists in the protection of the data’s integrity.

A. Must be formatted as text

B. Must be separated at field and record breaks with a separator, such as a comma (delimitated)

Page 5: 5.01  Activity Notes A

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

DATABASE FUNDAMENTALS

Directions: Record notes while viewing the Database Fundamentals Power Point

Definition:

Business Uses of Databases Can you associate company names with the database examples?

Telephone book: Customer data: ____________________

Student Data: Real estate listings: _________________

Music: Hospital/patient data: _______________

Fingerprints: Inventory: _________________________

Dictionaries: : ____________________

Tables

Main Topic:

Organization of a Database

Four Database Objects:

1.

2.

3.

4.

Queries, Forms, and Reports will be discussed in 5.02

Just list the names of the objects here; don’t worry about definitions yet.

Page 6: 5.01  Activity Notes A

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

Field – Definition and Example

Record – Definition and Example

Entry – Definition and Example

Tables: the Building Blocks of all Databases

Table Components

Page 7: 5.01  Activity Notes A

Database Fundamentals graphic organizer Student Activity

Student Name Period Date

1. What are the field names?

2. What is the name of the table?

3. How many records are there?

4. How many entries are there?

5. Describe the contents of one record.

6. Describe the contents of one field.

6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.01 – page 7

Page 8: 5.01  Activity Notes A

Guided Practice: Search an Online Database Teacher-Demonstration

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

6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.01 – page 8

Page 9: 5.01  Activity Notes A

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?

6411 – Computer Applications I Summer 2008, Version 2 Unit B – 5.01 – page 9

Page 10: 5.01  Activity Notes A

Data Types and Field Properties graphic organizer Student Activity

Student Name Period Date

DATA TYPES AND FIELD PROPERTIES

Directions: Record notes and answer the questions below while viewing the Data Types and Field Properties Power Point.

1. What is the function of a data type?

2. What is the function of a field property?

3. Why are data types important?

4. Critical thinking: If text is selected for the data type of a field and the field contains the birthdates of 50 employees, what will happen when the data is sorted?

5. What data types are available? Use the help feature of your software to briefly describe the purpose of each data type listed below. Hint: Select the first data type and press the F1 key

Data Type Description

Text

Memo

Number

Date/time

Currency

Page 11: 5.01  Activity Notes A

Data Types and Field Properties graphic organizer Student Activity

Student Name Period Date

Data Type Description

AutoNumber

Yes/No

Lookup Wizard

6. When should you change from the default data type?

7. Why are field properties important?

8. What field properties are available? Click on each field property listed below and view the descriptions as they appear in the right-hand pane. Describe each.

Field Property Description

Field size

Format

Input mask

Caption

9. When should you set a field property?

Page 12: 5.01  Activity Notes A

Data Types and Field Properties graphic organizer Student Activity

Student Name Period Date

10. What are the steps for creating a database?

1).

a.

b.

c.

2).

3).

4).

a.

b.

5).

Page 13: 5.01  Activity Notes A

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) __________________

8. December 15, 2006 __________________

A

B

C

Page 14: 5.01  Activity Notes A

Review of Database Tables Student Activity

Student Name Period Date

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 • Record • Database

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. AutoNumberL. Allows you to create a finite set of choices for

that field’s entry values

Page 15: 5.01  Activity Notes A

Review of Database Tables Student Activity

Student Name Period Date

Page 16: 5.01  Activity Notes A

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. Plan the structure

a. How will the data be grouped? You will be creating a computer inventory database. For each item, you have the name of the manufacturer, the serial number of the equipment, the room location, and the ID number of the student to which each piece of equipment is assigned.

b. What will the field names be? Record the field names in the first row of each column below:

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

c. What will you name the database?

2. Open and save a new database

Notes:

Page 17: 5.01  Activity Notes A

Guided Practice: Create a Database: Computers Teacher Demonstration

Student Name: Period: Date:

3. Create a table

Notes:

4. Enter the field names

a. Set data types. Unless the data will be used in a sort, search, or calculation, use the default settings. Think about how a user might search the database for information. Will the information be sorted by room number? Will the information be searched by student number?

Notes:

b. Set field properties if needed. Do you need to limit the size of any of the fields? Do any of the fields need to be represented as a decimal?

Use the caption field property to assign user-friendly names to each field

Notes:

5. Enter the data using the table on the previous page.

Page 18: 5.01  Activity Notes A

Guided Practice: Create a Database: Computers Teacher Demonstration

Student Name: Period: Date:

Edit the Database Table:

1. Edit the database to add the following records:

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

Compaq with Serial Number 34567

Dell with Serial Number 123674

Notes:

Hewlett Packard 88334 109 25

Compaq 22990 211 26

Dell 34419 110 27

Gateway 22334455 214 28

Page 19: 5.01  Activity Notes A

Guided Practice: Create a Database: Computers Teacher Key

GUIDED PRACTICE: CREATE A DATABASE: COMPUTERS KEY

Field Name Field Property (Field Size)

Field Property

(Caption)

Manufacturer 20 Same

SeNo 9 Serial Number

RNo 4 Room Number

StNo 4 Student Number

Manufacturer Serial Number Room Number Student Number

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

Page 20: 5.01  Activity Notes A

Guided Practice: Create a Database: Computers Teacher Key

1. Edit the database by adding the following records:

Manufacturer Serial Number Room Number Student Number

Hewlett Packard 88334 109 25

Compaq 22990 211 26

Dell 34419 110 27

Gateway 22334455 214 28

2. Edit the database by deleting the following 2 records:

Compaq with Serial Number 34567

Dell with Serial Number 123674

Computers Database

With records added

With records deleted

Page 21: 5.01  Activity Notes A

Independent Practice: Create a Database: Scavenger Hunt Student Activity

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

Steps in Creating a Database

1. Plan the structure of the database (sketch on paper)

a) How will the data be grouped?

b) What will the field names be?

c) What will you name the database?

2. Open and save a new database

3. Create a table

4. Enter the field names

a) Set the data types

b) Set the field properties

5. Enter the data

Page 22: 5.01  Activity Notes A

Independent Practice: Create a Database: Scavenger Hunt Student Activity

Student Name Period Date

Page 23: 5.01  Activity Notes A

Independent Practice: Create a Database: Scavenger Hunt Teacher Key

INDEPENDENT PRACTICE: CREATE A DATABASE: SCAVENGER HUNT KEY

Student answers will vary

Page 24: 5.01  Activity Notes A

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 anti-virus software:

• Determine data types and field properties • Enter data• Use AutoNumber

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

1. Open the Anti-Virus_Student database that has been sent to you electronically by your teacher.

2. Save the database in your directory according to teacher directions

3. Open the Anti-Virus_Student database table

4. Add fields 1 and 3-6 (below) and set the data types and field properties. NA means to accept the default settings.

Field Field Name Data Type

Field Properties

FormatField Size

Decimal Places

Caption

1.No

AutoNumber

NA NA NANA

2.Title Memo NA NA NA

Software Title

3. Price Currency Currency NA NA NA

4. Rating Number NA Decimal 2 NA

5. Compatibility

Text NA NA NA NA

6. Size Text NA NA NA NA

Page 25: 5.01  Activity Notes A

Guided Practice: Database Management: Anti-Virus Teacher Demonstration

Student Name Period Date

5. Enter the rest of the table data below:

No Popular Anti-virus Software Titles Price Rating Compatibility Size

.Mac 2.5 Retail $76.99 4.78 MAC 64 MB

PC-Cillin 2003 $26.99 4.2 W93 264 MB

Norton Anti-virus 2002 Professional Upgrade

$39.54 4.17 MAC 264 MB

Bullguard Anti-virus Firewall $39.99 4 MAC 264 MB

Norton Personal Firewall 2005 $42.50 4 XP 1 G

Stomp Spy Ware X-terminator $22.79 3.83 XP 1 G

eTrust EZ Anti-virus 2005 $24.99 3.8 W95 264 MB

Zone Alarm Internet Security Suite $59.99 3.6 W98 264 MB

PC-Cillin Internet Security 2005 $39.99 3.55 W95 64 MB

Webroot Spy Sweeper Internet Essentials Suite

$54.99 3.67 XP 1 G

McAfee Anti-virus Suite $39.99 4.25 XP 1 G

Ad-Aware $59.99 4 XP 264 MB

6. Delete the Compatibility field

Notes:

7. Print the table

Notes:

8. Save and submit according to teacher directions.

Page 26: 5.01  Activity Notes A

Guided Practice: Database Management: Anti-Virus Teacher Key

GUIDED PRACTICE: DATABASE MANAGEMENT: ANTI-VIRUS KEY

Page 27: 5.01  Activity Notes A

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 edit a database of survey information as you complete the following tasks:

•Set data types and field properties•Enter data•Add captions

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

1. Open the Survey_Student database that was sent to you electronically by your teacher and save it to your student directory

2. Add a field named No. in front of the Age field

a. Set the data type to AutoNumber

b. Set the caption to Number

3. Add a field named NoChdrn in front of the Status field

a. Set the data type to Number

b. Set the caption to Number of Children

4. Key the data for the added fields

Number Age Income GenderNumber

of Children

Marital Status

1 34 $25,000.00 M 2 S

2 45 $100,000.00 M 3 S

3 88 $50,000.00 M 1 S

4 25 $26,000.00 F 1 M

5 21 $39,000.00 M 0 M

6 58 $57,000.00 F 3 S

7 45 $37,000.00 M 3 M

8 46 $90,000.00 M 0 M

9 40 $58,000.00 F 2 S

10 36 $60,000.00 M 2 S

11 36 $72,000.00 F 2 M

12 66 $22,000.00 M 2 S

Page 28: 5.01  Activity Notes A

Independent Practice: Create a Database: Survey Student Activity

Student Name Period Date

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

INDEPENDENT PRACTICE: CREATE A DATABASE: SURVEY KEY

Field Names Caption Field Type Field Size

No Number AutoNumber NA

Age Same Number Long Integer

Income Same Currency 14

Gender Same Text 2

NoChdrn Number of Children

Number Long Integer

Status Marital Status Text NA

Note: Students were instructed to delete the Marital Status field

Page 29: 5.01  Activity Notes A

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. Open the MusicFun_Student database that has been sent to you electronically by your teacher.

2. Follow teacher instructions for saving the database in your student directory.

3. Add a field named MusicianID in front of the CD/Album Title field and set the data type to AutoNumber

4. Add another field named Genre after MusicianID (and in front of CD/Album Title)

a. Set the data type to Lookup and follow teacher directions to enter the lookup values

b. Key the following values for the lookup column:

i. Pop

ii. Classical

iii. Country

iv. R & B

v. Reggae

vi. Rock

Notes:

Page 30: 5.01  Activity Notes A

Guided Practice: Create a Database: MusicFun Teacher Demonstration

Student Name Period Date

5. Add another field named Release after the Artist field

a. Set the data type to Date/Time

b. Set the caption to Release Date

c. Set the field property for Input Mask and short date format

Notes:

6. Add another field after Release

a. Name the field Under 25

b. Set the data type to Yes/No

c. Set the caption to Under 25?

d. Note that the Format field property automatically selects Yes/No

Notes:

Page 31: 5.01  Activity Notes A

Guided Practice: Create a Database: MusicFun Teacher Demonstration

Student Name Period Date

7. Before entering the data, notice how a drop down menu appears in the Genre column. How does this benefit efficiency and accuracy?

8. Notice that the Under 25? column contains boxes. The default value is No. To change the value to yes, click or depress the space bar.

9. Enter the remaining data below. When keying the date, enter a zero before any single digit numbers, such as 04/03/2008.

MusicianID Genre Album Title ArtistRelease

DateUnder

25?

1 RockHow to Dismantle an Atomic Bomb

U2 11/23/2004 No

2 Rock American Idiot Green Day 9/21/2004 No

3 R & B Genius Loves Company Ray Charles 8/31/2004 No

4 R & B Get Lifted John Legend 12/28/2004 No

5 Pop Maximum Alicia Keys Alicia Keys 12/14/2004 Yes

6 Country Red Dirt RoadBrooks and

Dunn7/15/2003 No

7 R & B Purple Rain Prince 10/25/1990 No

8 Rock Minute by MinuteDoobie

Brothers2/22/2002 No

9 Rock Songs About Jane Maroon 5 6/25/2002 No

10 Pop Breakaway Kelly Clarkson 11/30/2005 Yes

11 Rock It's Only Rock and Roll Rolling Stones 7/26/1974 No

12 Rock Made in the Shade Rolling Stones 4/5/1975 No

13 Rock Beggar's Banquete Rolling Stones 8/27/1968 No

14 Rock War U2 5/15/1983 No

15 Rock Achtung, Baby U2 11/19/1991 No

16 Classical Phantom of the OperaAndrew Lloyd

Weber11/23/2004 No

17 R & BThe Essential Stevie Ray Vaughan and Double Trouble

Stevie Ray Vaughan

10/1/2002 No

Page 32: 5.01  Activity Notes A

Guided Practice: Create a Database: MusicFun Teacher Demonstration

Student Name Period Date

MusicianID Genre Album Title ArtistRelease

DateUnder

25?

18 ReggaeLegend (The Definitive Remasters)

Bob Marley 5/21/2002 No

19 Country Who Am I?Jessica

Andrews2/27/2001 No

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

21 Classical RequiemWolfgang Amadeus

MozartNo

22 Classical Crimson Tide Soundtrack Hans Zimmer 5/16/1995 No

23 Country Here for the PartyGretchen

Wilson5/11/2004 No

24 Country Greatest Hits Shania Twain 11/9/2004 No

25 R & B Confessions Usher 10/5/2004 Yes

26 Pop Under the Table DreamingDave Matthews

Band8/24/2004 No

10. Drag the Artist column in front of the Album Title column.

11. Save and print according to teacher directions.

Page 33: 5.01  Activity Notes A

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

Student Name Period Date

INDEPENDENT PRACTICE: CREATE A DATABASE: B&B

Directions: In this activity, you will work independently to edit 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 I

1. Open the B&B_Student database that has been sent to you electronically by your teacher. Save the database in your student directory according to teacher directions.

2. Open the database table HistoricInns_Student

3. Insert a field named Children after No. Rooms

a. Set the data type to Yes/No

b. Set the caption to Allows Children?

4. Add a field named Setting after the City field

a. Set the data type to Lookup

b. Key the values Mountain and Town in the lookup column

c. Set the caption to Mountain or Town?

5. Add a field named Breakfast after the Pets field

a. Set the data type to Yes/No

b. Set the caption to Breakfast?

6. Update the table by adding data to the new fields using the table below:

Historic InnNo.

RoomsAllows

Children?City

Mountain or Town?

Breakfast? Pets?

A Bed of Roses 5 No Yes Mountain No No

Abbington Green 8 Yes Yes Mountain No Yes

Albermarle Inn 11 No Yes Mountain Yes No

Biltmore Village Inn 6 No Yes Mountain Yes Yes

Page 34: 5.01  Activity Notes A

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

Student Name Period Date

Historic InnNo.

RoomsAllows

Children?City

Mountain or Town?

Breakfast? Pets?

Blake House Inn 6 Yes Yes Mountain Yes Yes

Carolina Bed & Breakfast 7 Yes Yes Mountain Yes Yes

Cedar Crest Victorian Inn 12 No Yes Mountain Yes No

Chestnut Street Inn 8 No Yes Mountain Yes No

Colby House 5 Yes Yes Mountain Yes No

Dry Ridge Inn 8 Yes Yes Mountain Yes No

Inn on Main Street 7 No No Town Yes No

Inn on Montford (1900) 5 Yes Yes Mountain Yes No

North Lodge on Oakland 6 Yes Yes Mountain Yes No

Owl's Nest Inn at Engadine 7 No No Town Yes Yes

Secret Garden (1904) 3 No No Town Yes No

The Hawk & Ivy 4 Yes No Town Yes No

The Lion and the Rose 5 Yes Yes Mountain Yes No

White Gate Inn and Cottage (1889)

6 Yes Yes Mountain Yes No

7. Move the Pets column behind the Breakfast column.

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?

Page 35: 5.01  Activity Notes A

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

Student Name Period Date

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

Page 36: 5.01  Activity Notes A

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

Student Name Period Date

6. How would 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.

Page 37: 5.01  Activity Notes A

Independent Practice: Create a Database: B&B Teacher Key

INDEPENDENT PRACTICE: CREATE A DATABASE: B&B KEY

Answer the following questions:

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

2. How many records are in the database? ..........................................................18

3. How many fields are in the database? ...............................................................7

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

Field names should be short and directly related to the corresponding data.

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

This database would be a great resource for travelers when planning a business trip or vacation.

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

Internet users can quickly and easily compare the locations, availability, and amenities of the inns.

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

Owners would benefit from the potential sales associated with people searching for availability of inns.

8. What other fields might be useful?

Cost, smoking or non-smoking, bathrooms, pet fee, etc.

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

Click the box to toggle a check mark for a Yes or a blank for No

Tab to the yes/no field and hit the space bar to toggle.

Page 38: 5.01  Activity Notes A

Independent Practice: Create a Database: B&B Teacher Key

INDEPENDENT PRACTICE: CREATE A DATABASE: B&B KEY

Page 39: 5.01  Activity Notes A

Database Review Student Activity

Student Name Period Date

DATABASE REVIEW

Part I Directions: Arrange the steps in creating a database in their proper order by placing a number by each item.

Step Procedure

Create a table

Enter the data

Enter the field names

Open and save a new database

Plan the structure of the database (sketch on paper)

Set the data types

Set the field properties

Part II Directions: Select the appropriate data type or field property for the data listed below:

Data Data Type/Field Property

1. Birth date A Currency

2. Children? B Input Mask

3. List of ice cream flavors C Lookup

4. List of pizza toppings D Number

5. Married? E Text

6. Net pay F Yes/No

7. Price

8. Street address

9. Telephone number

10. Zip code

Page 40: 5.01  Activity Notes A

Database Review Student Activity

Student Name Period Date

Page 41: 5.01  Activity Notes A

Determining Sort Order Teacher Key

DATABASE REVIEW KEY

Part I Directions: Arrange the steps in creating a database in their proper order by placing a number by each item.

Step Procedure

3 Create a table

7 Enter the data

4 Enter the field names

2 Open and save a new database

1 Plan the structure of the database (sketch on paper)

5 Set the data types

6 Set the field properties

Part II Directions: Select the appropriate data type or field property for the data listed below:

Data Data Type/Field Property

C 1. Birth date A Currency

F 2. Children? B Input Mask

C 3. List of ice cream flavors C Lookup

C 4. List of pizza toppings D Number

F 5. Married? E Text

A 6. Net pay F Yes/No

A 7. Price

E 8. Street address

B 9. Telephone number

D 10. Zip code

Page 42: 5.01  Activity Notes A

Determining Sort Order Teacher Key

Page 43: 5.01  Activity Notes A

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.

Page 44: 5.01  Activity Notes A

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

Page 45: 5.01  Activity Notes A

Determining Sort Order Teacher Key

DETERMINING SORT ORDER KEY

Directions for Part I: Label each situation or “scenario” as either ascending or descending in the spaces provided.

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

contest.

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

D 3. The most expensive items were listed first.

A4. The family reunion photograph shows the babies in the front row and the

great-grandparents in the last row.

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

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

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

D8. The oldest student was allowed to go first in the lunch line, while the

youngest was last to get his tray.

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

A 10. The planets with the fewest moons were listed first.

Page 46: 5.01  Activity Notes A

Determining Sort Order Teacher Key

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

D 1). a). a full tank of gas

b). ¼ tank of gas

c). running on empty

A 2). a). a can of coke

b). a 16 oz. bottle of coke

c). a 2 liter bottle of coke

A 3). a). a penny

b). a nickel

c). a dime

D 4). a). Seniors

b). Juniors

c). Freshmen

A 5). a). 1923

b). 1945

c). 1990

A 6). a). 04/15/2006

b). 07/04/2006

c). 09/25/2006

D 7). a). David

b). Christine

c). Becky

D 8). a). Rock

b). Pop

c). Classical

D 9). a). 150

b). 110

c). 90

A 10). a). Abbington Green

b). Dry Ridge Inn

c). Secret Garden

Page 47: 5.01  Activity Notes A

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

Directions for Part II: Record notes on each of the terms below as you work through this and the next activity.

Term Definition

Filter

Filter by selection

Filter/Advanced Filter Sort

Sort

Criteria

Page 48: 5.01  Activity Notes A

Understanding Operators Student Activity

Student Name Period Date

Directions for Part III: Write the correct statement that would find data that meets the conditions of each criterion.

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

Page 49: 5.01  Activity Notes A

Understanding Operators Student Activity

Student Name Period Date

Page 50: 5.01  Activity Notes A

Understanding Operators Teacher Key

UNDERSTANDING OPERATORS KEY

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.

E 1. Less Than A. <>

F 2. Greater Than B. <=

D 3. Equal To C. >=

B 4. Less Than or Equal To D. =

C 5. Greater Than or Equal To E. <

A 6. Not Equal To F. >

Directions for Part II: Record notes on each of the terms below as you work through this and the next activity.

Term Definition

Filter A tool used to search for specific information within a database

Filter by selection Filters for the field or entry that has been selected

Filter/Advanced Filter Sort

Filters according to specific criteria assigned by the user

Sort Arranging information in some form of logical order; alphabetical, chronological, numerical

Criteria A condition that must be met or not met in a search

Page 51: 5.01  Activity Notes A

Understanding Operators Teacher Key

Directions for Part III: 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 <=5

2. After 1950 >1950

3. Before 1920 <1920

4. Older than 18 >18

5. Lower than 100 <100

6. Taller than 6 feet >6

7. Students except Juniors <>Juniors

8. 100 or more >=100

9. 100 or less <=100

10. More than 2000 >2000

11. Under 32 <32

12. Over 75 >75

13. Smaller than 3 <3

14. Shorter than 23 <23

15. Not lower than 30 >=30

16. Younger than 50 <50

17. At most 63 <=63

18. Population growth of 1.9% =1.9

19. Since 1941 >1941

20. All students except freshmen <>Freshmen

Page 52: 5.01  Activity Notes A

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

Page 53: 5.01  Activity Notes A

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

Page 54: 5.01  Activity Notes A

Guided Practice: Filtering and Sorting a Database Teacher Demonstration

Student Name Period Date

GUIDED PRACTICE: FILTERING AND SORTING A DATABASE KEY

Part I

1. Place the cursor in any cell of the Gender field that has an “M” and select the Filter by Selection option.

2. Gender and Income

Equals and Greater Than

3. Filter by selection by selecting a cell in the Number of Children column with a zero.

Page 55: 5.01  Activity Notes A

Guided Practice: Filtering and Sorting a Database Teacher Key

Part I continued

4. Gender=M and Age>50

5. Gender=F, Income > 30000, Children > 0

Part II

1. Criterion: Field= Serial Number,

Criteria =87093

2. Filter by selection is also appropriate.

Page 56: 5.01  Activity Notes A

Guided Practice: Filtering and Sorting a Database Teacher Key

Part II continued

3. Room: 119

Manufacturer: Gateway

Serial Number: 87093

4. The sort doesn’t work properly because the database is not able to recognize the order of the text.

5. 95425, 55557, 83765, 88334

Page 57: 5.01  Activity Notes A

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.

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

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.

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

Page 58: 5.01  Activity Notes A

Independent Practice: Filtering and Sorting a Database Student Activity

Student Name Period Date

(continued on the next page)

Page 59: 5.01  Activity Notes A

Independent Practice: Filtering and Sorting a Database Student Activity

Student Name Period Date

Part III: Using the same database, complete the following advanced selections

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

Page 60: 5.01  Activity Notes A

Independent Practice: Filtering and Sorting a Database Teacher Key

INDEPENDENT PRACTICE: FILTERING AND SORTING A DATABASE KEY

(1) Sort by Inn Name in Ascending Order

InnA Bed of RosesAbbington GreenAlbermarle InnBiltmore Village InnBlake House InnCarolina Bed & BreakfastCedar Crest Victorian InnChestnut Street InnColby HouseDry Ridge InnInn on Main StreetInn on Montford (1900)North Lodge on OaklandOwl's Nest Inn at EngadineSecret Garden (1904)The Hawk & IvyThe Lion and The RoseWhite Gate Inn and Cottage (1889)

(2) Sort by No. of RoomsInn Rooms

Cedar Crest Victorian Inn 12Albermarle Inn 11Abbington Green 8Dry Ridge Inn 8Chestnut Street Inn 8Carolina Bed & Breakfast 7Owl's Nest Inn at Engadine 7Inn on Main Street 7White Gate Inn and Cottage (1889)

6

Biltmore Village Inn 6North Lodge on Oakland 6Blake House Inn 6

(2) Sort by No. of RoomsInn Rooms

Colby House 5A Bed of Roses 5The Lion and The Rose 5Inn on Montford (1900) 5The Hawk & Ivy 4Secret Garden (1904) 3

(3) Sort first by rooms and then by Inn in ascending orderRooms Inn

3 Secret Garden (1904)4 The Hawk & Ivy5 A Bed of Roses5 Colby House5 Inn on Montford (1900)5 The Lion and The Rose6 Biltmore Village Inn6 Blake House Inn6 North Lodge on Oakland6 White Gate Inn and Cottage

(1889)7 Carolina Bed & Breakfast7 Inn on Main Street7 Owl's Nest Inn at Engadine8 Abbington Green8 Chestnut Street Inn8 Dry Ridge Inn11 Albermarle Inn12 Cedar Crest Victorian Inn

Page 61: 5.01  Activity Notes A

Independent Practice: Filtering and Sorting a Database Teacher Key

4) B&Bs with NO pets

Pets Name

No A Bed of Roses

No Albermarle Inn

No Cedar Crest Victorian Inn

No Chestnut Street Inn

No Colby House

No Dry Ridge Inn

No Inn on Main Street

No Inn on Montford (1900)

No North Lodge on Oakland

No Secret Garden (1904)

No The Hawk & Ivy

No The Lion and The Rose

No White Gate Inn and Cottage (1889)

(5) B&Bs with pets

Pets Name

Yes Abbington Green

Yes Biltmore Village Inn

Yes Blake House Inn

Yes Carolina Bed & Breakfast

Yes Owl's Nest Inn at Engadine

(6) B&Bs allowing children

Name Children

Abbington Green Yes

Blake House Inn Yes

Carolina Bed & Breakfast Yes

Chestnut Street Inn Yes

Colby House Yes

Dry Ridge Inn Yes

North Lodge on Oakland Yes

The Hawk & Ivy Yes

Page 62: 5.01  Activity Notes A

Independent Practice: Filtering and Sorting a Database Teacher Key

(6) B&Bs allowing children

Name Children

The Lion and The Rose Yes

White Gate Inn and Cottage (1889) Yes

(7) B&Bs in small town/country setting

Name Setting

Inn on Main Street Town

Owl's Nest Inn at Engadine Town

Secret Garden (1904) Town

The Hawk & Ivy Town

(8) B&Bs >4 rooms, pets, children

Pets Name Setting Children Rooms City Breakfast

YesAbbington Green Mountain Yes 8 Yes Yes

YesCarolina Bed & Breakfast Mountain Yes 7 Yes Yes

YesBlake House Inn Mountain Yes 6 Yes Yes

(9) B&Bs <6 rooms ascending, small town, allows children

Pets Name Setting Children Rooms City Breakfasts

No The Hawk & Ivy Yes Yes 4 No Yes

Page 63: 5.01  Activity Notes A

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 the purpose of a Junction Table?

Page 64: 5.01  Activity Notes A

Types of Relationships graphic organizer Student Activity

Student Name Period Date

One-to-Many

How to set up a relationship:

Types of Relationships

Many-to-Many

What is referential integrity?

Page 65: 5.01  Activity Notes A

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 establish a one-to-many relationship between two database tables.

1. Open the PetRegistry database that has been sent to you electronically by your teacher.

2. Open the PetOwners table and indicate the primary key field:

Describe why the field was selected as the primary key field:

3. View/establish a one-to-many relationship between the PetOwners table and the PetRoster table using the primary key of the PetOwners table.

Notes:

4. Delete and re-establish the relationship.

Notes:

Page 66: 5.01  Activity Notes A

Guided Practice: One-to-Many Relationships Teacher Demonstration

Student Name Period Date

5. View the relationships in the PetOwners table by expanding all records. Note: to expand all relationships simultaneously, click on the select all button and then click on one of the + signs.

Notes:

6. Collapse all relationships

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

b. Dana Lowery, (919) 857-8568

c. Ted Hinson, (919) 854-8574

d. Phyllis Hall, (919) 851-0787

8. Which is the “one” and which is the “many” in the relationship? Explain.

Select All Button

Page 67: 5.01  Activity Notes A

Guided Practice: One-to-Many Relationships Teacher Key

GUIDED PRACTICE: ONE-TO-MANY RELATIONSHIPS KEY

Page 68: 5.01  Activity Notes A

Guided Practice: One-to-Many Relationships Teacher Key

Page 69: 5.01  Activity Notes A

Guided Practice: One-to-Many Relationships Teacher Key

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

e. Tony Landis, (919) 534-3421......................................................................0

f. Dana Lowery, (919) 857-8568....................................................................1

g. Ted Hinson, (919) 854-8574.......................................................................0

h. Phyllis Hall, (919) 851-0787........................................................................2

8.In this relationship, each dog can only have one owner, but each owner can have more than one dog.

Page 70: 5.01  Activity Notes A

A Little More Guidance Teacher Demonstration

Student Name Period Date

A LITTLE MORE GUIDANCE

Directions: In this activity, you will follow along with your teacher to create a new database table based on information from an existing table.

1. Open the States database that has been sent to you electronically by your teacher and save it to your files.

2. Create a new table and save it as JustStates

3. The first field is formatted as the primary key field, using ID as the field name. If the first field has not been created already, create it now, using AutoNumber and setting it as the primary key field.

4. Add a new field named States

5. Set the data type as Lookup or leave it as Text, depending on your preferred method of retrieving the data from the State table (see methods below)

Method 1 – Use the Lookup Wizard

a. Select the Lookup Wizard as the data type

b. Select the option to look up the values in a table or query

c. Select the State table

d. Select the State Abbreviation and State Name fields

e. Select ascending order by state abbreviation

f. Save and view the data, which will appear in a drop down list

Method 2 – Copy and paste values

a. Use the default data type (text)

b. Open the State table and select and copy the State Name column

c. Select the Lookup tab in the Field Properties section

d. Select List Box as the display control

e. Select Value List as the row source type

f. Select the row source window and use the paste command to enter the copied list of states

g. Set State Name as the default entry

View the table and notice that you have all of the states available in a drop down menu and saved the excessive time of rekeying all of the information in.

Page 71: 5.01  Activity Notes A

A Little More Guidance Teacher Demonstration

Student Name Period Date

Page 72: 5.01  Activity Notes A

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 establish a one-to-many relationship between two database tables.

1. Open a new database and save it as Authors.

2. Create a database table named Authors using the information below and using the Authors field as the primary key

Authors Database

Authors Table

Authors Publishers

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

3. Create another table named Publications

a. Do not set a primary key

b. Use a lookup data type for the authors and key the authors’ names in the values list

Page 73: 5.01  Activity Notes A

Independent Practice: One-to-Many Relationships Student Activity

Student Name Period Date

c. Enter the data in the table

d. Save the table

4. Open the relationships window and establish a one-to-many relationship between the Authors and Publications tables using the primary key from the Authors table

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

6. Save and submit your work according to teacher directions

7. Think about how a bookstore would use the information and record your thoughts in the space below.

Page 74: 5.01  Activity Notes A

Independent Practice: One-to-Many Relationships Teacher Key

INDEPENDENT PRACTICE: ONE-TO-MANY RELATIONSHIPS KEY

Page 75: 5.01  Activity Notes A

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

GUIDED PRACTICE: MANY-TO-MANY RELATIONSHIPS

Directions: For this activity, you will follow along with your teacher to establish 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.

1. Open the Beach Rentals_Student database that has been sent to you electronically by your teacher

2. In the Customers table, set the CustomerID field as the primary key field

3. In the Properties table, set the PropertyID field as the primary key field

4. Create a Junction Table:

a. Use AutoNumber for the ID field and set it as the primary key

Notes:

Note: An easy way to identify a junction table is to view the fields in each table. The table that contains all of the primary keys from the other related tables is the junction table!

b. Use a lookup data type for the PropertyName field and key the property names as the values

Notes:

Page 76: 5.01  Activity Notes A

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

c. Use an input mask, short date format for the date field

Notes:

5. Establish a one-to-many relationship between the Customers table and the Rentals table using the primary key from the Customers table

Notes:

6. Select the option to enforce referential integrity for both relationships

7. Establish a one-to-many relationship between the Properties table and the Rentals table using the primary key from the Properties table

8. Save and answer the questions on the next page.

Page 77: 5.01  Activity Notes A

Guided Practice: Many-to-Many Relationships Teacher Demonstration

Student Name: Period: Date:

Open the Customers table and try to delete Bob Dixon. What happens? Why?

Expand all of the relationships in the Customers table. Which renter has rented the most properties?

Expand all of the relationships in the Properties table. Which property is the most popular?

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?

Page 78: 5.01  Activity Notes A

Guided Practice: Many-to-Many Relationships Teacher Key

GUIDED PRACTICE: MANY-TO-MANY RELATIONSHIPS KEY

Open the Customers table and try to delete Bob Dixon. What happens? Why?

Bob Dixon cannot be deleted because he is linked to another table.

Expand all of the relationships in the Customers table. Which renter has rented the most properties?

Cricket Chianelli

Expand all of the relationships in the Properties table. Which property is the most popular?

Sea Captain

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

A beach rental company would use this database to keep track of customers and property owners. The beach rental company could quickly look up information sorted by property or by customer.

Why is it important to understand database relationships?

Databases are used by businesses worldwide to manage information. Database relationships increase the effectiveness and power of databases by allowing information to be organized into manageable and logical chunks of related data (tables) and by enabling communication between multiple tables.

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

To help protect data from being deleted or corrupted

Page 79: 5.01  Activity Notes A

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

INDEPENDENT PRACTICE: MANY-TO-MANY RELATIONSHIPS

Directions: For this activity, you will work independently to create a many-to-many relationship.

1. Open the Flights_Student database that has been sent to you electronically.

2. Follow teacher instructions for saving the database to your student directory.

3. Create a database table named Pilots

a. Set the PilotID data type as number and make it the primary key field

b. Do not make any errors as you key the information from the table below:

PilotID Pilot Name

332341 Motley, Dan

384858 Main, Hydie

528966 Long, John

754858 Penny, Annie

838488 Swain, Bob

859699 Young, Debra

908948 Lox, Bailey

958678 Anderson, Lee

4. Save and close the Pilots table.

5. Establish a one-to-many relationship between the Flights table and the Reservations table using the Flight# field in the Flights table as the link to the FlightNo field in the Reservations table

6. Establish a one-to-many relationship between the Reservations table and the Pilots table using the PilotID field in the Pilots table as the link to the Pilot field in the Reservations table

7. Enforce referential integrity in the link between the Pilots table and the Reservations table

Page 80: 5.01  Activity Notes A

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

Answer the following questions:

1. What is the function of referential integrity in this activity?

a. It prevents a pilot from being deleted from the pilots table if the pilot has been assigned to a flight in the reservations table

b. It allows a pilot to be deleted from the pilots table if the pilot has been assigned to a flight in the reservations table

2. Perform a filter for the flights listed below to answer the questions about the Flights table

a. How many pilots does Northwest Flight 99 have?

b. How many passengers does Northwest Flight 99 have?

c. How many passengers does US Airways Flight 5474 have?

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

a. Which pilot has the most passengers?

b. Which pilot has the least?

4. How is the expanded relationship information helpful to the following people:

a. Customers

b. Pilots

c. Airline stewards

d. Reservations specialists

5. Save and submit your work according to teacher dirctions

Page 81: 5.01  Activity Notes A

Independent Practice: Many-to-Many Relationships Student Activity

Student Name: Period: Date:

Page 82: 5.01  Activity Notes A

Independent Practice: Many-to-Many Relationships Teacher Key

INDEPENDENT PRACTICE: MANY-TO-MANY RELATIONSHIPS KEY

Answer the following questions:

1. What is the function of referential integrity in this activity?

a. It prevents a pilot from being deleted from the pilots table if the pilot has been assigned to a flight in the reservations table

b. It allows a pilot to be deleted from the pilots table if the pilot has been assigned to a flight in the reservations table

2. Perform a filter for the flights listed below to answer the questions about the Flights table

a. How many pilots does Flight 99 have? ..............................................1

b. How many customers does Flight 99 have? ......................................1

c. How many customers does Flight 5474 have? ................................11

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

a. Which pilot has the most passengers? .........................................Dan Motley

b. Which pilot has the least? .........................................................Debra Young

4. How is the expanded relationship information helpful to the following people?

a. Customers

Customers can find out flight information, such as flight number and pilot information. If concerned about safety, they may choose to check out the pilot on the Internet.

b. Pilots

Pilots can quickly see how full their flight is

c. Airline stewards

Airline stewards can check the flight roster

d. Reservations specialists

Reservations specialists can view flight data to find out how many spaces are left and answer customer inquiries about flight arrival and departure times

Page 83: 5.01  Activity Notes A

Guided Practice: Importing Data Teacher Demonstration

Student Name: Period: Date:

GUIDED PRACTICE: IMPORTING DATA

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

Page 84: 5.01  Activity Notes A

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.

Page 85: 5.01  Activity Notes A

Independent Practice: Importing Data Teacher Key

INDEPENDENT PRACTICE: IMPORTING DATA KEY

Procedure for Importing Data into a Database Table: (May vary with software)

1. Format the raw source data in columns and rows separated by spaces or commas.

2. Save the raw source data in plain text format.

3. Open and save a new database.

4. Use the menu or wizard options to import the source data.

5. Select the appropriate options regarding type of delimiters and headings.

6. Name the table.

7. Complete the import.

8. Format the data if required.

Page 86: 5.01  Activity Notes A

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. Work with a partner and describe a one-to-many relationship using a database and tables you make up. Draw the tables on paper and key descriptions of each, then cut and paste the descriptions onto the paper.

Page 87: 5.01  Activity Notes A

Database Concept Review Student Activity

Student Name: Period: Date:

5. Work with a partner and describe a many-to-many relationship using a database and tables you make up.

6. Work with a partner and draw a picture of the database, the tables, and the many-to-many relationship on the back of this sheet.

7. Give an example of how referential integrity could be used in your scenario (#6)

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

a. _____ Field

b. _____ Database

c. _____ Record

d. _____ Entry

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

Page 88: 5.01  Activity Notes A

Database Concept Review Student Activity

Student Name: Period: Date:

Page 89: 5.01  Activity Notes A

Database Concept Review Teacher Key

DATABASE CONCEPT REVIEW KEY

Directions: Answer the questions below.

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

• Student answers will vary

2. List 3 examples of a database.

• Telephone book|

• Computerized Library card catalog

• Student data (NCWISE)

• iTunes

• Personal address book

• CD-Rom Encyclopedias

• Job Search

• Fingerprint database

• Customer contact list

• Houses for sale and MLS listings online

• Hospital/patient data

• Business stock inventory

• Barcode scanners keep inventory in databases

• Internet search engines database

• Encyclopedias & Dictionaries

3. A database relationship is a link between common fields of two or more tables in a database.

4. Answers will vary – invite students to share their examples with the class

5. Answers will vary

6. Answers will vary

7. Answers will vary

8. Answers will vary

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

1 Database

2 Record

3 Field

4 Entry

Page 90: 5.01  Activity Notes A

Database Concept Review Teacher Key

Page 91: 5.01  Activity Notes A

Database Concept Review Teacher Key

Match the field types with the correct definition.

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

for that field’s entry values.

E Number b. Is a true/false field

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

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

numbers no used in calculations.

H Currencye. This field may not include anything other

than numbers.

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

B Yes/Nog. Creates fields that automatically enter a

unique number when a record is added.

h. Currency values expressed in various formats.