© Copyright 2002, L. M. Linson, may be freely used with this notice Practical Database Design “Structuring Your Tables” by Larry Linson, presented to the.

Slides:



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

Microsoft® Access® 2010 Training
Microsoft ® Access ® 2010 Training Design the tables for a new database.
CHAPTER OBJECTIVE: NORMALIZATION THE SNOWFLAKE SCHEMA.
MICROSOFT OFFICE ACCESS 2007.
Microsoft Excel Working with Excel Lists, Subtotals and Pivot Tables.
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.
DATABASE APPLICATION DEVELOPMENT SAK 3408 Database Design II (week 3)
Database table design Single table vs. multiple tables Sen Zhang.
Normalization Queries (contd)
From Class Diagrams to Databases. So far we have considered “objects” Objects have attributes Objects have operations Attributes are the things you record.
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
Database Software Application
Database Normalization CP3410 Daryle Niedermayer, I.S.P., PMP.
MIS2502: Data Analytics Relational Data Modeling
Chapter 6 Data Flow Diagramming Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved.McGraw-Hill/Irwin.
Basics of Good Documentation Document Control Systems
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.
Copyright © 2016 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education.
Database Tables two order-entry scenarios: A customer wants to cancel an order that she's placed. If her address is in a separate table from her.
No, Thanks, I’ll Use a Spreadsheet
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,
Microsoft Access Understanding Relationships Academic Health Center Training (352)
BUS1MIS Management Information Systems Semester 1, 2012 Access: Creating a Database Week 6 Lecture 2.
NTPCUG Microsoft Access SIG Oct. 15, 2011 Moving Data In and Out of Microsoft Access A Presentation for the Microsoft Access SIG of the North Texas PC.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Microsoft ® Office Access ® 2007 Training Build a database I: Design tables for a new Access database ICT Staff Development presents:
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
CORE 2: Information systems and Databases NORMALISING DATABASES.
CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just.
Customer Order Order Number Date Cust ID Last Name First Name State Amount Tax Rate Product 1 ID Product 1 Description Product 1 Quantity Product 2 ID.
© Copyright 2002, 2005, 2013 L. M. Linson, may be freely used with this notice Practical Database Design “Structuring Your Tables” by Larry Linson, presented.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
Database Beginnings. Scenario so far In our scenario we have people registering for training sessions. –The data about the training sessions was placed.
DATABASE What exactly is a database How do databases work? What's the difference between a spreadsheet database and a "real" database?
MS Access. Access is a DBMS/RDMS DBMS = Database Management System RDMS = Relational Database Management System.
HSC IT Center Training University of Florida Microsoft Access Understanding Relationships Health Science Center IT Center – Training
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Reports. Report Summary Warehouse Reports Returned Material Serial Numbers Not Found This report list the serial numbers of material returned which were.
Lecturer: Gareth Jones Class 6: Routine Business Messages.
Database Design. The process of developing database structures from user requirements for data a structured methodology Structured Methodology - a number.
MIS2502: Data Analytics Relational Data Modeling
RELATIONAL DATA MODELING MIS2502 Data Analytics. What is a model? Representation of something in the real world.
* Database is a group of related objects * Objects can be Tables, Forms, Queries or Reports * All data reside in Tables * A Row in a Table is a record.
Logical Database Design and the Relational Model.
Sample Table Standard Notation Entity name in uppercase
MIS2502: Data Analytics Relational Data Modeling David Schuff
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Lecture 4: Logical Database Design and the Relational Model 1.
Database Planning Database Design Normalization.
MS Access. Most A2 projects use MS Access Has sufficient depth to support a significant project. Relational Databases. Fairly easy to develop a good user.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
2b. Create an Access Database Lingma Acheson Department of Computer and Information Science IUPUI CSCI N207 Data Analysis with Spreadsheets 1.
IT Business Applications
MIS2502: Data Analytics Relational Data Modeling
and Defining Table Relationships
Database Normalization
MIS5101: Business Intelligence Relational Data Modeling
MIS2502: Data Analytics Relational Data Modeling
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Other Special Features of SimPOS! Retail Point of Sale.
Advanced Database Concepts: Reports & Views
MIS2502: Data Analytics Relational Data Modeling
Microsoft Access Date.
Presentation transcript:

© Copyright 2002, L. M. Linson, may be freely used with this notice Practical Database Design “Structuring Your Tables” by Larry Linson, presented to the Microsoft Access SIG of the North Texas PC User Group January 12, 2002

© Copyright 2002, L. M. Linson, may be freely used with this notice Purpose Laying out or structuring tables –in an Access (or other relational) database Without formal data modeling Without becoming a relational database expert Accomplishing results with –common sense –intuition

© Copyright 2002, L. M. Linson, may be freely used with this notice “Relational” “Relation” = Table – Rows (“Tuples”)and – Columns (“Attribute”) Scalar means one value per … Not from “Relationships” – between Tables

© Copyright 2002, L. M. Linson, may be freely used with this notice Heading of a Relation Label for each attribute Name : Domain Name identifies Domain = kind of data (not the data type)

© Copyright 2002, L. M. Linson, may be freely used with this notice First Normal Form If domains are scalar – one item of information per attribute – some questionable, e.g., dates clearly consist of parts depends on problem space do you need to use the parts?

© Copyright 2002, L. M. Linson, may be freely used with this notice Second Normal Form In First Normal Form and If all attributes dependent on the primary key – no “extraneous” information – Invoice Invoice Number Supplier Name Supplier Phone Item Price

© Copyright 2002, L. M. Linson, may be freely used with this notice Third Normal Form... In Second Normal Form and If all attributes are mutually independent – violation example, If one Sales Rep per State – Order Order ID Sales Rep State Customer ID

© Copyright 2002, L. M. Linson, may be freely used with this notice Third Normal Form In practical terms, as far as we usually go, and sometimes useful to violate continued from previous slide

© Copyright 2002, L. M. Linson, may be freely used with this notice There must be only one authoritative source for any item of information.

© Copyright 2002, L. M. Linson, may be freely used with this notice

and it will force you into a structured, usable file design

© Copyright 2002, L. M. Linson, may be freely used with this notice Avoid: Redundancy … A BAD IDEA – Wastes resources – Makes life harder because – You have to store multiple copies – Which is correct?

© Copyright 2002, L. M. Linson, may be freely used with this notice Avoid: Redundancy … Even worse if – in two or more tables because – not only how many records to change – but how many places to look for it

© Copyright 2002, L. M. Linson, may be freely used with this notice Avoid: Composite Fields Concatenating is easy – [Title] &[First] & [Mid] & [Last] & [Suf] Extracting isn’t so easy – “Umm? How?” he pondered, scratching his head and staring

© Copyright 2002, L. M. Linson, may be freely used with this notice Avoid: Repeated Fields One record w/ repeat – [Student] – [Period 1 Class] – [Period 2 Class] –... – [Period 6 Class] Which students study biology?

© Copyright 2002, L. M. Linson, may be freely used with this notice Our Example... A friend, client, or employer says, –“Our order-taking process is a little clumsy. I’d like you to create a database to smooth it out and make it quicker for the sales people.”

© Copyright 2002, L. M. Linson, may be freely used with this notice Our Example... You ask, –“What, exactly, do you want in that database?” continued from previous slide

© Copyright 2002, L. M. Linson, may be freely used with this notice Our Example Friend, client, employer responds, –“Here’s one of our order forms. Too, I’d like to keep track of the product training courses our sales people have to take. Please make a prototype to suggest what I need.” continued from previous slide

© Copyright 2002, L. M. Linson, may be freely used with this notice An Order Customer Name and Number Bill-To Address Ship-To Address Quantity, Product, Price, Extended Price... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total

© Copyright 2002, L. M. Linson, may be freely used with this notice Better than we might expect Suggests the information Seems to group the information, too Natural and intuitive –Sales staff used to it –Likely refined over years Try using it to group the information –Then make tables for each group

© Copyright 2002, L. M. Linson, may be freely used with this notice Not Just “Order Information” Customer Name and Number Bill-To Address Ship-To Address Quantity, Product, Price, Extended Price... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total

© Copyright 2002, L. M. Linson, may be freely used with this notice Some “Customer” Info Customer Name and Number Bill-To Address Ship-To Address Quantity, Product, Price, Extended Price... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total

© Copyright 2002, L. M. Linson, may be freely used with this notice Some “Salesperson” Info Customer Name and Number Bill-To Address Ship-To Address Quantity, Product, Price, Extended Price... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total

© Copyright 2002, L. M. Linson, may be freely used with this notice Repeated “Detail” Info Customer Name and Number Bill-To Address Ship-To Address Quantity, Product, Price, Extended Price... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total

© Copyright 2002, L. M. Linson, may be freely used with this notice Some Product Info Customer Name and Number Bill-To Address Ship-To Address Quantity... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total Extended PriceProduct, Price

© Copyright 2002, L. M. Linson, may be freely used with this notice And the rest is “Order Info” Customer Name and Number Bill-To Address Ship-To Address Quantity... Order Number, Date Ship Method & Date Salesperson Subtotal, Tax, Shipping, Total Extended PriceProduct, Price

© Copyright 2002, L. M. Linson, may be freely used with this notice Grouping by Intuition Salespeople Customers Orders Order Details Products

© Copyright 2002, L. M. Linson, may be freely used with this notice Adding the Training Salespeople Customers Orders Order Details Products Training

© Copyright 2002, L. M. Linson, may be freely used with this notice Sales Database Information – The Intuitive Approach Salespeople sell products to customers Customers purchase products Orders record a customer purchase Order Details show products, quantities Products are what is sold, with price Training (Product information) for Salespeople

© Copyright 2002, L. M. Linson, may be freely used with this notice Try Laying Out Tables Customers Products Order Details Orders Salespeople Training

© Copyright 2002, L. M. Linson, may be freely used with this notice Rearrange by Relationship Customers Products Orders Salespeople Training (use real-world relationships) There’s a customer for every order There’s a salesperson for every order Order Details

© Copyright 2002, L. M. Linson, may be freely used with this notice Continue Rearranging Customers Products Orders Salespeople Training A customer can have many orders A salesperson can have many orders Order Details

© Copyright 2002, L. M. Linson, may be freely used with this notice Continue Rearranging Customers Products Order Details Orders Salespeople Training An order can have many order details

© Copyright 2002, L. M. Linson, may be freely used with this notice Continue Rearranging Customers Products Order Details Orders Salespeople Training A product can be in many order details

© Copyright 2002, L. M. Linson, may be freely used with this notice Continue Rearranging Customers Products Order Details Orders Salespeople Training A salesperson can take many training classes

© Copyright 2002, L. M. Linson, may be freely used with this notice Did We Forget Something? Customers Products Order Details Orders Salespeople Training Many salespeople can be in a training class Maybe! Depends on what we may need to do.

© Copyright 2002, L. M. Linson, may be freely used with this notice Did We Forget Something? Customers Products Order Details Orders Salespeople Training Many salespeople can have taken a training class or many can be in a session of a class. No, let’s revise that statement:

© Copyright 2002, L. M. Linson, may be freely used with this notice Did We Forget Something? Customers Products Order Details Orders Salespeople Training Many salespeople can have taken a training class or many can be in a session of a class. If the first, then we have a many-to-many

© Copyright 2002, L. M. Linson, may be freely used with this notice Did We Forget Something? Customers Products Order Details Orders Salespeople Training If we have a many-to-many, to implement we need a junction or intersection table Junction

© Copyright 2002, L. M. Linson, may be freely used with this notice Did We Forget Something? Customers Products Order Details Orders Salespeople Training Many salespeople can have taken a training class or many can be in a session of a class. If our data model requires the second, then we need another table for sessions.

© Copyright 2002, L. M. Linson, may be freely used with this notice How Many Levels Take to as many levels of detail –as you need to represent what you need to “model” A database is merely a model –of the real world –detailed enough to satisfy the needs and deal with the business “issue” –we don’t have “problems” any more, only “issues” –or, perhaps, “opportunities”

© Copyright 2002, L. M. Linson, may be freely used with this notice How Many Levels? Einstein is supposed to have said, “As simple as possible, but no simpler.” Too simple, and you don’t satisfy the purpose Not simple enough, it will be “cumber- some” and you have to work too hard to satisfy the purpose

© Copyright 2002, L. M. Linson, may be freely used with this notice What did he say Look at what is needed You are “modeling” the real world Base on “real world” activity, data Organize for what you need Look for natural groupings Look for natural relationships Review with the user

© Copyright 2002, L. M. Linson, may be freely used with this notice Thank you for your kind attention Please, gently wake your neighbor before leaving Come again when you can

© Copyright 2002, L. M. Linson, may be freely used with this notice Practical Database Design “Structuring Your Tables” The End