1 PROJECT 10 DATABASE QUERIES— TEXTBOOK DATABASE Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice.

Slides:



Advertisements
Similar presentations
Database Ed Milne. Theme An introduction to databases Using the Base component of LibreOffice LibreOffice.
Advertisements

INSERT BOOK COVER 1Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast,
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.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
With Microsoft ® Access 2010© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access.
Introduction to Databases CIS 5.2. Where would you find info about yourself stored in a computer? College Physician’s office Library Grocery Store Dentist’s.
QUERYING A DATABASE By: Dr.Ennis-Cole. OBJECTIVES: Learn how to use the Query window in Design view Create, run and Save queries Define a relationship.
Chapter 2 Querying a Database
Microsoft Access 2010 Chapter 7 Using SQL.
Access Tutorial 3 Maintaining and Querying a Database
Database Software Application
Software Development Unit 2 Databases What is a database? A collection of data organised in a manner that allows access, retrieval and use of that data.
Create Forms Lesson 5. Software Orientation Creating Forms A form is a database object –enter, edit, or display data from a table or query Providing.
1 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and Custom Forms.
XP New Perspectives on Microsoft Access 2002 Tutorial 41 Microsoft Access 2002 Tutorial 4 – Creating Forms and Reports.
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
Introduction to Access By Mary Ann Chaney and Alicia Harkleroad.
1 PROJECT 7 SPREADSHEETS WITH DATA CAPTURE—MINIVAN EXAMPLE Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell ©
ASP.NET Programming with C# and SQL Server First Edition
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
SQL 資料庫查詢語言 取材自 EIS, 3 rd edition By Dunn et al..
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access Committed to Shaping the Next Generation.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Microsoft Access Lecture -13- By lec. (Eng.) Hind Basil University of Technology Department of Materials Engineering 1.
Introduction to database systems
DAY 14: ACCESS CHAPTER 1 Tazin Afrin October 03,
Microsoft Access 3 Database Creation and Management.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
1 PROJECT 6 SPREADSHEET BASICS Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall, Inc.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
1 PROJECT 12 REPORTS BASED ON QUERIES Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,
DAY 19: MICROSOFT ACCESS – CHAPTER 3 CONTD. Aliya Farheen March 17, 2015.
Querying a Database - A question or an inquiry (dictionary.com) - WHAT ARE WE ASKING QUESTIONS ABOUT? THE DATA - BY ASKING QUESTIONS OF THE DATA WE OBTAIN?
Fanny Widadie, S.P, M.Agr 1 Database Management Systems.
1 PROJECT 4 WEB/HTML CUSTOMER SATISFACTION FORM Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice.
Microsoft Office XP Illustrated Introductory, Enhanced Tables and Queries Using.
1 PROJECT 5 WEB/HTML COMPUTER PURCHASE FORM Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
1 PROJECT 9 DATABASE FORMS AND REPORTS Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall,
Microsoft Access is a database program to manage sort retrieve group filter for certain records.
Verification & Validation. Batch processing In a batch processing system, documents such as sales orders are collected into batches of typically 50 documents.
1 Lesson 18 Managing and Reporting Database Information Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
CHAPTER 1 – INTRODUCTION TO ACCESS Aliya Farheen March 5, 2014.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Lesson 4.  After a table has been created, you may need to modify it. You can make many changes to a table—or other database object—using its property.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
Microsoft Access Database Creation and Management.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
USING ACCESS TO SEGMENT SURVEY DATA. OPEN ACCESS You May Need to Search for the Program You May Need to Search for the Program Access is a Database Access.
CHAPTER 1 – INTRODUCTION TO ACCESS Akhila Kondai September 30, 2013.
DAY 18: MICROSOFT ACCESS – CHAPTER 3 CONTD. Akhila Kondai October 21, 2013.
Key Applications Module Lesson 22 — Managing and Reporting Database Information Computer Literacy BASICS.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
Creating a database - I clicked on blank database and am saving it as books10.mdb. For more information see the practice example under week #1. I am going.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
MICROSOFT ACCESS – CHAPTER 3 CONTD. Sravanthi Lakkimsetty Mar 09, 2016.
Database (Microsoft Access). Database A database is an organized collection of related data about a specific topic or purpose. Examples of databases include:
Database Vocabulary Terms.
GO! with Microsoft® Access e
Nagendra Vemulapalli Access chapters 3&5 Nagendra Vemulapalli 1/18/2019.
Introduction to Access
Shelly Cashman: Microsoft Access 2016
Presentation transcript:

1 PROJECT 10 DATABASE QUERIES— TEXTBOOK DATABASE Management Information Systems, 9 th edition, By Raymond McLeod, Jr. and George P. Schell © 2004, Prentice Hall, Inc.

2 Learning Objectives Learn to create queries using one or multiple tables. Understand how to limit query results with single and multiple constraints. Understand how a query can request constraint values from the query user. Learn to use queries that look for partial values in fields. Learn to make computations within queries on both numeric and text fields.

3 Introduction This project uses Access 2002 (also known as Access XP) to create queries for an existing database The database for this project, Textbook, concerns classes and the books used in those classes. The database also contains records of students who have copies of books to sell Although there may be many tables in a database, they are all contained in the single database file along with any queries, reports, or other components of the database You should create a copy of the data file with your database on a regular basis

4 EXAMPLE This example will generate a number of queries from the Textbook database The Textbook database will be provided by your instructor or downloaded from the Prentice Hall Web site Managers typically use queries to look for specific records, and so the query is constrained to records that have certain values for fields Other queries compute new values from the values of other fields in the query

5 Textbook Database The Textbook database consists of four tables that relate to each other by common values The tables and their data fields are shown in Figure P10.1 The STUDENT table contains four fields: FirstName, LastName, BookNumb, and CopiesToSell. The key fields of the tables are shown in bold font It takes the combination of values from the FirstName, LastName, and BookNumb fields to make a key (i.e., a unique value) for the STUDENT table The ClassNumb field is the only field needed to be the key of the CLASS table

6

7

8

9

10 Creating a Query with Constraints Records in the BOOK table are shown in Figure P10.5 If a query were constructed without constraints, all of the records in the table would be displayed in the query result It is more productive to restrict the records displayed to those which fit some decision making criteria

11

12

13

14

15

16

17

18 Parameter Query Sometimes the decision maker will know which field will constrain a query but not the value of the constraint Access allows parameter queries, queries that let a user provide a value as the query runs. For example, suppose the decision maker is looking for unusually low or high book prices A decision maker could code the price amounts into the query as in Figure P10.11 or the query code could be written so that the decision maker is asked to provide the amounts each time the query runs

19

20

21 Inexact Constraints Constraints on fields containing text can be difficult to create because what constitutes a match might be ambiguous For example, what if you are looking for an author named “Tattem?” You can see from the values of the Author field in Figure P10.3 that Tattem is a coauthor of two books If the constraint is entered as Figure P10.14, Access will not find the record as the “Tattem” phrase looks for an exact match for the entire field value in the database records and, since “Tattem” is not an exact match of an entire Author field, no records are displayed by the query

22

23

24

25

26 Queries Requiring more than One Table Queries that require data fields from more than one table require that the tables supplying field values as well as tables used to navigate between those tables be included in the query-by-example. For example, assume you wish to create a query that displays the class number and the titles of books used for the class The ClassNumb field is needed from the CLASS table and the Title field is needed from the BOOK table

27

28

29

30

31

32

33

34

35 Data Field Concatenation and Calculation Data fields with text values can be concatenated— the characters can be added together with other characters and other text fields Numeric fields are subject to mathematical operations These operations can take place within a query so that values in the database do not need to be changed

36

37

38

39

40

41

42

43 ASSIGNMENT 1. Create a query using the CLASS table that shows the class number and enrollment where the enrollment is less than 25 students. Sort the results by the class number field. 2. Create a query that shows the class number (sorted) of classes that have either less than 25 students or more than 100 students. Show only the ClassNumb field, not the field or fields you use to constrain the results. 3. Create a query that shows the class number (sorted) of classes that have an enrollment of greater than 25 and less than 100 students. Show only the ClassNumb field in the query results. 4. Create a query that displays all of the MIS classes. These classes will begin the ClassNumb field with “MIS” and you should use an inexact constraint match. 5. Create a query that finds all senior level classes in the CLASS table based upon values in the ClassNumb field. A senior level class will always have the fourth character of the ClassNumb field be the value “4.”

44 ASSIGNMENT 6. Make a parameter query that asks the user to provide a ClassNumb value and limit the query results to the ClassNumb and Enrollment field values for that class. 7. What books are not being sold by any student? Show the book title (sorted) and book number. 8. For each class, count the number of books used in the class. Show the class number (sorted) and the count of the books. For this query you need two tables. 9. Sum the number of copies of all books that each student has to sell. The student name should be in first name, last name format such that one field (called “Name”) is created as the first name, a blank space, and the last name. Sort by the “Name” field you create. 10. Which book has the highest price? Show the book title and author.

45 END OF PROJECT 10