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.

Slides:



Advertisements
Similar presentations
Database Relationships in Access As you recall, the data in a database is stored in tables. In a relational database like Access, you can have multiple.
Advertisements

© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module J (Office 2010 Version) Implementing.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module J (Office 2010 Version) Implementing.
Database Modeling IT Key Ideas, Dynamic Database Systems, 2002 Chapter 8.
Tutorial 3 Queries and Table Relationships
1 Class Agenda (04/03 and 04/08)  Review and discuss HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve.
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
SUNY Morrisville-Norwich Campus-Week 10 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Normalization Queries (contd)
Extended Learning Module J (Office 2007 Version) Implementing a Database with Microsoft Access McGraw-Hill/Irwin Copyright © 2010 by the McGraw-Hill Companies,
Week 2 Normalization and Queries
Creating a Blank Database 1. Open up Microsoft Access 2. Click on Blank document button 3. On the right panel, Specify the location for saving your database.
Accounting Databases Chapter 2 The Crossroads of Accounting & IT
LSP 121 Week 2 Normalization and Queries. Normalization The Old Car Club database presented a problem – what if one person owns multiple cars? (One owner.
Management Information Systems MS Access 2003 By: Mr. Imdadullah Lecturer, Department of M.I.S. College of Business Administration, KSU.
Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.
MS Access 2007 IT User Services - University of Delaware.
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.
Database Design.  Define a table for each entity  Give the table the same name as the entity  Make the primary key the same as the identifier of the.
Database Relationships Objective 5.01 Understand database tables used in business.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Microsoft Access Lesson 3
1 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
LSP 121 Week 2 Normalization and Advanced Queries.
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,
1 Class Agenda (11/07 and 11/12)  Review HW #8 answers  Present normalization process Enhance conceptual knowledge of database design. Improve practical.
Viewing Tip: While viewing this presentation in your browser, select Browse, Full Screen. Then, when you want to pause the show, Right Click and select.
Database Relationships. Types of Relationships One to one – Person to Driver’s License, Country to President, Person to Social Security Number (in theory)
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
DATABASE DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
RELATIONSHIPS Generally there are two main database types: flat-file and relational.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
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.
Relationships and Advanced Query Concepts Using Multiple Tables Please use speaker notes for additional information!
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
M1G Introduction to Database Development 2. Creating a Database.
Microsoft Access Intro Class 6 Relationships.
Using Microsoft Access 56:150 Information System Design.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
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.
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.
U:/msu/course/cse/103 Day 18, Slide 1 CSE 103 Day 18 If you are not enrolled in CSE 103, please save and log out by 10:10.
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.
Creating a Database Angelo Lafratta- Website: Search: Keith Valley Physical.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Database design Using Access 2007
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Extended Learning Module J (Office 2007 Version) Implementing.
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.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
Database Relationships
Relationships While we are on the subject of Relationships, let’s take a quick look at them.
Presentation transcript:

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. What happens when a customer has more than one pet? Create a separate table for just the pets. How do you link the two tables together?

Normalization Example Pet Information(originally) Customer ID (primary key) Customer Last Name Customer First Name Customer Address Customer City Customer State Customer Zip Customer Phone these fields repeat 1 to n times Pet ID Type of Animal Pet Name Breed Color Weight Height Customer Table Customer ID (primary key) Last Name First Name Address City State Zip Phone Pet Table Pet ID Type of Animal Pet Name Breed Color Weight Height Customer ID (not a primary key here!) Primary Key in Customer Table? Foreign Key in Pet Table? Is there a primary Key in Pet Table? Relationship

Another Example Student Records Student ID (primary key) Name Address City State Zip Phone these fields repeat 1 to n times Class Name Grade Number Credits Major Minor Degree Sought Student Info Student ID Name Address City State Zip Phone Major Minor Degree Sought Grades Class Name Grade Number Credits Student ID Before After

Let’s Try This One In Access Customer ID Customer Last Name Customer Phone Customer Address Customer City Customer State Customer Zip following fields repeat 1 to n times: Sales Transaction Date Sales Amount Let’s first create the two tables using paper and pencil, then when we know they are correct, let’s enter the tables into Access.

Relationships Remember that relational databases split data between two or more tables. To link these tables, we use a foreign key to tie them together. Usually the linking field is the primary key in one database, but not a primary key in another (if it is cross-reference by another table, it is considered a foreign key). Tables don't become magically related... you will have to relate them (or verify that Access has related them correctly). Usually you only want to put tables in a database that you will relate in some way. Linking fields must be the same data type. Types of Relationships: One-to-one One-to-many Many-to-one Many-to-many (not an option!!)

Relationships Three important thoughts about linking tables: You can link only tables that are in the same database. You can link queries to tables, but that’s unusual. You need to tell Access how your tables are related up front – it is a formal process.

Relationships Creating Formal Relationships: Click on the Relationships button on the toolbar. Click on the Show Table button on the toolbar. Add tables if needed by choosing add. Click close after you are done. Decide which two tables you want to link. Put the mouse pointer on the field you want to link in the parent table (which will be the primary key of that table) and hold the left mouse button down. While holding the mouse button, slide the mouse from one linking field to the other. Choose Enforce Referential Integrity (ensures that relationships between records in related tables are valid and the you don't accidentally delete or change related data). Then choose create. Repeat.

Why do we have relational databases? Eliminates redundancy Makes adding data easier Allows for more secure access to only parts of the data