Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.

Slides:



Advertisements
Similar presentations
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
Advertisements

Microsoft Access.
Benchmark Series Microsoft Access 2010 Level 1
Copyright 2002, Paradigm Publishing Inc. CHAPTER 23 BACKNEXTEND 23-1 LINKS TO OBJECTIVES Form Concepts Creating the Form Template Creating the Form Template.
Chapter 26. Copyright 2003, Paradigm Publishing Inc. CHAPTER 26 BACKNEXTEND 26-2 LINKS TO OBJECTIVES Create a Form Template Create a Form Template Fill.
Microsoft Office 2010 Access Chapter 1 Creating and Using a Database.
Chapter 1 Databases and Database Objects: An Introduction
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 1 Creating and Using a Database.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Access Project 3 Maintaining a Database Using the Design and Update Features of Access.
Copyright 2003, Paradigm Publishing Inc. CHAPTER 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Create a Chart Create in a Separate Worksheet Create in a Separate.
Chapter 9 Macros, Navigation Forms, PivotTables, and PivotCharts
Chapter 3 Maintaining a Database
Copyright 2003, Paradigm Publishing Inc. CHAPTER 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Table Wizard Spell Check Find Data Find and Replace Data Find and.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Copyright 2007, Paradigm Publishing Inc. BACKNEXTEND 3-1 LINKS TO OBJECTIVES Save a Filter as a Query Save a Filter as a Query Parameter Query Inner, Left,
© Paradigm Publishing, Inc Access 2010 Level 2 Unit 1Advanced Tables, Relationships, Queries, and Forms Chapter 3Advanced Query Techniques.
Microsoft Access Lesson 3
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Chapter 1 Databases and Database Objects: An Introduction
Chapter 6 Advanced Report Techniques
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Summarizing with Range names and 3-D formulas Summarizing.
Chapter 6 Generating Form Letters, Mailing Labels, and a Directory
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 4 BACKNEXTEND 4-1 LINKS TO OBJECTIVES Query Design Query Criteria Modify a Query Using OR.
Copyright 2007, Paradigm Publishing Inc. Word 2007 Chapter 8 BACKNEXTEND 8-1 LINKS TO OBJECTIVES Create and Merge Creating a Data Source Creating a Data.
Office Management Tools II Ms Saima Gul.  When you create your tables, you should assign each table a primary key—one or more fields whose contents are.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Filtering Data Removing a Filter Filter by Selection.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 2 1 Microsoft Office Access 2003 Tutorial 2 – Creating And Maintaining A.
® Microsoft Access 2010 Tutorial 2 Building a Database and Defining Table Relationships.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
LINKS TO OBJECTIVES Multiple Worksheets Multiple Worksheets Move, Copy and Paste Cells Move, Copy and Paste Cells Split into Windows Freeze Panes Range.
Microsoft Access Intro Class 6 Relationships.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Access Project 7 Advanced Report and Form Techniques.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create and Open a Database Create and Open a Database.
Microsoft Access 2010 Chapter 10 Administering a Database System.
Copyright 2002, Paradigm Publishing Inc. CHAPTER 18 BACKNEXTEND 18-1 LINKS TO OBJECTIVES Creating a Chart Sizing and Moving a Chart Sizing and Moving a.
® Microsoft Office 2013 Access Creating a Database.
Tutorial 9 Using Action Queries and Advanced Table Relationships.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
1 After completing this lesson, you will be able to: Change the format of a table. Sort records in a table. Find records in a table Use filters with a.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T6 Basic Skills Using Access.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Copyright 2007 Paradigm Publishing Inc. EXCEL 2007 Chapter 7 BACKNEXTEND 7-1 LINKS TO OBJECTIVES Create a Chart with Data in a Worksheet Create a Chart.
1 CHƯƠNG 4 Creating Relational Databases Understanding Table Relationships Example: This database tracks customers and their orders in two separate.
Pasewark & Pasewark Microsoft Office 2003: Introductory 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 6 BACKNEXTEND 6-1 LINKS TO OBJECTIVES Using the Report Button Using the Report Button Print.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Exploring Microsoft Access Chapter 5 One-to-Many Relationships: Subforms and Multiple Table Queries.
Chapter 28. Copyright 2003, Paradigm Publishing Inc. CHAPTER 28 BACKNEXTEND 28-2 LINKS TO OBJECTIVES Table Calculations Table Properties Fields in a Table.
Chapter 6. Copyright 2003, Paradigm Publishing Inc. CHAPTER 6 BACKNEXTEND 6-2 LINKS TO OBJECTIVES Create Folders Select Delete Copy a Document Move a.
Chapter 9. Copyright 2003, Paradigm Publishing Inc. CHAPTER 9 BACKNEXTEND 9-2 LINKS TO OBJECTIVES Create a Header and Footer Create a Header and Footer.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
Copyright © 2014 Pearson Canada Inc. Ext. 5b-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5b Using Microsoft Access Part 2: Using Information.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Using the Form Button Using the Form Button Form Views.
Access Tutorial 2 Building a Database and Defining Table Relationships
MODULE 7 Microsoft Access 2010
Chapter 1 Databases and Database Objects: An Introduction
Relationships While we are on the subject of Relationships, let’s take a quick look at them.
Presentation transcript:

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary CREATING RELATIONSHIPS BETWEEN DATABASE TABLES Chapter 2 Microsoft Access 2007 – Level 1

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-2 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Performance Objectives Create a database table with a primary key Create a database table with a foreign key Create a relationship between database tables Print table relationships Display Subdatasheets

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-3 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating Related Tables Access is a relational database management system Relationships are defined between sets of data (tables) –allows greater flexibility in manipulating data –eliminates redundancy

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-4 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Determining Relationships Planning is most important Break down fields into tables to avoid redundancies Clients table Client # Client Street Address City State Zip Code Insurance table License # Client # Insurance Code Uninsured Motorist Coverage table Insurance Code Type of Insurance Claims table Claim # Client # License # Date of Claim Amount of Claim Notice that each table is about only one subject Some fields appear in more than one table – they are used to create a relationship

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-5 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a Primary Field Need to designate a primary (key) field in a table before creating a relationship between tables Must contain unique data Access enforces Entity Integrity –expects a value in the primary field in each record –cannot close a table containing a null value in a primary (key) field

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-6 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a Primary Field…/2 Open table in Design view Position insertion point in field Click Primary Key button Notice image of key To define more than one field as the primary key, select the rows and click the Primary Key button

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-7 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a Foreign Key A primary key field in one table may be a foreign key in another Primary key and foreign key form a relationship between the tables Clients table Client # Client Street Address City State Zip Code Insurance table License # Client # Insurance Code Uninsured Motorist Coverage table Insurance Code Type of Insurance Claims table Claim # Client # License # Date of Claim Amount of Claim

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-8 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Establishing a Relationship Relate one table to another by joining the tables –data can be extracted from both tables Define the type of relationship to be created –one record in the primary table will match zero, one, or many records in the related table (one-to-one, or one-to-many) Set Referential Integrity –a record must be added to the “one” table before it can be added to the “many” table

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-9 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a One-to-Many Relationship Open database file Click Database Tools tab, Relationships Show Table dialog box appears when no relationships have been defined yet

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-10 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a One-to-Many Relationship…/2 Double-click each table to add it to the Relationships window After adding all the tables Repeat until all required tables are added Click Close when done adding Notice that the Primary keys are indicated

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-11 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a One-to-Many Relationship…/3 Drag the common field from the primary table (the “one”) to the related table (the “many”) Edit Relationships dialog box appears Ensure that the correct tables and field names display Make sure type is One-To-Many Click Check options as desired

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-12 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating a One-to-Many Relationship…/4 Join line is thick at both ends if referential integrity option has been chosen Save the Relationship by clicking the Save button in the Quick Access toolbar Join line This join line shows that each client may have many claims (1 to ∞)

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-13 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Specifying Referential Integrity If a related table contains a record, you will not be able to change or delete a primary key value in the primary table As you change a primary key value in the primary table, Access will automatically update the matching value in the related tables As you delete a record in the primary table, Access will also delete any related records in the related tables

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-14 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Printing Database Relationships With the Relationships open, click the Relationship Report button The Relationships report in Print Preview Click the Print button in Quick Access toolbar

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-15 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Creating Additional Relationships Open Relationships if necessary and click the Show Table button to add other tables to the database relationships Drag a primary key in one table to a foreign key in another table Follow the same procedure as before to verify the table fields and the relationship type, and to set the desired referential integrity

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-16 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Editing a Relationship Right-click a join line and click Edit Relationship OR Can move a table entry by dragging its Title bar Open Relationships … Click a join line and click OR Double-click a join line

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-17 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Deleting a Relationship Open Relationships … Right-click a join line and click Delete OR Click a join line and press the Delete key

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-18 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Showing a Subdatasheet Click + sign preceding desired record + expands - collapses Select table Click OK

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-19 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Displaying Related Records in a Subdatasheet Can view, edit or add data in the subdatasheet Click + sign preceding desired record + expands - collapses Only available when tables have relationships

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-20 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Managing Subdatasheets Can choose a different subdatasheet With an open table … Click Home tab, More button (in the Records group) Can remove the subdatasheet Same as clicking the + or – preceding each record of the table

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-21 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you identify a primary key? Features Summary Image of a key shows by the field name

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-22 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you display the Relationships window? Database Tools tab, Relationships button Features Summary

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-23 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you display the Edit Relationships dialog box? Features Summary Right-click a join line and click Edit Relationship OR Click a join line and click OR Double-click a join line

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-24 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you display the Show Table dialog box? Database Tools tab, Relationships, click the Show Table button Features Summary

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-25 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you print database relationships? With the Relationships open, click the Relationship Report button Click the Print button in Quick Access toolbar Features Summary

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-26 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary How do you display the Insert Subdatasheet dialog box? Features Summary Click the + sign preceding a record Click Home tab, Records group, More button, Click Open a table OR Features Summary

Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-27 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining Relationships Determining Relationships Primary Keys Foreign Keys Relationships Referential Integrity Referential Integrity Printing Relationships Printing Relationships Subdatasheets Features Summary Features Summary Coming Next MODIFYING AND MANAGING TABLES Chapter 3