Chapter 16 HAI! Adventure Database: Case Study in Database Design.

Slides:



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

Chapter 15 A Table with a View: Database Queries.
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Module 2 Designing a Logical Database Model. Module Overview Guidelines for Building a Logical Database Model Planning for OLTP Activity Evaluating Logical.
Analyzing Systems Using Data Dictionaries Systems Analysis and Design, 7e Kendall & Kendall 8 © 2008 Pearson Prentice Hall.
3/5/2009Computer systems1 Analyzing System Using Data Dictionaries Computer System: 1. Data Dictionary 2. Data Dictionary Categories 3. Creating Data Dictionary.
Exploring Microsoft Access 2003 Chapter 6 Many-to-Many Relationships: A More Complex System.
By Mary Anne Poatsy, Keith Mulbery, Eric Cameron, Jason Davidson, Rebecca Lawson, Linda Lau, Jerri Williams Chapter 5 Data Validation and Data Analysis.
Chapter 14 Getting to First Base: Introduction to Database Concepts.
A Guide to SQL, Seventh Edition. Objectives Understand the concepts and terminology associated with relational databases Create and run SQL commands in.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
Mgt 20600: IT Management & Applications Databases Tuesday April 4, 2006.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Lesson 32: Designing a Relational Database. 2 Lesson Objectives After studying this lesson, you will be able to:  Identify and apply principles for good.
Chapter 15 Introduction to Database Concepts. Copyright © 2013 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Learning Objectives Explain.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
DATA, DATABASES, AND QUERIES Managing Data in Relational Databases CS1100Microsoft Access - Introduction1 Created By Martin Schedlbauer
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
Copyright © 2003 by Prentice Hall Module 4 Database Management Systems 1.What is a database? Data hierarchy and data organization Field, record, file,
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 13 Database Management Systems: Getting Data Together.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Concepts of Database Management, Fifth Edition Chapter 1: Introduction to Database Management.
DATABASE DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Copyright © 2011 Pearson Education Analyzing Systems Using Data Dictionaries Systems Analysis and Design, 8e Kendall & Kendall Global Edition 8.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Created by, Author Name, School Name—State FLUENCY WITH INFORMATION TECNOLOGY Skills, Concepts, and Capabilities.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Analyzing Systems Using Data Dictionaries Systems Analysis and Design, 8e Kendall.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Database Management Systems.  Database management system (DBMS)  Store large collections of data  Organize the data  Becomes a data storage system.
Fanny Widadie, S.P, M.Agr 1 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.
1 CSE 2337 Introduction to Data Management Textbook: Chapter 1.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Database Management Systems (DBMS)
Intro to Databases Vocabulary Copyright © Texas Education Agency, All rights reserved.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Database design Using Access 2007
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 7 Storing Organizational Information - Databases.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Address Book Application Introducing Database Programming.
CSCI 6962: Server-side Design and Programming Shopping Carts and Databases.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
1 Management Information Systems M Agung Ali Fikri, SE. MM.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
Microsoft Office Access 2010 Lab 1
CIS 336 AID Your Dreams Our Mission/cis336aid.com
A Table with a View: Database Queries
Information Systems Database Management
Getting to First Base: Introduction to Database Concepts
A Table with a View: Database Queries
Advanced Database Concepts: Reports & Views
DATABASES WHAT IS A DATABASE?
INFO/CSE 100, Spring 2006 Fluency in Information Technology
Getting to First Base: Introduction to Database Concepts
Getting to First Base: Introduction to Database Concepts
A Table with a View: Database Queries
Presentation transcript:

Chapter 16 HAI! Adventure Database: Case Study in Database Design

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Strategy for Building a Database Perform a needs analysis –How the database will be used, kinds of data input, kinds of information output Approximate and Revise a Physical Design Implement the Physical Design Design the Logical Database Implement the Logical Database Implement the GUIs Evaluate usefulness and (possibly) revise

Copyright © 2006 Pearson Addison-Wesley. All rights reserved The HAI! Adventure Businesses Business will have shops at resort locations around the world Each shop will offer equipment for a single activity Company will run organized lessons and tours Database design is for rentals and activities only

Copyright © 2006 Pearson Addison-Wesley. All rights reserved The HAI! Adventure Businesses First business is Snow Machine Ski Rental Customer proceeds through stages: –Selection. Customer gives receptionist name, address, contact info –Fitting. Specialist gets weight and ability level information to set ski bindings. Equipment ID numbers are recorded; equipment settings are recorded; gear is given to customer –Payment. Customer signs rental agreement and pays

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Perform a Needs Analysis What information is created and what information is needed to transact the business Created: –personal information on customer –technical information on equipment Needed: –Content of rental agreement (association of customer's personal data with equipment's technical data)

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Needs Analysis (cont'd) Specifically, contract must contain customer's name, address, phone If customer returns, this info will be repeated (redundancy) Need a table of customers (Clients) Need a table for adventure specialists (ASTeam) Rentals table records date, equipment, adjustments, any special information Table now has three tables: –Clients has relationship with Rentals –ASTeam has relationship with Rentals

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Approximate/Revise the DB Design Specify the Clients Table –Customer ID –First –Middle –Last –Birthdate –Street –City –State –ZIP –Country –Home_Phone –Mobile_Phone – –Local_Contact

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Approximate/Revise the DB Design (cont'd) Specify the ASTeam Table –Nickname –First –Middle –Last –Birthdate –SS_Number –Mobil_Phone – –Certified –Cert_Expire –Cert_Detail

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Approximate/Revise the DB Design (cont'd) Employee contact schema –Same schema can be used to set up AS_Home (for permanent employee addresses) and AS_Local (for local employee addresses)

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Approximate/Revise the DB Design (cont'd) Specify the Rentals Table –Customer table key –Specialists table key –The rest of the necessary information about the rental event –Dependencies: Field for Ski? (Y/N) determines if the transaction is for skis and bindings If it is Y, then Weight, Ability, and Settings fields must be filled in These constraints will be enforced in the implementation

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Approximate/Revise the DB Design (cont'd) Specify the Relationships –One-to-Many Relationships Rents, Clients:Rentals relationship Serves, ASTeam:Rentals relationship Home_Of: AS_Home:ASTeam relationship Sleeps_At: AS_Local:ASTeam relationship

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Revise the Physical Design? Assess the table organization and see how well it fulfills the needs of Snow Machine The database has little redundancy, but how well will it work when the business expands to other sports? Details of equipment rented could be moved to a separate table

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Revise the Physical Design? (cont'd) Ensure Unique Fields –Add shop ID number field Introduce New Relationship –By creating new table (Gear) for specific equipment rented, we created a many-to-one relationship between the two

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Implement the Physical DB Design Define the Tables Define the Relationships

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Design the Logical Database To give users views of the database: –Analyze the business activity to identify the information inputs and outputs –Determine what information the specialists need from each view, and where it is stored in the tables –Define a conceptual query for a new table as a join-then-trim process from existing tables –Implement the conceptual query in SQL –Define a GUI to display the information for the specialists

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Design the Logical Database (cont'd) Three customer-related views: –Sign-in: Receptionist establishes new rental and enters data about customer into Clients table –Fitting: In fitting room, specialist enters own name into Rentals table and equipment into Gears table –Agreement:Customer takes gear back to receptionist to sign and pay. Price is entered. Information in Clients, Gear, ASTeam, Rentals tables must be combined into contract and printed Employee-related view: –Hiring. New hiring, employee's information entered into three tables: ASTeam, AS_Home, AS_Local

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Analyze the Tables for the Views Logical Tables computed by queries –Sign-in: Requires Rental_ID and Customer fields from Rentals table; ASTeamer field; all fields of Clients table; Ski? field from Gear table –Fitting: All fields from Gear; Rental_ID and ASTeamer fields from Rentals table; First and Last fields from Clients table –Agreement: All fields from Rentals table; all fields from Clients (except and Local_Contact); and Gear and specialist's name field from ASTeam field –Hiring: All fields from ASTeam, AS_Home and AS_Local

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Create the View Queries Views will be created using queries –Combine the base tables into a super table and then retrieve the items needed for the view Sign-in Query: –Begins a rental (establishes a new Rentals row) –Needs Rental_ID and Customer.ASTeamer from Rentals table; all the fields from Clients table, and Ski? field from Gear table

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Create the View Queries Fitting Query: –Needs Rental_ID, ASTeamer, and Customer fields from Rentals table; all fields from Gear table Agreement Query: –All fields from first three tables except Clients. and Clients.Local_Contract; and name field from ASTeam Hiring Query: –All the fields from the three tables: ASTeam, AS_Home, AS_Local

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Implement the Logical Database Design Encode the Hiring Query –Simply the join of three tables Conceptual natural join produces table with all fields, but SQL is necessary to specify which fields should be included (SELECT…FROM) Operator is INNER JOIN Give equality test that is the basis for the INNER JOIN All references to fields use the table name.field name syntax

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Implement the Logical Database Design (cont'd) Encode the Sign-in Query and the Fitting Query –Follow the same guidelines Encode the Agreement Query –Uses all fields (but two) of three tables, and only three fields of the other, so the SQL is not conceptually difficult

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Implementing The GUIs To make data entry friendlier Guidelines –Arrange information sensibly Cluster related fields, orient in expected ways –Avoid Clutter Eliminate duplicate fields, avoid unnecessary text, lines, and visual effect –Preload fields Fill a field with a default value or expected format (like DD/MM/YYYY)

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Extending a DB: Lessons and Tours Consider what changes are needed to move into the lessons and tours business An Analogy: –Think about organizing table as a class list –Each group has a leader and a set of participants –Problems: Data that should be independent is bound— student list should not be ordered

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved The Activities Table Improved design: Create an entity that includes the common features and properties of the lessons and tours (scheduled activity) Fields: –Activity_ID –Date –Leader –Description –Limit (on number of participants) All activities look alike in the database because the nature of the activity is specified in the description field

Copyright © 2006 Pearson Addison-Wesley. All rights reserved The Apply Table How will we create a participants table? Use the concept of registration to bind Clients and Activities Like Rentals, but without the equipment table Fields: –Shop_ID; Regist_ID; Date; Activity; Participant; Skill; Payment If a person registered for more than one activity, he or she has more than one row in Apply table, independent

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Establish Relationships between Tables Creating the Activities and Apply tables for the physical database naturally defines some relationships –Leads, the ASTeam:Activities relationship –Offers, the Activities:Apply relationship –Registers_For, the Clients:Apply relationship All one-to-many relationships

Copyright © 2006 Pearson Addison-Wesley. All rights reserved Establish Relationships between Tables (cont'd) Create the participants list: –Join Activities, Apply, and Customers tables, and extract necessary fields All fields from Activities; participants' names from Clients. Apply is only used for associating Activities table entries to Clients table entries

Copyright © 2006 Pearson Addison-Wesley. All rights reserved A Class List Report Attends_Q query will create a table of all the students who signed up for all the classes To create a list for one class, or one day –Use Activity_ID or Date to select necessary rows from Attends_Q table –Just add a WHERE clause to Attends_Q query that saves only those rows that meet the criterion

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved

Copyright © 2006 Pearson Addison-Wesley. All rights reserved