SlideShare une entreprise Scribd logo
1  sur  17
Building Table Relationships Lesson Five ( ACCESS 2007)
By now, you have set up the tables you need for your database, and created fields for those different tables. Relationships provide Access 2007 with the means to bring that information together for you when you need it. 

This lesson explains how to establish relationships between the tables in an Access 2007 database. You will learn how to read and manipulate the relationship map. You will also learn about Primary and Foreign Keys, relationship types, and about referential integrity. 2 Guevarra Institute of Technology
To establish a relationship between tables: Click the Relationships command in the Show/Hide group on the Database Tools tab in the Ribbon. ,[object Object],3 Guevarra Institute of Technology
When the Show Table dialog box appears: Select each table name and click Add for the tables you want to relate. When you are done, Close the Show Table dialog box. 4 Guevarra Institute of Technology
You should now see a relationship map that contains all the tables that were selected. 5 Guevarra Institute of Technology
To move a table that appears in the relationship map: Place your mouse over the table you want to move. Hold down the left mouse button, and drag the table to a new location. Release the mouse button to drop the table in its new place. 6 Guevarra Institute of Technology
Understanding the Relationship Map The relationship map lists all of the tables that were selected to relate, and all of the fields that were set up for that table previously. Notice that the first field has a key icon next to it. This is the Primary Key for the table. 7 Guevarra Institute of Technology
Primary and Foreign Keys A Primary Key is the first field in each table of the database. You may recall that this field auto numbers by default, so that every record in the table has its own unique number to identify it. Access uses this number to quickly pull information together for you when you run queries or reports, which are covered later. In the example above, the primary key for the Customers table is Customer ID, the primary key for the Orders table is Order ID, and the primary key for the Books table is Book ID. A Foreign Key is a field that is the Primary Field in its own table, but that shows up in another table. If you look closely at the Orders table, the fields Customer ID and Book ID appear there, as well as in their own respective tables. These fields are the primary key in their own tables, but in the Orders table, they are considered Foreign Keys. 8 Guevarra Institute of Technology
Foreign Keys 9 Guevarra Institute of Technology
Relating Tables There are a few ways to establish relationships between tables: Using the Edit Relationships command located on the Design tab of the Ribbon Using the Drag and Drop method ,[object Object],10 Guevarra Institute of Technology
Relating Tables with the Drag and Drop Method It is easy to relate tables from the relationship map: Select a field name from one table by holding down the left mouse button Drag the field name from the one table to the other table in the desired relationship .Drop the first field name onto the field name that you want to relate by releasing the left mouse button. In the example above, we selected the Book ID field from the Books table, and dragged and dropped it on the Book ID field in the Orders table. 11 Guevarra Institute of Technology
The Edit Relationships dialog box appears. Select the Enforce Referential Integrity option. This option is explained in detail below. Click Create. Edit Relationships Dialog Box 12 Guevarra Institute of Technology
Understanding Types of Relationships Access 2007 allows for several different types of relationships. These include: One to One One to Many Many to Many The relationship type you will come across most frequently, and the one created in our bookstore scenario, is the One to Many relationship. 13 Guevarra Institute of Technology
The One to Many relationship means that data for that field will show up a single time in one table, but many times in the related table. For example, let's look at one of the book titles in our bookstore. The Book ID for that book should appear only once in the Books table, because that table lists every title that we stock. But it will probably appear many times in the Orders table, because we hope that it gets ordered by many people many times. 14 Guevarra Institute of Technology
Enforcing Referential Integrity In the Edit Relationships dialog box, an option to Enforce Referential Integrity appears. You should click Enforce Referential Integrity to make sure that we NEVER have an order for a book that doesn't appear in our Books table. Selecting this option tells Access to check for these things when someone is working with your data records. 15 Guevarra Institute of Technology
Editing Existing Relationships Access 2007 allows you to edit relationships that already exist. This can be done using the Edit Relationships command on the Ribbon. However, a much simpler way is to simply double click on the link that appears in the relationship map. Either method brings up the Edit Relationships dialog box, where you can change your settings. 16 Guevarra Institute of Technology
Challenge Open the database and establish a relationship between the Books table and the Orders table using the Drag and Drop method. Establish a relationship between the Customers table and the Orders table using the Edit Relationships command on the Ribbon. Edit an established relationship by double-clicking the link. Explore the options and settings in the Edit Relationships dialog box. Move the tables around in the relationship map. 17 Guevarra Institute of Technology

Contenu connexe

Tendances

Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelExcel
 
MarcEdit for Illinois Library Association conference 2011
MarcEdit for Illinois Library Association conference 2011MarcEdit for Illinois Library Association conference 2011
MarcEdit for Illinois Library Association conference 2011GailBordenTech
 
Mail merge define and process on mail merge and REVIEW TAB
Mail merge  define and process on mail merge and  REVIEW TABMail merge  define and process on mail merge and  REVIEW TAB
Mail merge define and process on mail merge and REVIEW TABAshish051992
 
creating data
creating datacreating data
creating datasabinji
 
Introduction microsoft excel 2007
Introduction microsoft excel 2007Introduction microsoft excel 2007
Introduction microsoft excel 2007Celia Bandelier
 
Getting started with_microsoft_excel
Getting started with_microsoft_excelGetting started with_microsoft_excel
Getting started with_microsoft_excelPratiksha Mhatre
 
Productivity programs excel assignment 1
Productivity programs excel assignment 1Productivity programs excel assignment 1
Productivity programs excel assignment 1Beth Ann Cueni
 
Alcenco Label Flow Tutorial
Alcenco Label Flow TutorialAlcenco Label Flow Tutorial
Alcenco Label Flow Tutorialguestc46888
 
Advance word-processing-skills final
Advance word-processing-skills finalAdvance word-processing-skills final
Advance word-processing-skills finalmelaniebitar
 
Microsoft Excel introduction
Microsoft Excel introductionMicrosoft Excel introduction
Microsoft Excel introductionJesus Obenita Jr.
 
Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!peterb8
 
Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tablesJhen Articona
 
Mail merge made easy
Mail merge made easyMail merge made easy
Mail merge made easyRoel Palmaers
 

Tendances (20)

1st quarter 1st meeting- spreadsheet
1st quarter   1st meeting- spreadsheet1st quarter   1st meeting- spreadsheet
1st quarter 1st meeting- spreadsheet
 
Excel10basics
Excel10basicsExcel10basics
Excel10basics
 
Assignment in era
Assignment in eraAssignment in era
Assignment in era
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft Excel
 
MarcEdit for Illinois Library Association conference 2011
MarcEdit for Illinois Library Association conference 2011MarcEdit for Illinois Library Association conference 2011
MarcEdit for Illinois Library Association conference 2011
 
Word ch06
Word ch06Word ch06
Word ch06
 
Mail merge define and process on mail merge and REVIEW TAB
Mail merge  define and process on mail merge and  REVIEW TABMail merge  define and process on mail merge and  REVIEW TAB
Mail merge define and process on mail merge and REVIEW TAB
 
creating data
creating datacreating data
creating data
 
Introduction microsoft excel 2007
Introduction microsoft excel 2007Introduction microsoft excel 2007
Introduction microsoft excel 2007
 
Getting started with_microsoft_excel
Getting started with_microsoft_excelGetting started with_microsoft_excel
Getting started with_microsoft_excel
 
Productivity programs excel assignment 1
Productivity programs excel assignment 1Productivity programs excel assignment 1
Productivity programs excel assignment 1
 
Alcenco Label Flow Tutorial
Alcenco Label Flow TutorialAlcenco Label Flow Tutorial
Alcenco Label Flow Tutorial
 
Advance word-processing-skills final
Advance word-processing-skills finalAdvance word-processing-skills final
Advance word-processing-skills final
 
Microsoft office excel
Microsoft office excelMicrosoft office excel
Microsoft office excel
 
Microsoft Excel introduction
Microsoft Excel introductionMicrosoft Excel introduction
Microsoft Excel introduction
 
Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!Mail merge - Get Complete Information !!
Mail merge - Get Complete Information !!
 
Mail merge
Mail mergeMail merge
Mail merge
 
Creating relationships with tables
Creating relationships with tablesCreating relationships with tables
Creating relationships with tables
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Mail merge made easy
Mail merge made easyMail merge made easy
Mail merge made easy
 

En vedette

Factors affecting the emergence of e
Factors affecting the emergence of eFactors affecting the emergence of e
Factors affecting the emergence of eguevarra_2000
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database componentprudhvivreddy
 
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...Rohan Byanjankar
 
The Key Features Of A Database
The Key Features Of A DatabaseThe Key Features Of A Database
The Key Features Of A Databasestan300
 

En vedette (6)

Factors affecting the emergence of e
Factors affecting the emergence of eFactors affecting the emergence of e
Factors affecting the emergence of e
 
Basic example using database component
Basic example using database componentBasic example using database component
Basic example using database component
 
Intro databases
Intro databasesIntro databases
Intro databases
 
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...
Concept of Relational Database and Integrity Constraints [DIFFERENCE BETWEEN ...
 
The Key Features Of A Database
The Key Features Of A DatabaseThe Key Features Of A Database
The Key Features Of A Database
 
Data integrity
Data integrityData integrity
Data integrity
 

Similaire à Lesson Five Building Table Relationships

acct accounting Table Lab.pdf
acct accounting Table Lab.pdfacct accounting Table Lab.pdf
acct accounting Table Lab.pdfbkbk37
 
Sorting, Filtering, and Creating Relationships.pptx
Sorting, Filtering, and Creating Relationships.pptxSorting, Filtering, and Creating Relationships.pptx
Sorting, Filtering, and Creating Relationships.pptxkulmiyealiabdille
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docxfaithxdunce63732
 
PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |Umesh Kumar
 
MS Access Subform Success
MS Access Subform SuccessMS Access Subform Success
MS Access Subform SuccessPaul Barnett
 
Lesson One - Why do I need a Database
Lesson One - Why do I need a DatabaseLesson One - Why do I need a Database
Lesson One - Why do I need a Databaseguevarra_2000
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationshipswmassie
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database FundamentalsAnanda Gupta
 
Lesson Two Exploring An Access Database
Lesson Two   Exploring An Access DatabaseLesson Two   Exploring An Access Database
Lesson Two Exploring An Access Databaseguevarra_2000
 
Mic office access tutorial for beginners
Mic office access tutorial for beginnersMic office access tutorial for beginners
Mic office access tutorial for beginnersAimina Salsabila
 
Power BI Data Modeling.pdf
Power BI Data Modeling.pdfPower BI Data Modeling.pdf
Power BI Data Modeling.pdfVishnuGone
 
Microsoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersMicrosoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersAimina Salsabila
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access TutorialvirtualMaryam
 
10359485
1035948510359485
10359485kavumo
 
Create a table access - office
Create a table   access - officeCreate a table   access - office
Create a table access - officePavan Kumar
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01Lets try
 
MS ACCESS Tutorials
MS ACCESS TutorialsMS ACCESS Tutorials
MS ACCESS TutorialsDuj Law
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notesart02
 

Similaire à Lesson Five Building Table Relationships (20)

acct accounting Table Lab.pdf
acct accounting Table Lab.pdfacct accounting Table Lab.pdf
acct accounting Table Lab.pdf
 
Sorting, Filtering, and Creating Relationships.pptx
Sorting, Filtering, and Creating Relationships.pptxSorting, Filtering, and Creating Relationships.pptx
Sorting, Filtering, and Creating Relationships.pptx
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docx
 
PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |PPT On MS-Access 2007 | Full Concepts |
PPT On MS-Access 2007 | Full Concepts |
 
MS Access Subform Success
MS Access Subform SuccessMS Access Subform Success
MS Access Subform Success
 
1. access
1. access1. access
1. access
 
Lesson One - Why do I need a Database
Lesson One - Why do I need a DatabaseLesson One - Why do I need a Database
Lesson One - Why do I need a Database
 
Database Relationships
Database RelationshipsDatabase Relationships
Database Relationships
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 
Lesson Two Exploring An Access Database
Lesson Two   Exploring An Access DatabaseLesson Two   Exploring An Access Database
Lesson Two Exploring An Access Database
 
Mic office access tutorial for beginners
Mic office access tutorial for beginnersMic office access tutorial for beginners
Mic office access tutorial for beginners
 
Power BI Data Modeling.pdf
Power BI Data Modeling.pdfPower BI Data Modeling.pdf
Power BI Data Modeling.pdf
 
Ms Access
Ms AccessMs Access
Ms Access
 
Microsoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersMicrosoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for Beginners
 
MS Office Access Tutorial
MS Office Access TutorialMS Office Access Tutorial
MS Office Access Tutorial
 
10359485
1035948510359485
10359485
 
Create a table access - office
Create a table   access - officeCreate a table   access - office
Create a table access - office
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01
 
MS ACCESS Tutorials
MS ACCESS TutorialsMS ACCESS Tutorials
MS ACCESS Tutorials
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notes
 

Plus de guevarra_2000

School personnel sheet2
School personnel sheet2School personnel sheet2
School personnel sheet2guevarra_2000
 
Ting's report on training of spa
Ting's report on training of spaTing's report on training of spa
Ting's report on training of spaguevarra_2000
 
Personnel administration
Personnel administrationPersonnel administration
Personnel administrationguevarra_2000
 
Filipino values and culture
Filipino values and cultureFilipino values and culture
Filipino values and cultureguevarra_2000
 
Format for the action research project
Format for the action research projectFormat for the action research project
Format for the action research projectguevarra_2000
 
Action research format
Action research formatAction research format
Action research formatguevarra_2000
 
Recruitmentcompatible 1222798911739370-9
Recruitmentcompatible 1222798911739370-9Recruitmentcompatible 1222798911739370-9
Recruitmentcompatible 1222798911739370-9guevarra_2000
 
Filipino culture report
Filipino culture reportFilipino culture report
Filipino culture reportguevarra_2000
 
Personnel administration report
Personnel administration reportPersonnel administration report
Personnel administration reportguevarra_2000
 
Leader&cultural diversity
Leader&cultural diversityLeader&cultural diversity
Leader&cultural diversityguevarra_2000
 
Leader&cultural diversity
Leader&cultural diversityLeader&cultural diversity
Leader&cultural diversityguevarra_2000
 
Principles of getting job done
Principles of getting job donePrinciples of getting job done
Principles of getting job doneguevarra_2000
 
Leading different personalities
Leading different personalitiesLeading different personalities
Leading different personalitiesguevarra_2000
 

Plus de guevarra_2000 (20)

School personnel sheet2
School personnel sheet2School personnel sheet2
School personnel sheet2
 
Ting's report on training of spa
Ting's report on training of spaTing's report on training of spa
Ting's report on training of spa
 
Personnel admin
Personnel adminPersonnel admin
Personnel admin
 
Personnel administration
Personnel administrationPersonnel administration
Personnel administration
 
Supervisor's role
Supervisor's roleSupervisor's role
Supervisor's role
 
Filipino values and culture
Filipino values and cultureFilipino values and culture
Filipino values and culture
 
Format for the action research project
Format for the action research projectFormat for the action research project
Format for the action research project
 
Course outline
Course outlineCourse outline
Course outline
 
Course outline
Course outlineCourse outline
Course outline
 
Action research format
Action research formatAction research format
Action research format
 
Recruitment
RecruitmentRecruitment
Recruitment
 
Recruitmentcompatible 1222798911739370-9
Recruitmentcompatible 1222798911739370-9Recruitmentcompatible 1222798911739370-9
Recruitmentcompatible 1222798911739370-9
 
Filipino culture report
Filipino culture reportFilipino culture report
Filipino culture report
 
Personnel administration report
Personnel administration reportPersonnel administration report
Personnel administration report
 
Leader&cultural diversity
Leader&cultural diversityLeader&cultural diversity
Leader&cultural diversity
 
Leader&cultural diversity
Leader&cultural diversityLeader&cultural diversity
Leader&cultural diversity
 
Edleadership
EdleadershipEdleadership
Edleadership
 
Principles of getting job done
Principles of getting job donePrinciples of getting job done
Principles of getting job done
 
Leading different personalities
Leading different personalitiesLeading different personalities
Leading different personalities
 
Success2012
Success2012Success2012
Success2012
 

Dernier

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Dernier (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 

Lesson Five Building Table Relationships

  • 1. Building Table Relationships Lesson Five ( ACCESS 2007)
  • 2. By now, you have set up the tables you need for your database, and created fields for those different tables. Relationships provide Access 2007 with the means to bring that information together for you when you need it. 

This lesson explains how to establish relationships between the tables in an Access 2007 database. You will learn how to read and manipulate the relationship map. You will also learn about Primary and Foreign Keys, relationship types, and about referential integrity. 2 Guevarra Institute of Technology
  • 3.
  • 4. When the Show Table dialog box appears: Select each table name and click Add for the tables you want to relate. When you are done, Close the Show Table dialog box. 4 Guevarra Institute of Technology
  • 5. You should now see a relationship map that contains all the tables that were selected. 5 Guevarra Institute of Technology
  • 6. To move a table that appears in the relationship map: Place your mouse over the table you want to move. Hold down the left mouse button, and drag the table to a new location. Release the mouse button to drop the table in its new place. 6 Guevarra Institute of Technology
  • 7. Understanding the Relationship Map The relationship map lists all of the tables that were selected to relate, and all of the fields that were set up for that table previously. Notice that the first field has a key icon next to it. This is the Primary Key for the table. 7 Guevarra Institute of Technology
  • 8. Primary and Foreign Keys A Primary Key is the first field in each table of the database. You may recall that this field auto numbers by default, so that every record in the table has its own unique number to identify it. Access uses this number to quickly pull information together for you when you run queries or reports, which are covered later. In the example above, the primary key for the Customers table is Customer ID, the primary key for the Orders table is Order ID, and the primary key for the Books table is Book ID. A Foreign Key is a field that is the Primary Field in its own table, but that shows up in another table. If you look closely at the Orders table, the fields Customer ID and Book ID appear there, as well as in their own respective tables. These fields are the primary key in their own tables, but in the Orders table, they are considered Foreign Keys. 8 Guevarra Institute of Technology
  • 9. Foreign Keys 9 Guevarra Institute of Technology
  • 10.
  • 11. Relating Tables with the Drag and Drop Method It is easy to relate tables from the relationship map: Select a field name from one table by holding down the left mouse button Drag the field name from the one table to the other table in the desired relationship .Drop the first field name onto the field name that you want to relate by releasing the left mouse button. In the example above, we selected the Book ID field from the Books table, and dragged and dropped it on the Book ID field in the Orders table. 11 Guevarra Institute of Technology
  • 12. The Edit Relationships dialog box appears. Select the Enforce Referential Integrity option. This option is explained in detail below. Click Create. Edit Relationships Dialog Box 12 Guevarra Institute of Technology
  • 13. Understanding Types of Relationships Access 2007 allows for several different types of relationships. These include: One to One One to Many Many to Many The relationship type you will come across most frequently, and the one created in our bookstore scenario, is the One to Many relationship. 13 Guevarra Institute of Technology
  • 14. The One to Many relationship means that data for that field will show up a single time in one table, but many times in the related table. For example, let's look at one of the book titles in our bookstore. The Book ID for that book should appear only once in the Books table, because that table lists every title that we stock. But it will probably appear many times in the Orders table, because we hope that it gets ordered by many people many times. 14 Guevarra Institute of Technology
  • 15. Enforcing Referential Integrity In the Edit Relationships dialog box, an option to Enforce Referential Integrity appears. You should click Enforce Referential Integrity to make sure that we NEVER have an order for a book that doesn't appear in our Books table. Selecting this option tells Access to check for these things when someone is working with your data records. 15 Guevarra Institute of Technology
  • 16. Editing Existing Relationships Access 2007 allows you to edit relationships that already exist. This can be done using the Edit Relationships command on the Ribbon. However, a much simpler way is to simply double click on the link that appears in the relationship map. Either method brings up the Edit Relationships dialog box, where you can change your settings. 16 Guevarra Institute of Technology
  • 17. Challenge Open the database and establish a relationship between the Books table and the Orders table using the Drag and Drop method. Establish a relationship between the Customers table and the Orders table using the Edit Relationships command on the Ribbon. Edit an established relationship by double-clicking the link. Explore the options and settings in the Edit Relationships dialog box. Move the tables around in the relationship map. 17 Guevarra Institute of Technology