Designing MS-Access Tables

Slides:



Advertisements
Similar presentations
Build a database I: Design tables for a new Access database
Advertisements

Designing Tables in Microsoft Access By Ed Lance.
Microsoft ® Access ® 2010 Training Design the tables for a new database.
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2.1: Relational Databases.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Database Design Week 10.
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Jeopardy Objects Navigation Buttons True/False Parts of a Report Vocabulary Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final.
Normalisation Ensuring data integrity in database design 1.
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Access Database Design for Clinical Research Studies October 17, 2003 Paul A. Harris Julie McFarlane GCRC Research Skills Workshop.
MELISSA PICO SUMMER 08 Data Storage & Retrieval: Access instead of Excel.
Page 1 ISMT E-120 Introduction to Microsoft Access & Relational Databases The Influence of Software and Hardware Technologies on Business Productivity.
Data type – determines the type of data and range of values that can be entered in a field.
Business Computer Information Systems Microsoft Office XP Access Review Lessons 1 through 5.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
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.
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.
Modelling Techniques - Normalisation Description and exemplification of normalisation.Description and exemplification of normalisation. Creation of un-normalised.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Lesson 1 -What is a Database? -Fields and Records
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.
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.
Microsoft Access 2013 Design and Create Tables to Store Data Chapter 2.
Microsoft ® Office Access ® 2007 Training Build a database I: Design tables for a new Access database ICT Staff Development presents:
Module III: The Normal Forms. Edgar F. Codd first proposed the process of normalization and what came to be known as the 1st normal form. The database.
MS Access: Creating Relational Databases Instructor: Vicki Weidler Assistant: Joaquin Obieta.
What is a Database? A Database is…  an organized set of stored information usually on one topic  a collection of records  a way to organize information.
WEEK 11 Database Design. TABLE INSTANCE CHARTS Create Tables.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
File Processing Concepts – Field – combination of 1 or more characters that is the smallest unit of data to be accessed – Record – group of related fields.
DAY 12: DATABASE CONCEPT Tazin Afrin September 26,
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2005 Ed Lance Fundamentals of Relational Database Design By Ed Lance.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
Chapter 17 Creating a Database.
1 A Guide to MySQL 2 Database Design Fundamentals.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Using Microsoft Access 56:150 Information System Design.
Microsoft Access 2013 Design and Implement Powerful Relational Databases Chapter 6.
Exploring Microsoft Access Chapter 6 Many-to-Many Relationships: A More Complex System.
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.
ITGS Databases.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Database Management System Conducted By Provincial Computer Resource Centre Gurudeniya Jayaratna Alahakoon.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
Mr C Johnston ICT Teacher
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Connecting (relating) Data Tables to get Custom Records (Queries) Database Basics.
Data Resource Management Application Layer TPS A RCHITECTURE Data Layer Sales/MarketingHR Finance/Accounting Operations Spreadsheet Data MS Access Accounts.
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
Notes: **A Row is considered one Record. **A Column is a Field. A Database is…  an organized set of stored information usually on one topic  a collection.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
To play, start slide show and click on circle Access 1 Access 2 Access 3 Access 4 Access Access
Microsoft Access 2016 Design and Implement Powerful Relational Databases Chapter 6.
CHAPTER 7 DATABASE ACCESS THROUGH WEB
and Defining Table Relationships
CIS 155 Table Relationship
GO! with Microsoft Access 2016
Normalization Referential Integrity
Introduction to Databases & SQL
Spreadsheets, Modelling & Databases
Lecture 2 Lecturer: awdang aziz MS access
Presentation transcript:

Designing MS-Access Tables Relational Database Concepts Paul A. Harris, Ph.D. General Clinical Research Center

Introduction Database design (data modeling) is crucial for long-term management of information For many users, the first experience using MS-Access (or any RDBS) is confusing A major cause of confusion is the design and use of tables

Agenda Discuss relational database concepts - Keys and relationships - Normalization - Strategy Fields - Types - Demonstration Referential Integrity

Overview MS-Access is a relational database engine and a set of integrated development tools Tables = Data Queries = combine tables + ask questions Forms/reports UI Macros/Code add functionality Tables Code Query Report Forms Macro

Relational Database Concepts - Keys Keys are pieces of data that help to identify a row of information in a table Primary key uniquely identifies an entire row of data – 1) must have a value (cannot be null); 2) can never change(?); and 3) must have a unique value for each record in table. - Look for a logical field meeting criteria - If no logical field exists, invent one (auto-number) Foreign keys are fields in one table that relate back to another table’s primary keys - Make sure foreign key “type” is same as related PK.

Relational Database Concepts - Relationships In a RDBS, tables are related through relationships. Relationships may be one-to-one, one-to-many, many-to-many. One-to-many should be the most common. One-to-One: One item in Table A applies to one item in Table B (demographics table – dna table) One-to-Many: One item in Table A applies to many items in Table B (gender table – demographics table) Many-to-Many: Many records in table A relates to many records in Table B (avoid these) Strive for one-to-many relationships – PK/FK

Relational Database Concepts - Normalization Series of rules developed by E.F. Codd (IBM) in 1970s – integral to relational database model First Normal Form: each column must contain only one value (atomic, discrete data storage) Second Normal Form: 1N + any column in a table that is not a key has to relate only to the primary key Third Normal Form: 2N + every non-key column is independent of every other non-key column

Relational Database Concepts - Normalization – First Normal Form Each column (field) must contain only one value: Identify any field that contains multiple pieces of information (ex address) Break up problem fields into separate fields (address1, city, state, zip)

Relational Database Concepts - Normalization – Second Normal Form 1N + any non-key column independent of every other non-key Identify any fields that do not relate directly to the primary key. Create new tables accordingly Assign or create new primary keys Create requisite foreign keys indicating relationships

Relational Database Concepts - Normalization – Third Normal Form 2N + any non-key column independent of every other non-key Within a table, test to see whether any non-key field determines the value of another non-key field

Relational Database Concepts - Table Design and Normalization Strategy Eliminate redundancy Think about units – this will help with 1NF atomicity Strive for one field primary key – use autonumbers if needed Think first about the most important data table (most important measurements), then work out from there to normalize Think about questions you’ll be asking from your data – then think about how your table structure may be combined to answer Avoid many to many relationships – one to many relationships are cleaner and avoid problems in long run Don’t be afraid to break a normalization rule if it is silly for your application Work out on paper first, then mock-up with MS-Access and test answering business questions with query-builds linking tables

Fields – Common Types Text - Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. – Up to 255 characters Memo - Lengthy text or combinations of text and numbers - Up to 65,535 characters. Number - Numeric data used in mathematical calculations. Date/Time - Date and time values for the years 100 through 9999 AutoNumber - A unique sequential (incremented by 1) number or random number assigned by Microsoft Access whenever a new record is added to a table. AutoNumber fields can't be updated. Yes/No - Yes and No values and fields that contain only one of two values (Yes/No, True/False, or On/Off). OLE Object - An object (such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, sounds, or other binary data) linked to or embedded in a Microsoft Access table. Demo?

Referential Integrity Referential integrity is a system of rules that Microsoft Access uses to ensure that relationships between records in related tables are valid, and that you don't accidentally delete or change related data. (from MS-Help) Ensures data validity between tables is upheld Cascade Update Cascade Delete

Summary – Paul’s Laws Think about the entire project and design tables (1st Cut) before touching keyboard Formulate data questions to determine best table scheme (How many people took drug A and gender = F and …). Leave wiggle room. Spend time normalizing, but don’t turn a 2-day project into a 2-month project. You’re not E-Bay – you can get by with less than perfect performance as long as you can answer your questions and the application is flexible for growth. Think about central table and questions first - then work outwards to define adjunct tables. Design enough tables to make things work, but don’t go overboard. I usually try to get by with as few as possible while remaining true to the spirit of normalization. Strive to store data once – don’t store calculations.

Where to Get More Information Most database books have one chapter on table design and normalization -- I like the Visual QuickPro Guide series of technical help books Google search for ‘database normalization tutorial’