Database Relationships Objective 5.01 Understand database tables used in business.

Slides:



Advertisements
Similar presentations
Exploring Microsoft Access 2003 Chapter 5 One-to-Many Relationships : Subforms and Multiple Table Queries.
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.
Database A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
Access A Relational Database Management System. Prof. Leighton2 Database ► A database is a collection of data that’s related to a particular topic ► A.
FIRST COURSE Microsoft Access (Basics). XP Objectives Define the terms field, record, table, relational database, primary key, and foreign key. Learn.
Accounting Databases Chapter 2 The Crossroads of Accounting & IT
MIS 451 Building Business Intelligence Systems Logical Design (3) – Design Multiple-fact Dimensional Model.
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.
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.
Database Design Concepts
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.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Relational Database Concepts. Let’s start with a simple example of a database application Assume that you want to keep track of your clients’ names, addresses,
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
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:
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
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,
1 Outline  What is a Primary Key?  AutoNumber primary keys  Single-field primary keys  Composite-field primary key  About Foreign Keys  Database.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Relational Database. Database Management System (DBMS)
Microsoft Access Intro Class 6 Relationships.
® Microsoft Access 2010 Tutorial 9 Using Action Queries and Advanced Table Relationships.
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.
ITGS Databases.
1 Database Systems Introduction to Microsoft Access Part 2.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
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.
ENTITY RELATIONSHIP DIAGRAM ENTITY RELATIONSHIP DIAGRAM IS A SPECIALIZED GRAPHIC THAT ILLUSTRATES THE INTERRELATIONSHIPS BETWEEN ENTITIES IN A DATABASE.
Relational Theory and Design
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.
Quiz questions. 1 A data structure that is made up of fields and records? Table.
Lesson 2: Designing a Database and Creating Tables.
1 CHƯƠNG 4 Creating Relational Databases Understanding Table Relationships Example: This database tracks customers and their orders in two separate.
Exploring Office Grauer and Barber 1 One-to-Many Relationships: Subforms and Multiple-Table Queries(Wk7)
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
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.
Database Relationships Objective 5.01 Understand database tables used in business.
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.
Database Relationships
Tables & Relationships
CIS 155 Table Relationship
Database Relationships
CSCI-100 Introduction to Computing
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

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 is an essential element of a database table. It is a data type that is set to make each record within a database table unique and to link tables 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? Which ones would NOT be good primary keys? Social security number Social security number Last name Last name First name First name Automobile VIN number Automobile VIN number 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

Function of the Junction Table A junction table is used 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-Many One-to-Many One record in Table A links to multiple records in Table B through the primary/foreign key fields of the two tables One record in Table A links to multiple records in Table B 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.