Week 2 Normalization and Queries

Slides:



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

© 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 10 – Designing.
Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
The University of Akron Dept of Business Technology Computer Information Systems The Relational Model: Query-By-Example (QBE) 2440: 180 Database Concepts.
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 A collection of related information stored on a computer and organized in a manner that allows access, retrieval, and use of that data.
© Steven Alter, 2007, all rights reserved Database concepts Difference between a database and the Internet Reason for having a defined data structure Relational.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Normalization Queries (contd)
ISP 121 Week 1 Introduction to Databases. ISP 121, Winter Why a database and not a spreadsheet? You have too many separate files or too much data.
Database Basics. Definitions Database Relational database Table Record Field Primary key.
Chapter 2 Querying a Database
LSP 121 Week 2 Normalization and Queries. Normalization The Old Car Club database presented a problem – what if one person owns multiple cars? (One owner.
Data Types and Field Properties 5.01 Understand database tables used in business.
Access 2007 ® Use Databases How can Access help you to find and use information?
Database Structure Basics National Center for Immunization & Respiratory Diseases Influenza Division Pam Kennedy Analyst, McKing Consulting Regional Training.
1 AQA ICT AS Level © Nelson Thornes Types of data.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Concepts of Database Management, Fifth Edition
Tables. What is a Table? A part of a database Container for data Pieces of data, put together, have a meaning.
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
LSP 121 Week 2 Normalization and Advanced Queries.
Relational databases and third normal form As always click on speaker notes under view when executing to get more information!
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
 A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. What is Database?
 Continue queries ◦ You completed two tutorials with step-by-step instructions for creating queries in MS Access. ◦ Now must apply knowledge and skills.
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.
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.
Microsoft ® Access ® 2010 Training Create Queries for a New Database If a yellow security bar appears at the top of the screen in PowerPoint, click Enable.
Concepts of Database Management Seventh Edition
DAY 22: MICROSOFT ACCESS – REVIEW Akhila Kondai November 04, 2013.
 Agenda 2/20/13 o Review quiz, answer questions o Review database design exercises from 2/13 o Create relationships through “Lookup tables” o Discuss.
Database Systems Microsoft Access Practical #3 Queries Nos 215.
Using Microsoft Access 56:150 Information System Design.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Microsoft Office Illustrated Introductory, Premium Edition Using Tables and Queries.
® Microsoft Office 2013 Access Creating a Database.
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.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Reports and Queries Chapter 3 – Access text Reports – Page Queries – Page
What are queries? Queries are a way of searching for and compiling data from one or more tables. Running a query is like asking a detailed question of.
Introduction to a Database Defining a database Database window in Access The six items in window: Tables, Queries Forms, Reports, Macros, Modules.
You can sort Access data so you can view records in the order you want to view them, and you can filter data so you only see the records you want to see.
Introduction to Access Chapter 13 pages 1-4. What is a database??? Related information is stored in databases  All SC student information is stored in.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Database design Using Access 2007
* 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.
Part 1.  To answer the question “what is a database?”  To understand the basic components of a database and start to plan/create our own.
Lesson 4: Querying a Database. 2 Learning Objectives After studying this lesson, you will be able to:  Create, save, and run select queries  Set query.
Access Lesson 10 Adding Advanced Features to Reports Microsoft Office 2010 Advanced Cable / Morrison 1.
1 Chapter 3 Single Table Queries. 2 Simple Queries Query - a question represented in a way that the DBMS can understand Basic format SELECT-FROM Optional.
Access Queries and Forms. Adding a New Field  To insert a field after you have saved your table, open Access, and open the table  It is easier to add.
ACCESS LESSON 1 DATABASE BASICS VOCABULARY. BACKSTAGE VIEW A menu of options and commands that allows you to access various screens to perform common.
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.
Access Lessons 1, 2 and 3 ©2009 M and K Solutions, LLC – All Rights Reserved.
Computer Science & Engineering 2111 Inner Joins and Advanced Queries 1CSE 2111 Lecture-Advanced Queries.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Access Queries and Forms. Access Queries Simple Queries  To create an Access query, don’t use the query wizard. Instead, create query in Design view.
Relational Databases Today we will look at: Different ways of searching a database Creating queries Aggregate Queries More complex queries involving different.
Week 1 Intro to the Course Intro to Databases.  Formerly ISP 121  “Continuation” of LSP 120 concepts  Topics include: ◦ Databases ◦ Basic statistics.
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
GO! with Microsoft® Access e
Access Tutorial 5 Creating Advanced Queries and Enhancing Table Design
Nagendra Vemulapalli Exam2 Overview Nagendra Vemulapalli
Presentation transcript:

Week 2 Normalization and Queries ISP 121 Week 2 Normalization and Queries

Normalization The Old Car Club database presented a problem – what if one person owns multiple cars? (One owner can have many cars, so this is 1:M relationship) Create a separate table for just the cars How do you link the two tables together?

Normalization Example Car Club (originally) Member Name Member Address Member City Member State Member Zip Member Phone Dues Paid? National Member? Car Owned (repeats 1-n times) Model of Car Make of Car Year of Car Member ID (primary key) Member Table Name Address City State Zip Phone Dues Paid? National Member? Member ID Car Table Model of Car Make of Car Year of Car Member ID (not a primary key here!) Relationship Primary Key in Member Table? Foreign Key in Car Table? 1:M

Another Example Student Records Student ID (primary key) Student Info Name Address City State Zip Phone Class Taken (repeats 1-n times) Class Name Grade Number Credits Major Minor Degree Sought Student Info Student ID Name Address City State Zip Phone Major Minor Degree Sought Grades Class Name Grade Number Credits Student ID After Let’s enter this one into Access and create a few records of data. Before

Why Relational? Eliminates redundancy Makes adding data easier Allows for more secure access to only parts of the data

Simple Queries To create an Access query, don’t use the query wizard. Instead, create query in Design view Let’s see how Access does it

Queries You can look for something after a certain date IF the data was stored as date/time and you say >1/1/2004 Dates should be entered with # before and after the date, and can be in many different formats, ie #1/1/2004#, #January 1, 2004#, #1-Jan-2004#

Queries Logical OR - You can look for records in the state of Indiana or Illinois by saying “IL” OR “IN” You can also say: In (“IL”, “IN”, “OH”) Logical AND - you can make multiple entries in the query boxes. For example, in the State field enter “IL” and then in the Size field enter <3

Queries Logical AND - You can also use an AND in one field. For example, in the Size field you can enter >=3 AND <=9 A slightly easier way of doing this is using the BETWEEN operator: Between 3 and 9

Parameter Query What if you are looking for a person’s name in a database, but you don’t know the name until you run the query? Use the built in parameter query Form your query as usual, but in the Criteria box enter a prompt between square braces: [Enter your prompt here]

Queries That Calculate When performing a query, you can aggregate the data You can perform a Count, Sum, Avg, Max, Min, StDev, Var(iance), First, and Last Count, First, and Last can be performed on types counter, number, currency, date/time, yes/no, text, memo, and OLE object The others on counter, number, currency, date/time, and yes/no

Heights and weights database Let’s look at a database of human heights and weights. We’ll perform queries that aggregate data, that is, queries that compute such things as counts, averages, minimum values, and maximum values. We’ll also group records.