Statistical Outcomes IT Key Ideas, Dynamic Database Systems, 2002 Chapter 6.

Slides:



Advertisements
Similar presentations
Structured Query Language (SQL)
Advertisements

CS 101 Attendance 3/27/14. A query using “AND” will A.Generate more answers than the same thing with OR B.Generate fewer answers than the same query with.
Exploring Microsoft Access 2003 Chapter 3 Information From the Database: Reports and Queries.
Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Data Elements and Tables IT Key Ideas, Dynamic Database Systems, 2002 Chapter 7.
Reports IT Key Ideas, Dynamic Database Systems, 2002 Chapter 5.
Exploring Microsoft Access 97 Chapter 3 Information From the Database: Reports and Queries Office graphic copyright by Microsoft Corp.
Chapter 6 UNDERSTANDING AND DESIGNING QUERIES AND REPORTS.
Exploring Microsoft Access
Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Concepts of Database Management Seventh Edition
Exploring Microsoft Excel 2002 Chapter 7 Chapter 7 List and Data Management: Converting Data to Information By Robert T. Grauer Maryann Barber Exploring.
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.
Chapter 7 Data Management. Agenda Database concept Import data Input and edit data Sort data Function Filter data Create range name Calculate subtotal.
Accounting Interface:
Concepts of Database Management Sixth Edition
A Guide to SQL, Seventh Edition. Objectives Retrieve data from a database using SQL commands Use compound conditions Use computed columns Use the SQL.
Information Storage and Retrieval CS French Chapter 3.
Microsoft Access 2010 Chapter 7 Using SQL.
Querying and Sorting IT Key Ideas, Dynamic Database Systems, 2002 Chapter 3.
Concepts of Database Management, Fifth Edition
Chapter 3 Single-Table Queries
Microsoft Access 2010 Chapter 7 Using SQL. Change the font or font size for SQL queries Create SQL queries Include fields in SQL queries Include simple.
Microsoft Access Intro Class 5 Working with Queries.
Summary Data Modeling SDLC What is Data Modeling Application Audience and Services Entities Attributes Relationships Entity Relationship Diagrams Conceptual,Logical.
Database Queries. Queries Queries are questions used to retrieve information from a database. Contain criteria to specify the records and fields to be.
Analyzing Data For Effective Decision Making Chapter 3.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
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.
Slide 1 Standard Grade Computing Databases. Slide 2 Standard Grade Computing Definitions DatabaseA database is a structured collection of similar information.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
1 Single Table Queries. 2 Objectives  SELECT, WHERE  AND / OR / NOT conditions  Computed columns  LIKE, IN, BETWEEN operators  ORDER BY, GROUP BY,
Concepts of Database Management Seventh Edition
Using Special Operators (LIKE and IN)
Concepts of Database Management Seventh Edition
ATADESAB. BATLE CORDER DLEIF Lesson objectives In this lesson you will learn some basic database terms and learn how a database is created.
3-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Chapter 3 Databases and Data.
Chapter 17 Creating a Database.
11 3 / 12 CHAPTER Databases MIS105 Lec15 Irfan Ahmed Ilyas.
Access: Queries Ad-hoc Reporting Chapter T. Access Queries Queries Access Properties Sorting Selection Criteria Calculations.
 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.
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?
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
1 Committed to Shaping the Next Generation of IT Experts. Chapter 1- Introduction to Access: What is a Database? Robert Grauer and Maryann Barber Exploring.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
Reports and Queries Chapter 3 – Access text Reports – Page Queries – Page
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
Computing and Information Science 1 Databases START.
Databases.  A database is simply a collection of information stored in an orderly manner.  A database can be as simple as a birthday book, address book.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
Access Queries Agenda 6/16/14 Review Access Project Part 1, answer questions Discuss queries: Turning data stored in a database into information for decision.
Databases and ADO.NET Programming Right from the Start with Visual Basic.NET 1/e 11.
Databases. Revision tip: Focus on the things you find difficult first.
A Guide to SQL, Eighth Edition Chapter Four Single-Table Queries.
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.
SQL: Structured Query Language It enables to create and operate on relational databases, which are sets of related information stored in tables. It is.
1 Section 1 - Introduction to SQL u SQL is an abbreviation for Structured Query Language. u It is generally pronounced “Sequel” u SQL is a unified language.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
Exploring Excel Chapter 5 List and Data Management: Converting Data to
Data quality 1: Individual records
SQL.
Database Design and Development
Spreadsheets, Modelling & Databases
Chapter 9 Query-by-Example Pearson Education © 2009.
BUS2206 Access Lab Queries Second Term,
ESRM 250/CFR 520 Autumn 2009 Phil Hurvitz
Presentation transcript:

Statistical Outcomes IT Key Ideas, Dynamic Database Systems, 2002 Chapter 6

Review IT Key Ideas, Dynamic Database Systems, 2002 A find locates a particular piece of data in order to answer a specific question about the one person (entity). For example, what is Bonny Jane’s surname? page 65

IT Key Ideas, Dynamic Database Systems, 2002 A query, eg. how many people have brown hair? locates many records that match the specified criteria. Even while there are many records, there is nevertheless one answer. Even if the wording is changed to list the people have brown hair the list is but one answer.

IT Key Ideas, Dynamic Database Systems, 2002 # records

IT Key Ideas, Dynamic Database Systems, 2002 Consider these outcomes Each question will have many answers. The last question will have many lists, i.e. many answers. How many people have each colour of hair? or How many people are there per age? or For each favourite TV programme, list the names of the people.

IT Key Ideas, Dynamic Database Systems, 2002 Statistical Outcome by using a Query with Total

Statistical Outcome Report, with groups and summaries

IT Key Ideas, Dynamic Database Systems, 2002 Statistical Outcomes The critical word that leads to the production of many answers is each or per. How many people have each colour of hair? or How many people are there per age?

Statistical outputs are achieved by activating Total, which adds a new line to the QBE grid. IT Key Ideas, Dynamic Database Systems, 2002

Statistical Commands page 66

IT Key Ideas, Dynamic Database Systems, 2002 Example To achieve this in a room of people one would organise groups of people into different corners of the room according to their hair colour and then manually count the number of people in each group. How many people have each different hair colour? page 66

# people each hair colour IT Key Ideas, Dynamic Database Systems, 2002 The elements of data required to achieve this output are Hair Colour and Surname. The Hair Colours are grouped and the Surnames are counted. Hair ColourSurname GroupByCount

Output IT Key Ideas, Dynamic Database Systems, 2002

NB: IT Key Ideas, Dynamic Database Systems, 2002 Different fields can be used as the counting field, rather than Surname, without affecting the output.

Statistical Queries Practical 6.1page 67 IT Key Ideas, Dynamic Database Systems, 2002

If a little unsure, work out the output. Make a mock list of what you expect the result to look like. Example – This week’s pay for each employee Hint

The number of people for each Age IT Key Ideas, Dynamic Database Systems, 2002 The word age follows the term each, then it is Age that needs to be placed in groups. To determine the number of people, count the Surnames. page 68 Age:Surname GroupByCount Age: Int((Date()-[Date of Birth])/ )

Dates of birth of the eldest person for each different eye colour IT Key Ideas, Dynamic Database Systems, 2002 The grouping field is Eye Colour. NB:Dates are stored as numbers from 1/1/ The older a person is the smaller the number stored in the Date of Birth field => Min is the appropriate statistical command.

Formatting FieldFormat Date of Birth dddd, d\ mmmm\ yyyy (amongst other variations) Average age Fixed, 2 decimal places Phone number (if stored as text) IT Key Ideas, Dynamic Database Systems, 2002

Average age of males and females IT Key Ideas, Dynamic Database Systems, 2002 The groups are the males and females, hence GroupBy Sex. The average age specifies the Avg command.

The number of people for each Age IT Key Ideas, Dynamic Database Systems, 2002 The word age follows the term each, then it is Age that needs to be placed in groups. To determine the number of people, count the Surnames.

The number of people per hair colour per eye colour IT Key Ideas, Dynamic Database Systems, 2002 The double per indicates a double grouping. The order of implementation of such a question is often virtually backward; i.e. Group By Eye Colour Group By Hair Colour CountSurname page 69

Statistical Outcomes with criteria Criteria can be applied to Statistical Outcomes, just as with standard Queries. Indeed, in a real-life system, one is unlikely to produce statistics of the whole set of data. IT Key Ideas, Dynamic Database Systems, 2002

The number of people per eye colour, who are at least 50 years of age IT Key Ideas, Dynamic Database Systems, 2002 This query involves setting a criterion of at least 50 for the Age field. This is accomplished by using the Where command on the Total line. Grouping the Eye Colour Counting the Surnames Where the Age is >=50

IT Key Ideas, Dynamic Database Systems, 2002 page 69

SQL, for statistical outcomes SELECT [Eye Colour], Count (Surname) as Count FROM Details WHERE Int((Date()-[Date of Birth]) / )>=50 GROUP BY [Eye Colour];

The number of blonde females per age IT Key Ideas, Dynamic Database Systems, 2002 Set Hair Colour to Blonde and Sex to f Grouping the Age Counting the Surname page 69

The number of male and female adults with brownish hair IT Key Ideas, Dynamic Database Systems, 2002 Set Age to >= 18 and Hair Colour to *brown Grouping Sex Counting Surname

The number of people in each generation IT Key Ideas, Dynamic Database Systems, 2002 Group By Generation Count Surname comes readily to mind But how is Generation obtained? It is similar and connected to Age, but how is it related? A comparison between Ages and Generations may help.

The number of people in each generation IT Key Ideas, Dynamic Database Systems, 2002

The number of people in each generation IT Key Ideas, Dynamic Database Systems, 2002 The connection between Age and Generation is a span of ten years, is the 10s is the 20s and so on. The Generations can be generated either arithmetically or by using text functions as the first digit is the same.

IT Key Ideas, Dynamic Database Systems, 2002 Pick any age between 20 and 29, for example 27 divide by remove the decimal component 2 multiply the age by add the s to the characters Arithmetically

IT Key Ideas, Dynamic Database Systems, 2002 take the first character of the age, for example with 27 2 add the characters 0s 20s Text based

Homework/Study Exercise 6.2page IT Key Ideas, Dynamic Database Systems, 2002 table of data page 72 Data FilePeople&Hobbies

Practical 6.3 page 74 IT Key Ideas, Dynamic Database Systems, 2002 Data File Class Details

Chapter 6 ********************************