DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.

Slides:



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

Benchmark Series Microsoft Access 2010 Level 1
INSERT BOOK COVER 1Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Access 2010 by Robert Grauer, Keith Mast,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making.
Introduction to Structured Query Language (SQL)
Querying a Database Using the Select Query Window
Database Design Concepts INFO1408 Term 2 week 1 Data validation and Referential integrity.
Chapter 2 Querying a Database
Access Lecture 1 Database Overview and Creating Tables Create an Employee Table.
Access 2007 ® Use Databases How can Access help you to find and use information?
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
Chapter 2 Querying a Database
Advanced Tables Lesson 9. Objectives Creating a Custom Table When a table template doesn’t suit your needs, you can create a custom table in Design view.
Chapter 4: Organizing and Manipulating the Data in Databases
Chapter 2 Querying a Database MICROSOFT ACCESS 2010.
DAY 20: MICROSOFT ACCESS – CHAPTER 3 CONTD. Aliya Farheen March 19, 2015.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries Updated 4/11.
Database Applications – Microsoft Access Lesson 9 Designing Special Queries.
Chapter 10: Working with Large Data Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University Name.
1 MySQL and phpMyAdmin. 2 Navigate to and log on (username: pmadmin)
DAY 20: ACCESS CHAPTER 5 Tazin Afrin October 29,
Miscellaneous Excel Combining Excel and Access. – Importing, exporting and linking Parsing and manipulating data. 1.
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?
Microsoft Access 2010 Building and Using Queries.
Analyzing Data For Effective Decision Making Chapter 3.
Lesson 2.  To help ensure accurate data, rules that check entries against specified values can be applied to a field. A validation rule is applied to.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! With Microsoft ® Office 2007 Intermediate Chapter.
DAY 22: MICROSOFT ACCESS – REVIEW Akhila Kondai November 04, 2013.
Concepts of Database Management Seventh Edition
EXAM-2 OVERVIEW Aliya Farheen
Database Systems Microsoft Access Practical #3 Queries Nos 215.
DAY 19: MICROSOFT ACCESS – CHAPTER 3 CONTD. Aliya Farheen March 17, 2015.
Using Microsoft Access 56:150 Information System Design.
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.
XP Chapter 3 Succeeding in Business with Microsoft Office Access 2003: A Problem-Solving Approach 1 Analyzing Data For Effective Decision Making Chapter.
Access 2007 ® Use Databases How can Microsoft Access 2007 help you structure your database?
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
Database Applications – Microsoft Access Lesson 4 Working with Queries 36 Slides in Presentation.
ACCESS (CHAPTER 2-3 continued) Naman Kohli October 16,
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
CHAPTER 1 – INTRODUCTION TO ACCESS Aliya Farheen March 5, 2014.
DAY 16: MICROSOFT ACCESS – CHAPTER 2 Madhuri Siddula October 8, 2015.
Microsoft Office 2013: In Practice Chapter 2 Using Design View, Data Validation, and Relationships Copyright © 2014 by The McGraw-Hill Companies, Inc.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
1Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Exploring Microsoft Office Access 2010 by Robert Grauer, Keith Mast, and Mary Anne.
(SQL - Structured Query Language)
DAY 21: ACCESS CHAPTER 6 & 7 Tazin Afrin October 31,
DAY 18: MICROSOFT ACCESS – CHAPTER 3 CONTD. Akhila Kondai October 21, 2013.
WEEK# 12 Haifa Abulaiha November 02,
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
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.
Programming with Microsoft Visual Basic 2012 Chapter 14: Access Databases and SQL.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
DAY 20: ACCESS CHAPTERS 5, 6, 7 Larry Reaves October 28,
Miscellaneous Excel Combining Excel and Access.
Structured Query Language (SQL) William Klingelsmith
CIS16 Application Programming with Visual Basic
Access: SQL Participation Project
Nagendra Vemulapalli Access chapters 3&5 Nagendra Vemulapalli 1/18/2019.
M1G Introduction to Database Development
New Perspectives on Microsoft
Presentation transcript:

DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.

REMINDERS Homework # 4 is due on 10/30/2015 by 11:59 pm. MyITLab Lesson D is due on 11/2/2015 by 11:59 pm. Homework # 5 is due on 11/6/2015 by 11:59 pm. Start working on them !

CONTENTS Data Validation Techniques Importing and exporting data Using SQL in Access Exercises

Data Validation Techniques Importing and Exporting Data Using SQL in Access

DATA VALIDATION TECHNIQUES Data validation is a set of constraints or rules that help control how data is entered into a field. Those are Field Properties. Each Data type has its own properties. Let us see some frequently used Constraints or properties.

ESTABLISHING DATA VALIDATION Establish REQUIRED fields. Set DEFAULT VALUE for fields. Set VALIDATION RULE and generate VALIDATION TEXT. Use INPUT MASK wizard. Look up Fields. ( already done in homework's )

ESTABLISH REQUIRED FIELDS The required fields must not be left blank. Lets try Open blank table in design view Field 1 -> Student ID : Number Field 2 -> Student Name : Text and in Properties set “REQUIRED” to “YES” Switch to data sheet view and try to enter a record with out giving Student Name, you will see an error

SET DEFAULT VALUE FOR FIELDS. Delete the records first Switch to design view: Field 3 -> Score : Number Set DEFAULT VALUE property to 30 Observe records.

SET VALIDATION RULE AND GENERATE VALIDATION TEXT. Validation rule is designed to restrict the data values that can be entered into a field. Validation text informs users that the validation rule has been broken, and how to correct it. Lets try : Set validation rule and text for SCORE FIELD Delete all the records first and remove the default value set. Validation rule: [Score] <= 60 Validation Text: You can’t enter a value greater than 60. Please enter correct value. Now try to enter 90 in Score field for a record and observe the warning message.

USE INPUT MASK WIZARD. Input Mask Wizard generates an input mask for a field based on your answer to a few questions. Lets try: Delete all records Switch to Design view: Add a new field Phone Number: Text Note: works with Text/Date fields only Now click on Input Mask Wizard Option in Properties Choose Phone Number and go on……. Switch to Data Sheet view and try to add phone number and see what's happening.

Data Validation Techniques Importing and Exporting Data Using SQL in Access

IMPORTING DATA INTO ACCESS We can import data from Access / Excel / Text / XML file and more… Note for TEXT file : comma to next column and enter to next row. ( similarly to EXCEL)

EXPORTING DATA FROM ACCESS You can export the data from number of records in access to Excel / text / XML / PDF / Access files and more …… Try those ……

Data Validation Techniques Importing and Exporting Data Using SQL in Access

STRUCTURED QUERY LANGUAGE (SQL) Standard computer language for retrieving and updating data within database systems. Database applications like MS Access, DB2, MS SQL, Oracle, Sybase, MySQL, etc. use SQL. We have been using graphical tools to develop and manipulate database objects thus far…

SQL CONTINUED… Access has written the SQL statements behind the scenes for us. The SQL language can be separated into two sub sets: Data Manipulation Language (DML) and the Data Definition Language (DDL). We will look mostly at DML aspects.

SQL KEYWORDS 17

SELECT STATEMENT Retrieves all of the data in the fields specified from the specified database table. Syntax is: SELECT FROM – is a comma separated list of column names to be returned – is the tables where the are located…

SELECT STATEMENT The can be specified as *, which will return all columns that are in the. can also be aggregate functions (i.e sum, count, etc) Let’s try it!

LET’S TRY IT THE OLD WAY FIRST…  Obtain and open Customer_orders.accdb  Create a query in design view  Add the Customer table only  Add all fields  Run the query  Click “View” and change to “SQL View” to see what was done behind the scenes…

SELECT EXERCISE  Close the Query without saving changes  Create a new query in design view.  Don’t add any tables  Change to “SQL View”  Type SELECT * FROM customer  Run the query by clicking “!”…  Words in capital are “reserved words”

SELECT EXERCISE Now, let’s revise our SQL SELECT…  Go back to SQL View and make it read: SELECT first_name, last_name FROM customer  Run the Query We are shown only the fields we requested from the table we told it to use…

ONE MORE… Say we wanted to have it ALIAS a column for us which combined first and last name field values and separated them with a space…  SELECT (first_name + “ ” +last_name) AS [Full Name] FROM customer  Run it! We are presented a field that does not actually exist in the table as we gave it as alias.

Open the database on the Lecture notes for today and complete the exercises.

EXERCISE-01 Create a new query to summarize the fatalities data. For each region, list the full region name, the count of countries in the region, the sum of the population, and the sum of estimated fatalities. Sort by region name in ascending order. HINT: This query will show 8 records and 4 fields

EXERCISE-02 We wish to create a query that will list countries where a plurality of fatalities were from cars and trucks. For this query copy-and-paste the below SQL code: SELECT Countries.CountryName, Fatalities.EstimatedFatalities, Fatalities.CarPctg FROM Countries INNER JOIN Fatalities ON Countries.CountryAbbrv = Fatalities.CountryAbbrv WHERE (((Fatalities.CarPctg)>[Fatalities].[MotorcyclePctg] AND (Fatalities.CarPctg)>[Fatalities].[BicyclePctg] AND (Fatalities.CarPctg)>[Fatalities].[PedestrianPctg] AND (Fatalities.CarPctg)>[Fatalities].[UnknownPctg])); IMPORTANT: Do not make any modifications to the query other than entering the above SQL code. HINT: This query will show 70 records and 3 fields.

EXERCISE-03 Create a new query that lists each country’s name, the full name of its region, the number of estimated fatalities, and the percentage of fatalities involving pedestrians, and its GDP per capita. You can calculate the GDP per capita using the formula: [. ] [. ] Only display records where the percentage of accidents involving pedestrians is greater than 0% (> 0). Format the GDP per capita as currency with no decimal places. Sort by the percentage of fatalities involving pedestrians then by the GDP per capita, both in descending order. HINT: This query will show 107 records and 5 fields.

EXERCISE-04 We wish to compare statistics for countries in South America versus those in Asia. Display each country’s full name, its population, GDP, number of estimated fatalities, and the percentages of fatalities involving cars, involving motorcycles, involving bicycles, involving pedestrians, and involving other or unknown victims. Only display records for countries in the South America or Asia regions. Do not show the region in the result. HINT: This query will show 23 records and 9 fields.