Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of.

Similar presentations


Presentation on theme: "Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of."— Presentation transcript:

1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of IT Experts. Chapter 1: Finding Your Way Through a Database Robert Grauer, Keith Mulbery, Maurie Wigman Lockley

2 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall2 Open a Database Choose Open to browse for a file or choose a database from the Recent Documents list Open Recent Documents list

3 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall3 Open a Database Choose a database from the Open Recent Database List or click More to browse for other databases Open Recent Database list

4 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall4 Database Terminology Field Record Table Database A database is made up of one or more tables Individual tables in a database Records Individual fields

5 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall5 Objects Tables Queries Reports Forms Modules Macros Objects

6 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall6 Work with Table Views Datasheet View – used to add, modify, delete and view records Design View – used to create and modify the fields in a table Datasheet View Design View

7 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall7 Datasheet View Primary Key – a field that identifies each record as being unique Primary key field Navigation bar Scroll barNavigation buttons

8 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall8 Design View Click F6 to switch between the upper and lower panes Key symbol identifies primary key field Set field properties in the lower pane

9 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall9 Forms, Queries, and Reports Forms, queries, and reports are all based upon data contained in a table ReportQueryForm

10 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall10 Forms Forms allow us to create an interface that can be more user friendly and attractive than Datasheet View Underlying table Form First record from table visible in form

11 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall11 Queries Queries allow us to question data The answer to the query is a dataset The question asked is formed using criteria – the rules or norm that is the basis for making judgments Query results showing only employees who are Sales Representative Criterion restricting dataset to show records that have a job title of Sale Representative

12 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall12 Backing-up and Renaming Access Files Save As – different in Access than other Office applications ◦ Save As saves only the current object, not the entire database To save a database with a new name you must either: ◦ Backup the database ◦ Copy, paste, and rename the database

13 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall13 Backing-up a Database Backing-up an Access file will produce a copy of your file with a default file name Default file name of a backup file is the name of the database and the current date

14 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall14 Compact and Repair Fixes problems due to inefficient file storage and growth of a database ◦ Should be performed everyday ◦ Often decreases the file size by 50% or more Compact and Repair is located under the Manage menu

15 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall15 Filters Create a subset of records Do not change underlying table data Two types ◦ Filter by Selection ◦ Filter by Form

16 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall16 Filter by Selection Selects only the records that match pre- selected criteria Table before filter by selection Results of filter Filter by selection being applied from pre-determined criteria

17 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall17 Filter By Form Allows the user to select criteria with which to filter by Allows the specification of relationships in the criteria Selection of criteria during Filter by form process Inequity setting used in a Filter by Form process

18 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall18 Applying and Removing a Filter Once a filter is applied, the Toggle Filter icon will be available The Toggle Filter icon can be used to apply and remove the current filter as many times as desired Filter icon in the Sort and Filter group Toggle Filter icon

19 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall19 Sorting Table Data Lists records in ascending or design order according to one or more fields Last Name field sorted ascending Last Name field sorted descending

20 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall20 Access or Excel? You are working with large amounts of data You need to create relationships between your data You rely on external databases to analyze data Your data is of a manageable data size There is no need for relationships between data You are primarily creating calculations and statistics Use Access when:Use Excel when:

21 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall21 Relational Database - RDBMS Relational database management systems allow data to be grouped into tables and relationships created between the tables This is much more efficient than the opposite of an RDBMS which is a flat file. Flat files store data in one single file with no special groupings or collections

22 Setting up relationship Database tools -> Relationships Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall22

23 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall23 Using the Relationship Window Add the tables or queries from the Show table dialog box Relationship window Show Table dialog box

24 Primary key (PK) and Foreign Key (FK) Team Conference Team:TeamID (PK) ConferenceID(FK) Conference:ConferenceID (PK) Team School Team:TeamID(PK) SchoolID (FK) School:SchoolD (PK) Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall24

25 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall25 Establishing Relationships In the Relationship window, click and drag a field name from one table to a field name in a related table Click and drag to create a relationship Primary Key Foreign Key

26 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall26 Establishing Relationships Enter the appropriate settings in the Edit relationships dialog box Click Create A join line will appear when one table is joined to another Infinity symbol notes referential integrity has been applied

27 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall27 Referential Integrity Referential integrity ensures that the data in a relational database maintains consistency when the data are updated Enforce Referential Integrity

28 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall28 Creating Tables – From the Create Tab Enter table data directly in fields ◦ From the Create Tab, click Table Use a table template ◦ From the Create Tab, click Table Templates Enter data directly into a table, including the field names Enter field names, data types and descriptions in Table Design View Begin with a template

29 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall29 Creating Tables – From the Import Tab Click the application from which to import or Choose the type of file you wish to import Click the appropriate application button Choose a file type to import

30 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall30 Create Tables – Specifying field names After choosing your method of creation begin implementing the table design ◦ Use CamelCase notation for field names ◦ Specify data types ◦ Establish a primary key ◦ Consider the need for a foreign key Table View Table Design View Add field in Table View

31 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall31 Create Tables – Primary Key Tables are automatically created with an AutoNumber field which serves as the primary key To change the primary key ◦ Select a field in Design View ◦ Click the primary key icon Primary Key Field Primary Key icon

32 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall32 Create Tables – Consider a Foreign Key Customer ID - Primary Key in Customer Table Customer ID –will only appear in one record - there must only be one unique ID per customer Customer ID - Regular Field in Orders Table Customer ID may appear many times – one customer can place many orders Based on the above example: ◦ Customer ID is the foreign key in the Orders table ◦ This is referred to as a One to Many Relationship

33 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall33 Work with Table Views Click the Home tab Click View from the ribbon Table View Options

34 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall34 Work with Properties Field Properties can be used to specify characteristics for individual fields Located in the lower pane of Table Design View Caption property Field Size property

35 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall35 Working with Multiple Tables – Table Relationships The strength of Access is the fact that it is a relational database ◦ This means you can have multiple tables and create relationships between each table ◦ This helps eliminate redundant data Relationship between two tables

36 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall36 Working with Multiple Tables – Referential Integrity Assures that the references to relationships between data is accurate Established when creating the relationship between two tables Enforce Referential Integrity

37 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall37 Working with Multiple tables - Cascades When active, data changed in one table that is in a relationship will be changed in its related tables Can be set when establishing relationships between tables C Cascade update and cascade delete

38 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall38 Indexing Index properties can be set in the Field Properties pane of table Design View Relates the field values to the records that contain the field value Helps speed up some sorting and searching processes Indexed Property

39 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall39 Sharing Data with Excel Data can be imported from Excel ◦ It may be appended to an existing table ◦ It may be used to create a new table Excel icon External Data tab

40 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall40 Sharing Data with Excel Select the Excel file you would like to import Select how you would like to import the data ◦ Appended – added to the end of an existing table ◦ New table – creates a new table in a database ◦ Linked – create a new table that is linked to the source file in Excel Select the Source Select the destination

41 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall41 Establishing Relationships Click the Database tools and click the Relationships icon In the Relationship window, click and drag a field name from one table to a field name in a related table Relationships icon Click and drag to create a relationship

42 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall42 Establishing Relationships Enter the appropriate settings in the Edit relationships dialog box and click Create A join line will appear when one table is joined to another Infinity symbol notes referential integrity has been applied Set referential integrity and cascades

43 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall43 Queries Queries allow us to ask questions about data A record set that answers our question is called a dataset Employees table Dataset resulting from querying table for only employees who are Sales Representatives

44 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall44 Using Query Design View Query Design grid has two panes – the table pane and the design pane Striking the F6 key will toggle you between sections Tables pane Design pane

45 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall45 Select Query Searches associated tables and returns a dataset that matches the query parameters Changes made to the dataset will be reflected in the associated tables

46 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall46 Specifying Criteria in a Select Query Table row – displays the data source. Field row – displays the field name Sort row – enables you to sort the dataset Show row – controls whether or not you see a field in the dataset Criteria row – determines the records that will be selected for display Fields in design grid allow us to specify criteria for the dataset

47 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall47 Specifying Criteria – Currency and Operands Specify criteria with currency ◦ Without the dollar sign ◦ With or without the decimal point Use operands such as: ◦ Less than and greater than ◦ Equal to or not equal to Greater than (>) operand Currency amount entered without dollar sign

48 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall48 Specifying Criteria – Wildcards Asterisk - searches for a pattern that includes any number of characters in the position of the asterisk Question mark - searches for a pattern that includes a single character in the position of the question mark Query with question mark and asterisk wildcard and resulting dataset to specify criteria for the dataset Query with asterisk wildcard and resulting dataset

49 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall49 Specifying Criteria – Null Values IS NULL finds only records that have no value IS NOT NULL excludes Null value records Is Null criteria and resulting dataset IS NOT NULL criteria and partial resulting dataset

50 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall50 Specifying Criteria – AND, OR, NOT OR finds records that can match one or more conditions AND finds records that must match all criteria specified NOT returns the opposite of the specified criteria. Or Criterion and resulting dataset And criterion and resulting dataset

51 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall51 Copy a Query Right click on the query - chose Copy form the shortcut menu Right click and chose paste In the Paste as dialog box, give the query a new name

52 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall52 Run a Query Running or executing a query is done by clicking the Run command Run command

53 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall53 Creating Queries – Using the Query Wizard From the Create tab, choose Query Wizard for the Other group Choose query type from the New Query dialog box Query Wizard icon Select Simple Query Wizard

54 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall54 Creating Queries – Using the Query Wizard: continued Select the Table/Queries to include and choose the desired fields Select aggregate totals needed in the Summary Options box

55 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall55 Creating Queries – Using the Query Wizard: continued Title your query and open in Datasheet View or Query Design View

56 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall56 Understand Large Database Differences Most large companies separate their database into front and back ends ◦ Front end – contains the objects needed to interact with data, but not the tables where the record values reside ◦ Back end – contains the tables where the data resides


Download ppt "Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall1 Exploring Microsoft Office Access 2007 Committed to Shaping the Next Generation of."

Similar presentations


Ads by Google