© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 9 – Building Links,

Slides:



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

Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Exploring Microsoft Access 2003 Chapter 6 Many-to-Many Relationships: A More Complex System.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
SUNY Morrisville-Norwich Campus-Week 10 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
RELATIONSHIP  THE WAY TABLES ARE RELATED  A TABLE MUST PARTICIPATE IN AT LEAST ONE RELATIONSHIP  IN A BINARY RELATIONSHIP TWO ENTITIES PARTICIPATE 
Querying a Database Microsoft Office Access 2003.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 3 – Finding, Filtering,
Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.
Define Table Relationships—1 of 3 One of the most powerful features of a relational database management system, such as Access, is its ability to define.
Microsoft ® Office Access ® 2007 Training Build a database III: Build relationships for a new Access database ICT Staff Development presents:
Database Relationships Objective 5.01 Understand database tables used in business.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
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,
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.
1 Microsoft Access 2002 Tutorial 3 – Querying a Database.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 4 – Creating New.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
Primary & Foreign Keys. PK & FK 1.Primary key is required 2.The PK must be unique 3.If the primary key from one table is related to a field in another.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
XP Chapter 2 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Building The Database Chapter 2 “It is only the farmer.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
® Microsoft Office 2010 Access Tutorial 2 Building a Database and Defining Table Relationships.
IE 423 – Design of Decision Support Systems Database development – Relationships and Queries.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
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.
1 Copyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall. Access Module 1 Workshop 2 Tables, Keys, and Relationships Series Editor Amy Kinser.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 2 – Viewing and.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T6: Basic Skills and Tools Using Access 2010 Business Driven Technology.
Access Project 3 Notes. Introduction Maintaining the Database  Modifying the data to keep it up-to-date Restructure the Database  To change the database.
Microsoft Access Intro Class 6 Relationships.
Using Microsoft Access 56:150 Information System Design.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
Tutorial 9 Using Action Queries and Advanced Table Relationships.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Exploring Microsoft Access Chapter 6 Many-to-Many Relationships: A More Complex System.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
Microsoft Access 2013 ®® Tutorial 9 Using Action Queries and Advanced Table Relationships.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T6 Basic Skills Using Access.
Maintaining a Database Access Project 3. 2 What is Database Maintenance ?  Maintaining a database means modifying the data to keep it up-to-date. This.
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.
Build a database III: Build relationships for a new Access database Overview: You can relate This course teaches you how to build relationships between.
Access Chapter 1: Intro to Access Objectives Navigate among objects in Access database Difference between working in storage and memory Good database file.
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.
© 2001 ComputerPREP, Inc. All rights reserved. Access 2000: Module II.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Database Relationships Objective 5.01 Understand database tables used in business.
Review Types of Relationship – there are in general three different types of relationships - One to One – where each record in one table can have not more.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
CIS 155 Table Relationship
Microsoft Access 2003 Illustrated Complete
Integrating Word, Excel, and Access
Presentation transcript:

© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 9 – Building Links, Relationships and Indexes

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 2 Lesson Objectives Link external objects. Create relationships. Work with linked tables. Create and edit tables. Use referential integrity and cascade options. Modify and delete indexes.

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 3 Linking External Objects Exercises –Link Access Tables –Link an Excel Table –Use the Linked Table Manager

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 4 Link Access Tables Linked tables are located outside the database Data can be added, deleted, and modified Link Table Manager –Used to update link locations Forms and Reports can use linked tables

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 5 Link an Excel Table Excel data can act as a table and be linked

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 6 Link an Excel Table Excel data must be deciphered before being linked

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 7 Use the Linked Table Manager Use the Link Table Manager when linked files have been moved

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 8 Creating Relationships Exercises –Create a One-To-Many Relationship –Create a Many-To-Many Relationship –Use a Many-To-Many Relationship in a Query –Create a One-To-One Relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 9 Create a One-To-Many Relationship An Invoice is an example of a form that needs a One-To-Many relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 10 Create a One-To-Many Relationship InvoiceID is the common field

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 11 Create a Many-To-Many Relationship Many-To-Many will not appear in the Relationship dialog box Refers to two One-To-Many relationships where the Many side from both relationships is the same table (join table) The Join table needs a two-field primary key

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 12 Create a Many-To-Many Relationship The Join table needs a two-field primary key

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 13 Use a Many-To-Many Relationship in a Query Need three tables to form this relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 14 Create a One-To-One Relationship The common field in both tables in the relationship are primary keys One record in each table are related Can create relationships with linked tables

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 15 Working with Linked Tables Exercises –Edit Data in a Linked Table –Modify the Structure of a Table –Create Linked Table Relationships –Delete a Relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 16 Edit Data in a Linked Table Editing data in a linked table is the same as any table Linked table does not need to be open to make changes

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 17 Modify the Structure of a Table Changes to the structure of a linked table is impossible To change the structure of a linked table you must open the database where the linked table is located

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 18 Create Linked Table Relationships Linked tables appear in the Relationship window like all local tables Relationships are stored only in the databases where they were created

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 19 Delete a Relationship Right-click the join line between two tables and select Delete to remove the relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 20 Creating and Editing Joins Exercises –Create and Edit Joins in a Query –Create and Edit a Global Join

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 21 Create and Edit Joins in a Query Join Types –Inner join Displays records that have the same value in both tables Most common –Left Outer join Shows all records from the left recordset even if there are no matches in the right recordset –Right Outer join Shows all records from the right recordset even if there are no matches in the left recordset

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 22 Create and Edit Joins in a Query Relationships created in –The Relationship window are known as Global joins Relationship is available any where in the database –A query are known as local joins Only available in the query

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 23 Create and Edit Joins in a Query A Cartesian result occurs when there is no relationship (join line) between two tables in a query Query will result in all possible combinations of data This data is not useful

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 24 Create and Edit Joins in a Query Using join types 2 and 3 can help you find data that is missing in one of the tables

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 25 Create and Edit a Global Join Global joins help maintain database normalization When two tables with a relationship are used in a query, the join line will appear automatically

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 26 Using Referential Integrity and Cascade Options Exercises –Enforce and Test Referential Integrity –Enable Cascade Update Related Fields –Enable Cascade Delete Related Records

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 27 Enforce and Test Referential Integrity Referential Integrity –A set of rules –Reduces human error –Controls how data is entered and deleted Can enable referential integrity for two tables if: –The common field has the same data type –The tables are in the same database –The common field in one table is a primary key

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 28 Enforce and Test Referential Integrity When referential integrity is set, the “1” and “∞” are visible on the join line

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 29 Enforce and Test Referential Integrity Adding data that violates the referential integrity rules will not be allowed

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 30 Enable Cascade Update Related Fields Cascade Update option –Allows data to be changed in one common field and it is changed automatically on the other side of the relationship

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 31 Enable Cascade Delete Related Records Cascade Delete option –Allows records to be deleted in the “One” side of the relationship and all matching records in the “Many” side will automatically be delete –Will destroy historical data

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 32 Modifying and Deleting Indexes Exercises –Delete Indexes –Create a Two-Field Index

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 33 Delete Indexes Indexes –Create an internal sort order –Can increase the speed of finds and sorts –Too many will slow down a database

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 34 Create a Two-Field Index Will speed up a sort if two fields are always being used in the sort

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 35 Lesson 9 Summary A major advantage of relational databases over flat databases is their ability to connect data from two or more tables. You can add, delete, and modify data through linked tables. Linked tables can originate from an Access database or Excel spreadsheet. When using the Linked Table Manager, you need to know the location of the source file to refresh links to files that have been moved. The four types of relationships that can exist between tables in a relational database are One-To-One, One-To- Many, Many-To-Many, and Indeterminate. When you create a Many-To-Many relationship, the term “Many-To-Many” does not appear in the Relationships dialog box.

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 36 Lesson 9 Summary You can edit data in a linked table in the same way as you would any other table in the database. You cannot change the structure of a linked table. Changes can only be made in the source file. Through the Relationships window, you can create relationships using linked tables. A join is a link between two recordsets. Join types include inner join, left outer join, and right outer join. In a query, when two tables are not joined to each other, Access displays a Cartesian product. Global joins help maintain database normalization by preventing certain errors.

THE PROFESSIONAL APPROACH SERIES © 2008 The McGraw-Hill Companies, Inc. All rights reserved. 37 Lesson 9 Summary Referential integrity is a set of database rules used to reduce human error such as accidental deletions. Referential integrity prevents you from changing common field values in just one table. With the Cascade Delete Related Records option enforced, deleting a record in the one-side table automatically deletes all linked records in related tables. An index is a sort order used to identify records in a table. Every time you make a change to an indexed field, Access must update the indexes to include the new information. In Access, you can use two or more fields to create a unique index.