Introduction to MS Access, building tables, creating keys, creating relationships BSAD 141 Dave Novak.

Slides:



Advertisements
Similar presentations
Access Manual 4 By Elham S.Khorasani Ismail Guneydas Dhawala Kovuri.
Advertisements

Chapter 10: Designing Databases
Tutorial 3 Queries and Table Relationships
The Relational Database Model – some relations you might want to avoid!!!
Maintenance Modifying the data –Add records –Delete records –Update records Modifying the design –Add fields into tables –Remove fields from a table –Change.
11 3 / 12 CHAPTER Databases MIS105 Week-9/ Lec02 Irfan Ahmed Ilyas.
Database Management: Getting Data Together Chapter 14.
Entity-Relationship Model and Diagrams (continued)
The Relational Database Model:
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 5 Normalization of Database Tables.
Introduction to Databases
Chapter 5 UNDERSTANDING AND DESIGNING ACCOUNTING DATA.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Normalization. Introduction Badly structured tables, that contains redundant data, may suffer from Update anomalies : Insertions Deletions Modification.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Learningcomputer.com SQL Server 2008 – Entity Relationships in a Database.
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
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 ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Database Management COP4540, SCS, FIU Relational Model Chapter 7.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Logical Database Design Relational Model. Logical Database Design Logical database design: process of transforming conceptual data model into a logical.
© 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,
Relationships and Advanced Query Concepts Using Multiple Tables Please use speaker notes for additional information!
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Object Persistence (Data Base) Design Chapter 13.
Object Persistence Design Chapter 13. Key Definitions Object persistence involves the selection of a storage format and optimization for performance.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T6: Basic Skills and Tools Using Access 2010 Business Driven Technology.
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.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T6 Basic Skills Using Access.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
DAY 15: ACCESS CHAPTER 1 Rahul Kavi October 6,
Relational Theory and Design
INTRODUCTION lecture1 1. Data base concept Data is a meaningless static value. What does 3421 means? Information is the data you process in a manner that.
Entering Data in One of the Independent Entity Tables and the Associative Entity Table of a M:M Relationship* If you came to this presentation via a web.
Lesson 2: Designing a Database and Creating Tables.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Entity-Relationship Diagram Presentation Gianna-lee Williams 6AQ Ms. Anderson.
Understand Primary, Foreign, and Composite Keys Database Administration Fundamentals LESSON 4.2.
Chapter 13.3: Databases Invitation to Computer Science, Java Version, Second Edition.
Brian Thoms.  Databases normalization The systematic way of ensuring that a database structure is suitable for general-purpose querying and free of certain.
Database Design Chapter 9 Part-1: Concepts & Foreign Keys 1.
Detailed Data Modeling. Outline Data Modeling Modeling Constructs –Entities –Relationships –Cardinality Model Basic Rules Advanced Rules Prototyping Process.
Howard Paul. Sequential Access Index Files and Data File Random Access.
DATA MODELING AND DATABASE DESIGN DATA MODELING AND DATABASE DESIGN Part 2.
Concepts of Database Management Seventh Edition Chapter 4 Keys and Relationship.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
What Is Normalization  In relational database design, the process of organizing data to minimize redundancy  Usually involves dividing a database into.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Decision Analysis Fall Term 2015 Marymount University School of Business Administration Professor Suydam Week 10 Access Basics – Tutorial B; Introduction.
Databases Chapter 9 Asfia Rahman.
Tables and Their Characteristics
CIS 155 Table Relationship
Introduction to MS Access: creating tables, keys, and relationships
Entity-Relationship Model and Diagrams (continued)
Introduction lecture1.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall
Entity Relationship Diagrams ERDs
Mapping an ERD to a Relational Database
Nagendra Vemulapalli Access chapters 1&2 Nagendra Vemulapalli
Presentation transcript:

Introduction to MS Access, building tables, creating keys, creating relationships BSAD 141 Dave Novak

Topics Covered Provide a brief introduction to MS Access Name and save a DB file Create tables and keys Create and enforce relationships Convert a partial ERD to design in Access Provide examples of both entity integrity and referential integrity using Access

Important to note! If you are having trouble keeping up with the lecture or having some type of technical problems, you may need to read and work through the Tech Plug Ins that are shown in the course schedule These will walk you through the basic features in MS Access and guide you through table and key creation as well as how to create relationships between tables

Example: Partial ERD Consider a relationship between a manager and a project Assume the following: Each manager can manage up to 5 different projects simultaneously Each manager must manage at least one project Each project is assigned to only 1 manager (there are no co-manager leads on the project) When entered into the DBMS, each project must be assigned to a manager

Example: Partial ERD Draw the partial ERD – discuss degree, connectivity, and existence

Two Types of RDBMS Integrity Rules 1) Entity Integrity 2) Referential Integrity

Building Tables in Access Create a DB file called “class-example1” Build 2 separate tables that correspond to the partial ERD you just drew Attributes for Manager (ManagerID, FirstName, LastName, Address, Salary) Attributes for Project (ProjectID, ProjectName, Duration, Phase) Model the relationship in Access and enforce referential integrity

Building Tables in Access 1) Create the “shell” or empty tables to begin with 2) Specify the data type for each attribute Manager (ManagerID (txt), FirstName (txt), LastName (txt), Address (txt), Salary (currency)) Project (ProjectID (txt), ProjectName (txt), Duration (txt), Phase(txt))

Link the tables using a Foreign Key Using our ERD and what you know about the location of Foreign Keys FK: Which table does the FK appear in? What is the FK attribute? Go into design view and add the FK attribute

Enter Data in Manager Table: Entity Integrity Error You get an error message if you violate entity integrity rules

Complete Manager Table Just use 5 attributes and enter 3 records I give you

Enter Data in Project Table Just use the 4 attributes and enter the 4 records I give you!

Populate the FK attribute: Referential Integrity Error We will end up with a referential integrity violation

Referential Integrity Manager ID? One of the FK attribute values in the Project Table (the M side of the relationship) does not exist in the parent table (the Manager Table – the one side of the relationship). There is NO manager ID , so that ID value cannot be assigned to a project

Referential Integrity and Tables The specific value you enter for any FK attribute value must FIRST exist in the parent table (the table that relates directly to the particular attribute – in our case where the FK is a PK) Example: I cannot be assigned to teach a section of 141 (or any other class) if I am not first listed in the professor / teacher table You have a value for ManagerID that exists in the Manager table

Design Rules Normalization

Design Rules Normalization Typically a trade-off between higher levels of normalization and processing speed As redundancy is reduced, the time it takes the DBMS to process a query or extract data could increase Higher levels of normalization may not always be desired where processing speed is critical

Design Rules We want to convert this single table DB file to a relational DBMS format

Design Rules There are clearly some redundancy issues with the data How do we address redundancy via normalization and organize the data into relational tables?

Step 1 The current format is just an Excel file, not a relational DBMS Identify attributes of each entity (or fields to be placed in each table)

Step 2 Create tables to capture data we need We want attributes and data related to a specific entity in one table and attributes and data related to another entity in a different table Design tables to minimize need to enter redundant information What do we do with attributes that pertain to both employee and project?

Step 3 Consider relationship connectivity (1:M, M:M) between the entities – may be a trial and error process What type of relationship is needed here? Can employees work on more than 1 project at a time, or only 1 project at a time? Is each project staffed by only 1 employee, or can each project be staffed my multiple employees? We can tell by looking at the data in the Excel table

Step 4 Draw the partial ERD