CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just.

Slides:



Advertisements
Similar presentations
Database Relationships in Access As you recall, the data in a database is stored in tables. In a relational database like Access, you can have multiple.
Advertisements

Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
The Ribbon Standard to all Office 2007 applications Organized by feature and functionality Navigation Pane Access to all objects in the current database.
Tutorial 3 Queries and Table Relationships
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.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 3 1 Microsoft Office Access 2003 Tutorial 3 – Querying a Database.
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
Querying a Database Microsoft Office Access 2003.
FIRST COURSE Access Tutorial 2 Building a Database and Defining Table Relationships.
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Relational Databases What is a relational database? What would we use one for? What do they look like? How can we describe them? How can you create one?
MS Access 2007 IT User Services - University of Delaware.
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.
Page 1 ISMT E-120 Desktop Applications for Managers Introduction to Microsoft Access.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
2.3 Organising Data for Effective Retrieval
1 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Introduction to Databases. Overview  What is a Database?  What is a Database Management System?  How is information organized in a database?  What.
Introduction –All information systems create, read, update and delete data. This data is stored in files and databases. Files are collections of similar.
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,
24 GOLDEN COINS, 1 IS FAKE ( WEIGHS LESS). DATABASE CONCEPTS Ahmad, Mohammad J. CS 101.
Chapter 1 Overview of Database Concepts Oracle 10g: SQL
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
IE 423 – Design of Decision Support Systems Data modeling and database development.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
DATABASE DESIGN USING MICROSOFT ACCESS. What is a Database?  DMS Database management system  Database Collection of data organized in a manner that.
Lecture 2 An Overview of Relational Database IST 318 – DB Admin.
CS 101 – Nov. 9 Text software issues (continued) –Readability –Fonts Database concepts –Relationships –Queries.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Relational Databases (MS Access)
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Chapter 5 Database Processing. Neil uses software to query a database, but it has about 25 standard queries that don’t give him all he needs. He imports.
Access Chapter 2: Relational Database Objectives Design data Create tables Understand table relationships Understand data types, key, & field properties.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
CS1100: Data, Databases, Queries Action Queries CS11001Advanced Queries.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
SESSION 3.1 This section covers using the query window in design view to create a query and sorting & filtering data while in a datasheet view. Microsoft.
Part II. Query Types On the design query table pane, right click and the cascading window will appear.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
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.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
INFORMATION TECHNOLOGY DATABASE MANAGEMENT. Adding a new field 1Right click the table name and select design view 2Type the field information at the end.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
CHAPTER 1 – INTRODUCTION TO ACCESS Aliya Farheen March 5, 2014.
Access Chapter 1: Intro to Access Objectives Navigate among objects in Access database Difference between working in storage and memory Good database file.
1 CHƯƠNG 4 Creating Relational Databases Understanding Table Relationships Example: This database tracks customers and their orders in two separate.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
1 ER Modeling BUAD/American University Mapping ER modeling to Relationships.
(SQL - Structured Query Language)
CS 101 – Nov. 11 Finish Database concepts –1-1 relationship –1-many relationship –Many-to-many relationship Review.
Database design Using Access 2007
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Test Review “Exam 1: Prof. McIntosh” Computer Resource Center REACH
Microsoft Access Lesson 5 Lexington Technology Center February 25, 2003 Bob Herring On the Web at
Database Relationships Objective 5.01 Understand database tables used in business.
Test Review “Exam 2: Prof. Reinhardt” Computer Resource Center REACH
DAY 14: ACCESS CHAPTER 1 RAHUL KAVI October 8,
XP Chapter 1 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Level 2 Objectives: Understanding and Creating Table.
Prepared By: Bobby Wan Microsoft Access Prepared By: Bobby Wan
Introduction to Access
Presentation transcript:

CS 101 – Access notes Databases (Microsoft Access) 4 parts of a database database design –Try to understand the ideas behind database design, not just the mechanics.

Access vs. Excel Excel emphasizes numbers Access emphasizes relationships some overlap Access is perfect for finding common info from 2 separate tables

Purpose of Access It’s a “database management system” Record keeping for a business –Requires a plan –one file, with many components Keep track of … so that: –Find cross-references –Generate reports

Database format Usually four parts: Tables (at least 1 is required) Queries Forms Reports

Navigating a table A database table looks like a spreadsheet! Record = row Field = column Two ways to view: –Design view, to start –Datasheet view, to enter data Primary Key!

Example questions In a stock portfolio: –Which stocks have lost money? –When did I buy those stocks? Which class is easier: CS 22 or CS 25? –Check grades in each class –Check grades for students who’ve taken both Among customers who bought a new generator last year, what have they bought since?

Relieve tedium Suppose we want to maintain info on orders. Better to have two tables than one! Order#NameCityStateProductQty. 101J. MillerMiamiFLLaptop5 102G. NovakTampaFLPrinter3 103G. NovakTampaFLDVD-RW50 104G. NovakTampaFLKeyboard1 105J. MillerMiamiFLLamp4 106A. BikSan DiegoCAChair6 107T. LeeBuffaloNYFan3

Need multiple tables Ex. Librarian wants to contact graduating seniors who have overdue books. Need multiple tables: –Student info table Student #, name, year –Book table ISBN, title, author, … –Transaction or “check out” table Transaction #, ISBN, student #, Due date

Relationships When you have 2+ tables, there is almost always a relationship They share one field in common. –Can you tell what it is? Ex. Customers & Orders Ex. Students & Class roster Ex. Publishers & books

Animal hospital Keep track of customers, pets, visits Each gets its own table –What fields for each table? –Relationships What else does a database need?

Relationships

Fields in your table Anticipate questions –Age?  store birth date –GPA?  store credits and quality points –What year?  store date of admission Store data in its smallest parts (e.g. address) Calculated fields don’t belong in table!

Table review We want to “manage” information: –Organize, insert, delete, retrieve To organize we… –Create a table (or “set”, “class”) consisting of records (or “objects”) each having fields(or “attributes”) Usually we’ll want 2+ related tables.

Fields in your table Anticipate questions –Age?  store birth date –GPA?  store credits and quality points –What year?  store date of admission Store data in its smallest parts (e.g. address) Calculated fields don’t belong in table!

Queries Usually we ask about info from 2+ tables. By default, a query will perform an operation called a Cartesian Product, which gives all possible combinations. Ex. Name and City tables: Name Bob Mary Ken City Miami Pittsburgh

Cartesian Product Given 2 sets, find all possible ordered pairs. –Analogously for more than 2 sets. Great example: choosing a menu. –Appetizer –Entrée –Dessert Unfortunately, most DB queries are not like this! We get too many results.

Relationships We want to tell Access that there is a relationship between the tables, so we can create meaningful query. One-to-many is most common –“Each city has one or more employees.” –Now, query will return 3 results instead of 6: MiamiBob PittsburghMary Ken

One-to-One Can be useful if some information is confidential. What if we didn’t have any relationship? Empl #NamePosition 101SmithWelder 102Jonescarpenter Empl #Salary 10218, ,000

1-1 Query When you combine tables that have a 1-1 relationship: Access will look for fields that are the same, and use this as a filter. –In previous example, we’ll have 2 results instead of 4. Employee 101’s information Employee 102’s information –Let’s look at another example.

What happens when we “join” these 1-1 tables? First nameLast namePositionCity BobFulleraccountantChicago BobDanielscashierGreenville BobDanielsaccountantIndianapolis AliceAndrewsgardenerGreenville First nameLast nameSalaryBirthday BobDaniels51,0007/1/67 ElenaCarlson21,0009/1/89 AliceAndrews81,0008/1/78

FirstLastPositionCitySalaryBirthday BobDanielscashierGreenville51,0007/1/67 BobDanielsaccountantIndianapolis51,0007/1/67 AliceAndrewsgardenerGreenville81,0008/1/78 First nameLast namePositionCity BobFulleraccountantChicago BobDanielscashierGreenville BobDanielsaccountantIndianapolis AliceAndrewsgardenerGreenville First nameLast nameSalaryBirthday BobDaniels51,0007/1/67 ElenaCarlson21,0009/1/89 AliceAndrews81,0008/1/78

One-many Relationships Referential integrity –Keep related records consistent –Cascade delete: allow deletion of “one” –Cascade update: allow update of “one” For example, changing someone’s CustomerID.

Many-to-many Ex. Customers to products Implement as 2 one-to-one “Order details” table Think of possible queries based on the 5 tables given in handout.

Other queries Besides ordinary “select” queries: Total – special case: also do subtotals  Parameter – prompt user to tailor the result Action – modify underlying table –Make, delete from, append to, update Crosstab – 2-D subtotal –Ex. $, by species and month!