Test Review “Exam 2: Prof. Reinhardt” Computer Resource Center REACH 2015 1.

Slides:



Advertisements
Similar presentations
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Advertisements

Concepts of Database Management Seventh Edition
Concepts of Database Management Sixth Edition
Access - Project 1 l What Is a Database? –A Collection of Data –Organized in a manner to allow: »Access »Retrieval »Use of That Data.
COMPREHENSIVE Access Tutorial 2 Building a Database and Defining Table Relationships.
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.
Management Information Systems MS Access 2003 By: Mr. Imdadullah Lecturer, Department of M.I.S. College of Business Administration, KSU.
ACCESS CHAPTER 1. OBJECTIVES Tables Queries Forms Reports Primary and Foreign Keys Relationship.
Database Applications – Microsoft Access Lesson 2 Modifying a Table and Creating a Form 45 slides in presentation Accessibility check 9/14.
Your Tour Guide is Jim Provensal. What We Will Cover s Introduction to MicroSoft Access u What is a database u What is a “Relational” Database s The Major.
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 1 1. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office.
Unit J: Creating a Database Microsoft Office Illustrated Fundamentals.
Access 2007 Database Application Managing Business Information Effectively BCIS 1 and 2.
ASP.NET Programming with C# and SQL Server First Edition
Copyright © 2008 Pearson Prentice Hall. All rights reserved.1 1 Committed to Shaping the Next Generation of IT Experts. Chapter 2: Relational Databases.
Working with a Database
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Access Tutorial 2 Building a Database and Defining Table Relationships
Chapter 4 The Relational Model 3: Advanced Topics Concepts of Database Management Seventh Edition.
® Microsoft Office 2013 Access Building a Database and Defining Table Relationships.
Microsoft Access 2003 Define some key Access terminology: Field – A single characteristic or attribute of a person, place, object, event, or idea. Record.
Microsoft Access 2010 Building and Using Queries.
McGraw-Hill/Irwin ©2009 The McGraw-Hill Companies, All Rights Reserved Business Driven Information Systems 2e Plug-In T6: Basic Skills and Tools Using.
Management Information Systems MS Access MS Access is an application software that facilitates us to create Database Management Systems (DBMS)
Access 2013 Microsoft Access 2013 is a database application that is ideal for gathering and understanding data that’s been collected on just about anything.
Concepts of Database Management Seventh Edition
Introduction to Databases Trisha Cummings. What is a database? A database is a tool for collecting and organizing information. Databases can store information.
Key Applications Module Lesson 21 — Access Essentials
® Microsoft Access 2010 Tutorial 2 Building a Database and Defining Table Relationships.
Chapter 17 Creating a Database.
XP New Perspectives on Microsoft Access 2002 Tutorial 1 1 Microsoft Access 2002 Tutorial 1 – Introduction To Microsoft Access 2002.
MS Access 2007 Management Information Systems 1. Overview 2  What is MS Access?  Access Terminology  Access Window  Database Window  Create New Database.
® Microsoft Office 2010 Building a Database and Defining Table Relationships.
Microsoft Office 2007 Access Chapter 3 Maintaining a Database.
Microsoft Access Intro Class 6 Relationships.
Databases,Tables and Forms Access Text by Grauer Chapters 1 & 2.
A Skills Approach Access 2010 Working with Tables © 2012 The McGraw-Hill Companies, Inc. All rights reserved Chapter 2.
1 CSE 2337 Introduction to Data Management Access Book – Ch 1.
Pasewark & Pasewark 1 Access Lesson 3 Creating Queries Microsoft Office 2007: Introductory.
1/62 Introduction to and Using MS Access Database Management and Analysis Yunho Song.
XP New Perspectives on Microsoft Access 2002 Tutorial 31 Microsoft Access 2002 Tutorial 3 – Querying a Database.
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.
Work with Tables and Database Records Lesson 3. NAVIGATING AMONG RECORDS Access users who prefer using the keyboard to navigate records can press keys.
MSOffice Access Microsoft® Office 2010: Illustrated Introductory 1 Part 1 ® Database & Table.
Microsoft Office 2013 Try It! Chapter 4 Storing Data in Access.
Test Review “Exam 1: Prof. McIntosh” Computer Resource Center REACH
Access Module Implementing a Database with Microsoft Access A Great Module on Your CD.
Test Review “Exam 2: Prof. Reinhardt” Computer Resource Center REACH
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall. 1 Skills for Success with Microsoft ® Office 2007 PowerPoint Lecture to Accompany.
To play, start slide show and click on circle Access 1 Access 2 Access 3 Access 4 Access Access
Access Tutorial 2 Building a Database and Defining Table Relationships
Microsoft Office Access 2010 Lab 1
GO! with Microsoft Office 2016
Test Review “Exam 1: Prof. McIntosh”
Microsoft Office Illustrated Introductory, Windows Vista Edition
Practical Office 2007 Chapter 10
REACH CRC Professor Reinhardt
GO! with Microsoft Access 2016
MODULE 7 Microsoft Access 2010
Test Review Exam 1: Prof. Manni
Access Tutorial 2 Building a Database and Defining Table Relationships
Access Tutorial 2 Building a Database and Defining Table Relationships
Guidelines for Microsoft® Office 2013
Grauer and Barber Series Microsoft Access Chapter One
Microsoft Office Illustrated Introductory, Windows XP Edition
Presentation transcript:

Test Review “Exam 2: Prof. Reinhardt” Computer Resource Center REACH

Test Overview Very Little Application Problems Wiley Chapter’s 5, 7, 11 Queries: Append, Delete, Update, Calculate, Select Types of Relationships (One-many, many- many, one-one) Other Assess Database Concepts and Definitions 2

Database Design Basic Terminology: A table consists of data that is arrayed in rows and columns. A row of data is called a record. A column of data is called a field. Thus, a record is a set of related fields. The fields in a table should be related to one another in some way. 3

Basic Terminology Primary key field is a field in which each record has a unique value. e.g. The SSN Foreign key is the primary key of another table. e.g. suppose we need to link the employee table with the Hours worked table for payroll purposes. The Employee ID number (EIN) is the primary key of the employees table but the foreign key of the hours worked table. * Every foreign key must be associated with a primary key in another table. 4

Basic Terminology A form is a database object that is created from an existing table to make the process of entering data more user-friendly A query is the database equivalent of a question that is posed about data in a table (or tables). Queries can be designed to search multiple tables but these tables should be connected by a join operation. 5

Cardinality of Relationships In a one-to-one relationship, one instance of the first entity is related to just one instance of the second entity In a one-to-many relationship, one instance of the first entity is related to many instances of the second entity, but each instance of the second entity is related to only one instance of the first entity In a many-to-many relationship, one instance of the second entity is related to many instances of the second entity, and one instance of the second entity is related to many instances of the first 6

Editing Relationships Referential Integrity- a set of rules Access enforces to maintain consistency between related tables when you update data in a database. Cascade Delete – When you select this option, if you delete a record from one table, corresponding records in the other table are also deleted Cascade 7

8

Types of Queries Select Query Queries that answer a question “Selects” relevant data from database records Helps you get just the data you need in a Datasheet view Append Query Adds a record to the end of the table Works by selecting records from one or more data sources and copying them to an existing table 9

Types of Queries Update Query Designed to change data in records Often updates information in real time (think online purchases and updating the on-hand amount of that item) Begins as a “Select” query, then begins by clicking “update” Delete Query Deletes entire records from a table Works similar to update query (must start with select query) 10

Use Update or Delete? Type of queryWhen to use itResults Use a delete queryTo remove entire records (rows) from a table or from two related tables simultaneously. Delete queries remove all the data in each field, including the key value that makes a record unique Use an update queryTo delete individual field values from a table. Makes it easier to delete values by updating the existing values to either a null value (that is, no data) or a zero-length string (a pair of double quotation marks with no space between them). 11

12

Database Design Database design concepts: Entities an entity is a tangible thing or an event. It is a person, place, thing or concept about which data can be collected. Consider the following examples: 1)The database of a video store would have one entity named video and another named customer (These are physical entities). 2)Organizations incur expenses from paying hourly employees and purchasing materials from suppliers. Hours worked and purchases are event entities in the database of most organizations. 3)The library lends books for free. If you were to think of checking out a book as a sales transaction for zero revenue, how would you handle the revenue generating event? The event entity here is the number of checkouts. 13

Database Design A book can have more than one author. An author can write more than one book. How would you describe the relationship between authors and books? Many-to-many A member can borrow any number of books at one checkout. A book can be checked out more than once. How would you describe the relationship between books and checkouts? Many-to-many 14

Database Design Attributes an attribute is a characteristic of an entity. These attributes become the table’s field. E.g. what are the attributes for the entity “Customer”? Customer ID, First name, Surname, Date of Birth, Address and Phone no. What are the attributes for the entity “Fashion Model”? Name, Height, Weight, Dress size, Hair color and Eye color. 15

Database Design Rules Rule 1: You do not need a table for the business The database represents the entire business. Thus in the practice example* The library is not an entity. Rule 2: Identify the entities in the business description In our example the entities are Members, employees and books. 16

Database design rules Rule 3: Look for relationships among the entities one-to-many, one-to-one, and many-to-many. In our example: one-to-many: a member can check out more than one book. Rule 4: Look for attributes of each entity and designate a primary key. Attributes of members: name, DOB, phone no., address, member ID card number …etc. Employees: name, # of hours worked, job title,…etc. Books: name, authors, type, status, member ID card number…etc. Primary Key Foreign key 17

Database Design Rules Rule 5: Avoid data redundancy you should not include extra (redundant) fields in a table. Redundant fields take up extra disk space and lead to data entry errors because the same value must be entered in multiple tables. Rule 6: Do not include a field if it can be calculated from other fields A calculated field is made using the query generator as we will see later. 18

Metadata & Hierarchy of Data Metadata: Data about data. Metadata describes how and when and by whom a particular set of data was collected, and how the data is formatted. A text document's metadata may contain information about how long the document is, who the author is, when the document was written, and a short summary of the document. Hierarchy of Data: refers to the systematic organization of data, often in a hierarchical form. Data organization involves fields, records, files and so on. 19

Data Dictionary Data Dictionary: In database management systems, a file that defines the basic organization of a database. A data dictionary contains a list of all files in the database, the number of records in each file, and the names and types of each field. Most database management systems keep the data dictionary hidden from users to prevent them from accidentally destroying its contents. Data dictionaries do not contain any actual data from the database, only bookkeeping information for managing it. Without a data dictionary, however, a database management system cannot access data from the database. 20

Creating tables Create tab  Table design (in the tables group) Fill in the table’s fields. Choose a suitable data type for each field. For example text  Last Name Date/time  Date Hired Yes/No  US Citizen Change the lengths of the text fields from 255 to 30 spaces. 21

Creating tables We need to make the Employee ID a primary key: Select the Employee ID field then in the Table tools Design click Primary Key tab After you finish click the File tab  Save object as  then name your table Note that this is different from Save Database as which saves the whole database. 22

Creating Compound Primary Key The two fields must be appear one after the other in the table definition screen (plan ahead for that format). Highlight one field, hold down the control key and highlight the next field. Go to table tools  design tab  Primary Key 23

Adding records to a table Double click the table’s name in the navigation pane at the left of the screen then start typing data directly into the cells. Enter your data one field value at a time. Each time you finish entering a value, press Enter to move the cursor to the next cell. After you enter the data in the last cell in a row, the cursor moves to the first cell in the next row and Access automatically saves the record No need to save through the File tab. 24

Creating Queries Using Calculated Fields in Queries: E.g. suppose we have the following table. if you have an existing field containing the number of boxes of Girl Scout cookies sold, you may want to see how much money was collected for each cookie sale. In this example, the boxes sold for $3.95 each. 25

Using Calculated Fields in Queries In this case we will create a calculated field in a query. Create tab  Query design Don’t Forget the Colon. Also the field name must be enclosed in square brackets. 26

Using Calculated Fields in Queries How to format the calculated field output? 1. select the output column by clicking the line above the calculated field expression. 2. the column darkens to indicate the selection. 3. Design tab  property sheet  format 27

Avoiding errors when making calculated fields 1.Do not enter the expression in the criteria cell. Enter it in the Field cell. 2.Spell, capitalize, and space a field’s name exactly as you did in the table definition. 3.Don’t use parentheses or curly braces instead of the square brackets. 28

“Relating” two or more tables by the join operation Suppose you want to see the last names, employee IDs, wage rates, salary status, and citizenship only for US citizens and hourly workers. Problem: the data is spread across two tables. Solution: add both tables and pull down the five fields you need. Step 1: Create tab  Query design Step 2: Click one table name and hold down the ctrl button while choosing the other table name. Step 3: start pulling down the fields you need and add the criteria expressions. 29

“ Relating” two or more tables by the join operation 30

“ Relating” two or more tables by the join operation you can use calculated fields using more than one table. Just follow the same steps and add the calculated field in the design view like what we did earlier. 31

Totals Queries Assume that you want to see two pieces of information for hourly workers: 1.The average wage rate percent of the average rate Step1: Create the first query, click the design tab  Totals button in the show/hide group. This will give us the average of the wage rate field. Note that: you should type the revised heading for the wage rate field, i.e. Average rate: wage rate. N.B. we need the average of this field. Also to get the hourly workers only, enter Criteria=No. 32

Totals Queries Now begin a new Query. But instead of basing it on a table, we will base it on the previous query. Design the new query and create a calculated field inside it. 33

Update Queries Update Queries Suppose you want to give all non-salaried workers a $0.50 pay raise. If you have 3 workers  change the wage rate data in the table. If you have 3000 workers  it would be much faster and more accurate to change the wage rate by using an update query that adds $0.50 to each non-salaried employee’s wage rate. 34

Update Queries Update Queries First start by making a select query. Then click the update button in the query type group. 35

Update Queries Update Queries We will write the updated data in the Update to line in the QBE grid. We will update only the non- salaried workers by using a filter under the salaried field. 36

Update Queries Update Queries When you run the query, the following warning message will appear. Click yes, and the records will be updated. 37

Parameter Queries Suppose you want to know how many hours a particular employee has worked. 1.Run a select query. 2.You will get a message to enter the employee ID. Enter your employee ID and you will get the desired information 38

Creating Reports Create basic ungrouped report: Select the table  create tab  report 39

Creating Reports Create Grouped Report: Design tab  Group and Sort button in the grouping and tools group. Click the Add group button then select the desired table (Employee ID) 40

Creating Reports To total the hours worked by each employee: select the Hours column heading. Then on the Design tab  totals button in the grouping and totals group  Sum Layout View 41

Creating Reports Design tab  Report view from the views group Report view (final view) 42

Small Quiz (Database Concepts) The metadata for a database describes which of the following properties of a database? It defines the fields in the database tables It defines the structure of the database tables It defines the sizes and formats of the fields in the database tables It identifies the primary keys All of the answers provided are correct 43

(Database Concepts) Because it is relatively common and everyone has one, the date of birth is often used as a primary key in a database table for identifying employees within a corporation. True False (Database Concepts) What is the term for a collection of related records, such as the scores for all of the students in a given section of CIS300? Field Character Item Table Query 44

(Database Concepts) Which of the following is the smallest piece of data that can be stored within a database? (select at least one, but no more than two answers) bit byte character field record table 45

(Database Concepts) Which of the following terms is often used to refer to the columns shown in a database table? (select at least one, but no more than two answers) row data element metadata field record data type 46

(Database Concepts) A field within a database is defined as a single item of data that is common to all records and occurs as an individual _____ within a table. cell column row value entry 47

(Microsoft Access) The Report Wizard is an easy to use feature in Access that guides you through a series of questions and then generates a customized report based on the answers you provide. True False 48

(Microsoft Access) Which of the following types of fields is used to produce a value from an expression or function? Calculated AutoNumber OLE Object Indexed Number 49

(Microsoft Access) Which of the following objects provides a simple approach for less-experienced users to extract information from a database? (select at least one, but no more than two answers) Forms Macros Modules Queries Reports Tables 50

While a database itself is a collection of several related files, the program used to build databases, populate them with data, and manipulate the data is called a(n) _ DBMS – Database Management System. There are two overall approaches to maintaining data: the traditional file approach—which has no mechanism for tagging, retrieving, and manipulating data—and the ____, which does have this mechanism. Database Approach Data Approach Datafile Approach Indexed file approach 51

52

53