Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.

Slides:



Advertisements
Similar presentations
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Advertisements

Database Basics. What is Access? Database management system Computer-based equivalent of a manual database Makes it easy to organize and update information.
Copyright © 2008 Pearson Prentice Hall. All rights reserved Committed to Shaping the Next Generation of IT Experts. Exploring Microsoft Office Access.
Benchmark Series Microsoft Access 2010 Level 1
Access Lesson 2 Creating a Database
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.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
SUNY Morrisville-Norwich Campus-Week 10 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
Querying a Database Microsoft Office Access 2003.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Access Lesson 4 Creating and Modifying Forms
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory Pasewark & Pasewark.
1 Access Lesson 3 Creating Queries Microsoft Office 2010 Introductory.
Chapter 3 Maintaining a Database
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Database Applications – Microsoft Access Lesson 2 Modifying a Table and Creating a Form 45 slides in presentation Accessibility check 9/14.
Microsoft Access Lesson 3
Microsoft Access 2000 Creating Tables and Relationships.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
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.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
® 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.
DATABASE DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
Analyzing Data For Effective Decision Making Chapter 3.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 9 1 Microsoft Office Access 2003 Tutorial 9 – Using Action Queries, and Defining Table Relationships.
© 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,
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.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
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.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Creating Related Tables Creating Related Tables Determining.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Introduction to Database using Microsoft Access 2013 Part 7 November 19, 2014.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
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.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Microsoft Access 2010 Chapter 3 Maintaining a Database.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Relational Database Techniques
1 CHƯƠNG 4 Creating Relational Databases Understanding Table Relationships Example: This database tracks customers and their orders in two separate.
1 11 Exploring Microsoft Office Access 2007 Chapter 6 Data Protection.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
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
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 5 1 Microsoft Office Access 2003 Tutorial 5 – Enhancing a Table’s Design.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
CIS 155 Table Relationship
Access Lesson 2 Creating a Database
Relational Queries (query 12) Display vendor contact info (contact person and phone number) for inventory products (relationship query) Query: Inventory.
Presentation transcript:

Lesson 32: Designing a Relational Database

2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good relational database design  Modify field settings and create Lookup fields that return multiple values  Create a split form  Identify database relationship types and create and print a relationships report  Identify object dependencies

Principles of Good Database Design Reduce redundancy  Divide data into subject-based tables Show Access how data in all tables related to scope (purpose) of the database Ensure that data is complete and accurate Include report formats, forms, and queries to process data and report information that meets the intended needs of the database 3 Tip! Incomplete/inaccurate data results in inaccurate processing and reporting, and invalidates the integrity of the database.

Applying Design Steps 4 Design Step/TaskResult Identify the purpose of the databaseTo generate a utility bill Locate and organize detailed information about what the database should contain Customer name, address, amount of power used, associated costs, company info Separate the details into related groupsCustomer details, billing history, cost of power, utility company details Identify additional breakdowns in information details Customer first name, last name, street, city, state, zip code, telephone, etc. Specify a primary key for each group of dataCustomer number Relate tables to each other by identifying how data in one table can be connected to data in other tables Customer number added to other tables to connect the tables Create the database in Access and test the design Create tables to determine whether or not you can generate the billing statement Apply normalization rules and make necessary adjustments Review the design using normalization levels (described elsewhere) and determine normalization level attained

Normalizing Data Process of refining tables, keys, fields, and relationships to create an efficient database Includes:  Discarding repeating groups  Minimizing redundancy  Eliminating composite keys for partial dependency  Separating non-key attributes Follows steps and guidelines for designing a database 5

Common Field Properties 6 PropertyDescription Field SizeControls the number of characters Access allows in the field Input MaskSets the appearance of field data entered, adds standard characters such as parentheses, slashes and hyphens to the data, formats all data in caps or lowercase, etc. CaptionDisplays alternate text in place of the field name in datasheets, on forms, and in reports; caption text is usually more descriptive, especially when field names are cryptic Default ValueSets a data value that Access enters for a field when no other data is entered Validation RuleSets rules for data entered in a field so Access can check the data to ensure it meets value limitations Validation TextProvides instructional information to help data entry personnel correctly enter data for a field with a validation rule; Access alerts user if invalid data is entered RequiredSets the field as a required field so data must be entered into that field

Number Field Size Property Details 7 Field SizeDescription ByteStores whole numbers between 0 and 255 using 1 byte; allows no fractions or decimal points IntegerStores whole numbers between -32,768 and 32,767 using 2 bytes rather than the 7 bytes used for high values Long IntegerStores whole numbers between -2,147,483,648 and 2,147,483,647 using 4 bytes rather than the 14 bytes normally used for high values SingleStores positive and negative numbers to exactly 7 decimal places using 4 bytes DoubleStores positive and negative numbers to exactly 15 decimal places using 8 bytes Replication IDIdentifies replication of tables, records, and other objects in Access 2003 or earlier databases using 16 bytes DecimalStores positive and negative numbers to exactly 28 decimal places using 121 bytes

Multi-Value Lookups Enables you to select multiple values for a field  For example, you might want to identify multiple vendors that supply products 8

Split Forms 9 Displays form view at the top of the window and datasheet view at the bottom of the window.

Working with Relationships Three types of relationships:  One-to-One  One-to-Many  Many-to-Many 10

One-to-One Relationship Each record in Table A can have only one matching record in Table B  Example: Each employee’s address is stored in one table and has a matching record in the payroll table 11

One-to-Many Relationships Each record in Table A can have many matching records in Table B  Example: Each supplier in the Suppliers table could have multiple items in the Inventory table 12

Many-to-Many Relationships 13 Records in Table A can have many matching records in Table B, and vice-versa Normally requires a Junction Table  Example: Items could be ordered by many customers and each customer might order many items

Relationship Join Line Connects fields common to both tables 14

Referential Integrity Sorting query results A system of rules used to ensure that relationships are valid Must be set in Edit Relationships dialog box Access identifies the many and one side of the relationship 15

Cascade Options Set in the Edit Relationships dialog box Cascade Update updates key field of a related table when edits are made to field in primary table Cascade Delete removes records from a related table when record is deleted from primary table 16

Relationship Join Properties Join Properties: Control circumstances under which a record from a related table appears when you run a query Inner Joins: Check for records with matching values in the join field and displays only those that match Left Outer Joins: Display all records from the one side of a one-to-many relationship Right Outer Joins: Display all records from the many side of a one-to-many relationship 17

Join Properties Dialog Box Left table name: One side of one-to-many relationship Right table name: Many side of one-to-many relationship Join types and descriptions

One vs. Many Sides of Relationships One (left) side of relationship Many (right) side of relationship Join Type button

Object Dependencies Shows the object for which dependencies are shown at the top You can choose to identify object dependent on the active object or those on which the object depends Objects are listed by type

Lesson 32: Designing a Relational Database