Database Relationships Objective 5.01 Understand database tables used in business.

Slides:



Advertisements
Similar presentations
Pasewark & Pasewark Microsoft Office XP: Introductory Course 1 INTRODUCTORY MICROSOFT ACCESS Lesson 4 – Finding and Ordering Data.
Advertisements

ISP 121 Access Normalization and Relationships. Normalization Say we’re operating a pet day-care and we need to keep information on our pets/customers.
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.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
QUERYING A DATABASE By: Dr.Ennis-Cole. OBJECTIVES: Learn how to use the Query window in Design view Create, run and Save queries Define a relationship.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
Computer Science & Engineering 2111 Introduction to Database Management Systems Relationships and Database Creation 1 CSE 2111 Introduction to Database.
Database Relationships Objective 5.01 Understand database tables used in business.
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.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Software Development Unit 2 Databases What is a database? A collection of data organised in a manner that allows access, retrieval and use of that data.
Database Relationships Objective 5.01 Understand database tables used in business.
Databases & Data Warehouses Chapter 3 Database Processing.
Microsoft Access Database software. What is a database? … a database is an organized collection of data. A collection of data of similar information compiled.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Database Design Concepts
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.
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.
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2010.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
ASP.NET Programming with C# and SQL Server First Edition
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
CHAPTER 8: MANAGING DATA RESOURCES. File Organization Terms Field: group of characters that represent something Record: group of related fields File:
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
Information Systems Today (©2006 Prentice Hall) 3-1 CS3754 Class Note 12 Summery of Relational Database.
© 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,
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
1 Outline  What is a Primary Key?  AutoNumber primary keys  Single-field primary keys  Composite-field primary key  About Foreign Keys  Database.
1 Database Concepts 2 Definition of a Database An organized Collection Of related records.
Microsoft Access Intro Class 6 Relationships.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
Chapter 4c, Database H Definition H Structure H Parts H Types.
1 Chapter 1: Finding Your Way Through a Database Exploring Microsoft Office Access 2007.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
26 Mar 04 1 Application Software Practical 5/6 MS Access.
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.
Access Review. Access Access is a database application A database is a collection of records and files organized for a particular purpose Access supports.
Forms and Subforms 5.02 Understand database queries, forms, and reports used in business.
Database revision.
Build a database III: Build relationships for a new Access database Overview: You can relate This course teaches you how to build relationships between.
File and Database Design Class 22. File and database design: 1. Choosing the storage format for each attribute from the logical data model. 2. Grouping.
You can sort Access data so you can view records in the order you want to view them, and you can filter data so you only see the records you want to see.
Lesson 2: Designing a Database and Creating Tables.
1 MS Access. 2 Database – collection of related data Relational Database Management System (RDBMS) – software that uses related data stored in different.
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.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Microsoft Access Database Creation and Management.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
TECHNOLOGY IN ACTION. Chapter 11 Behind the Scenes: Databases and Information Systems.
1 Finding Your Way Through a Database Exploring Microsoft Office Access.
Database Relationships
Database Relationships
5.02 Understand database queries, forms, and reports used in business.
Database Relationships
Presentation transcript:

Database Relationships Objective 5.01 Understand database tables used in business

Database Management The effectiveness of a database is measured by the user’s ability to retrieve useful information. An effective database contains timely information and requires continuous maintenance. Ex: A Telephone Directory Database contains a large 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 & manipulation of database information.

Database Tools Filtering – allows for the retrieval of information that meets specific criteria. Sorts – Allows for information to be arranged in a specific order such as alphabetical, chronological, ascending or descending. Database Relationships – a link between two or more tables in a database.

Relationships A relationship means that two or more tables are linked together by a common field, called a primary key field. Table relationships increase the power of the database by allowing data to be stored separately, but managed and retrieved collectively.

Slide Understand database tables used in business Making Friends with Relations Relationships link data from individual tables and increase the usefulness of a database. One of the great benefits of working with databases is the ability to store huge quantities of information. One company’s database may contain multiple tables of related information. When the information between tables is linked, it is called a relationship.

What does a relationship look like? One record in the Student Table is related to one record in the Participation Table Relationship established between two tables

Keys to the Relationship A primary key unlocks the relationship potential of a table by creating a unique link between tables. Primary Key is a data type that is set to make each record within a database table unique so that tables can link together. Primary key fields must be of the same data type and size for the tables to which they link. The red line that graphically represents the relationship is called a Join Line

What makes a good primary key? Which of the following would make each record in a database unique? Social security number Social security number Last name Last name First name First name Automobile VIN number Automobile VIN number Birth date Birth date Product serial number Product serial number

Primary and Foreign Keys When tables relate, the primary key of one table becomes a foreign key of the other table For example, in the tables below, ISBN appears as a primary key in the Grocery Products table...…and in the Orders Table as a foreign key

Diagram of Primary & Foreign Keys Understand queries, forms, and reports.

Function of the Junction Table A junction table is used with many-to- many relationships to join primary key fields of multiple tables The Junction table is like a hub or control center In this example, Orders is the Junction Table. It allows the Grocery Products and the Customers tables to share information.

One-to-One Only one matching record between two tables This relationship is the least common because it is not a very efficient use of tables

One-to-Many One-to-Many The most common type of relationship The most common type of relationship One record in Table A links to multiple records in Table B One record in Table A links to multiple records in Table B The link is established through the primary/foreign key fields of the two tables The link is established through the primary/foreign key fields of the two tables

Many-to-Many Many-to-Many Multiple records in multiple tables are linked by their primary keys through a Junction Table. Multiple records in multiple tables are linked by their primary keys through a Junction Table. A many-to-many relationship is formed by connecting two or more tables that have a one-to-many relationship. The connection is made by a Junction Table. A many-to-many relationship is formed by connecting two or more tables that have a one-to-many relationship. The connection is made by a Junction Table.

Setting up a Relationship Add one table’s primary key to a field in another table that has the same properties The primary key in Grocery Products is ISBN The primary key in Orders is Order No The primary key in Customers is Store ID

Referential Integrity Referential integrity protects related data that is stored in multiple tables. It would prevent a customer in one table from being deleted if the customer is also in a related table.