Presentation is loading. Please wait.

Presentation is loading. Please wait.

Advanced MS-Access for Power Users By Indiana University of Pennsylvania Eric Parks.

Similar presentations


Presentation on theme: "Advanced MS-Access for Power Users By Indiana University of Pennsylvania Eric Parks."— Presentation transcript:

1 Advanced MS-Access for Power Users By Indiana University of Pennsylvania Eric Parks

2 Presentation Goal Make you more efficient at : Identifying and working with Banner data to create queries Writing MS Access queries

3 About IUP 14,000 students; 1,800 employees Largest Member, SSHE 3 campuses; 1 center; 1 academy Doctoral I Clock-hour programs

4 Banner at IUP Implemented five baseline modules and three Web For products 1998-2000 Banner 5.x (soon to be Banner 6) Oracle 9i, OAS (soon to be 9IAS) Sun Solaris

5 The Challenge Problem Statement We were seeing an increase in the number of MS Access users not following proper practices for creating reports and pulling Banner data

6 Topics Getting Started Other ways to get Reports/Data Compacting Poor Practices

7 Getting Started Defining your data 1. Defining your data Understanding your data 2. Understanding your data Presenting your results 4. Presenting your results Creating results 3. Creating results

8

9 Two Popular Methods Determine tables/views needed to create the query Via Banner Client Via Web site developed by IUP

10 Banner Form Within Banner Form with desired data Select the field with data you wish to use in your query and click Help >> Dynamic Help Query

11 The help form shows the field name which will point you to the correct table. FTVACCT is the table the field FTVACCT_ACCT_CODE is stored in.

12 Web Information Resource Web-site created by IUP Broken down by modules Lists tables and views along with comments on the fields

13

14

15

16

17 Primary Keys – Indexes If queries and reports use the indexed fields, then the query runs much faster If you use the indexed field in the underlying table associated with a view, the query will run faster even though views do not have listed indexes

18 Example: SPBPERS Query w/ Indexed field (SPBPERS_PIDM) Pidm is indexed so query zooms to correct record Super fast and efficient Query by non indexed field (SPBPERS_LEGAL_NAME ) Check 1 st record for match – no match then check 2 nd record for match etc until find match May go through MANY records to find match Very slow and resource consuming

19 Would be like trying to find a particular file folder without any labels. You would have to go through each one until you found the one you were looking for. However, if the folders were labeled (indexed) you could directly choose the correct one without having to look at all the other folders. Querying without an index

20 Application Tables (Base/Repeating) Base Table – ex SPBPERS Contains ONE record for each key SPBPERS_PIDM is the Key in this table so the output is one record per person Repeating Table ex SPRADDR Contains multiple records pointing back to a record in a base table

21 Validation Tables Used to verify values for a particular field; Values must be in the table in order to be allowed during data entry into an associated banner form Characteristics of Validation tables Have Code field and Description field The _Code in a field name indicates there may be an associated Validation table For reporting, the code field is often used to obtain the description from the validation table

22 Validation Tables Naming Conventions Example … STVATYP (address type) S -> module student T -> Table V -> Table type of Validation Last 4 characters refer to field name SPRADDR_ATYP_CODE field has an associated validation table named STVATYP

23 Views in depth A view is a subset of one or more tables Views can help optimize your applications The user only needs access to the view, not the underlying tables

24 Table 1 Field 1 Field 2 Field 3 Field 4 Table 2 Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Table 3 Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 VIEW Table 1: Field 1 Table 3: Field 1 Table 1: Field 2 Table 3: Field 2 Table 2: Field 1 Table 3: Field 3 Table 2: Field 4 Table 3: Field 4 Table 2: Field 6

25 sgvstd1 Fields … AS_Student_Data sgvstd2 Fields … Consists of fields from the following tables: Spriden sprtele spraddr sorfolk sgbstdn spbpers stvterm sprhold stvresd Fields…

26 Querying SCT Views with required fields Banner bookshelf or the hardcopy Reporting manual Search for the view name

27 Why Mandatory? In order to obtain information at the level identified by the key attributes, you must supply these conditions when you create your query The mandatory fields are the indexed fields/primary keys; When the indexed fields are used, the query is much more efficient When the mandatory conditions are met, a subset of the data is returned which also speeds the query and reduces stress on the Banner system

28 Example: AS_STUDENT_ENROLLMENT_SUMMARY Mandatory Conditions The following condition must be supplied for the view to report the information: Term Code -- Term_Code_Key

29 Student Listing Tim ParkerPA243-9765199301 Tim ParkerPA243-9765199403 Tim ParkerPA243-9765199501 Allison SharpOR624-8339199501 Anne TurnerIL978-4122199403 Anne TurnerIL978-4122199501 NameStatePhoneTerm Tim ParkerPA243-9765199501 Allison SharpOR624-8339199501 Anne TurnerIL978-4122199501 NameStatePhoneTerm The mandatory condition TERM_CODE_KEY was not supplied, so there is a row for every term in the database The mandatory condition TERM_CODE_KEY = 199501 was supplied, so only the rows in that term were returned

30 Tables vs. Views Which one should you use? Use tables for linear/simple queries Use views for complicated queries involving multiple tables Security Issues A view may be used or created for sensitive data

31

32 Expression Builder Concatenation & or + can be used to join NAME: [LAST_NAME]+", "+[FIRST_NAME]+" "+[MIDDLE_INITIAL] Donlan, Michael J TERM: [TERM_DESC]&" (&[TERM_CODE_KEY]&") Spring 2003 (200250) for term 200250 IIf («expr», «truepart», «falsepart») Local: IIf([STATE1]="PA","IN STATE","OUT OF STATE") If state is PA then IN STATE would be displayed since it is true Left$ («stringexpr», «n») Year: Left$([TERM_CODE_KEY],4) 2002 for term 200250 Format («expr», «fmt») Date: Format([ENROLLMENT_ADD_DATE],"mm/dd/yyyy") Result example 10/10/2002

33 Comparison Operators LIKE Criteria for Last_Name Like Jon* would return Jones, Jonet etc Not equal <> Criteria for field State1 <>"PA" IN Criteria for field Last_Name In (Smith,Jones") Between Criteria for Enrollment_Add_Date Between #4/2/2002# And #4/4/2002# Better way to get values between two dates is: >= #4/2/2002# and < #4/5/2002# AND OR

34

35 Presenting MS Access Data MS Access Reports Word Merge Export HTML MS Excel Tab Delimited file Report Snapshot Reports to another format… Click on File >> Export from the menu and then choose the type Queries to another office product… Click on Tools >> Office Links from the menu

36 Other Reporting Vehicles Job Submission (Banner) Web Report

37 Tables and views can change with each new release. How do we know if there are view or table changes?

38 SCT Table & View Changes The release guide will show you new and changed tables/views. You can do a search using the find & find again buttons if you want to know if a particular table/view has changed.

39 Compacting the Database Compact databases once a week You can also set the db to compact on close Click Tools >> Options then choose the General tab.

40 Query Analyzing The query analyzer can be used to show helpful information such as table indexes, column properties, relationships, parameters etc. Click Tools >> Analyze >> Documenter and choose your query. Clicking the options button allows you to specify what you want to see in the documenter

41 Poor Practices Using MS Access to store and/or update information that is used for business purposes Queries that run for an extended period of time Poor Organization of databases Using Like or In on Key fields

42 Using MS Access to store and/or update information that is used for business purposes Banner should store all operational data and Access should be used to link to that data Data stored in Access would not be updated when a Banner transaction occurs and would therefore become out of date quickly If Access was used to store data, hard drive (or server) storage space would quickly become an issue

43 Queries that run for an extended period of time An extended period of time will vary based on the query; A query returning many records or containing many tables and views will take longer than a simple query Closing your MS Access database does not stop the query from running behind the scenes

44 Poor Organization of databases Good naming conventions on databases allow users to easily identify the database purpose the query or report purpose Copying an entire database to get a single query is not advised; You can import the query or report into your database from another Access database; This prevents multiple copies of the same/similar databases

45 Using Like or In on Key fields Using Like or In dramatically decreases query performance when used on a key field Always specify the key field (such as Term) then if needed use like or in on a secondary field

46 Questions Eric Parks eparks@iup.edu


Download ppt "Advanced MS-Access for Power Users By Indiana University of Pennsylvania Eric Parks."

Similar presentations


Ads by Google