the schema behind the schema – introduction to accela automation database for report writers...

48
The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction to Accela Automation ® Database for Report Writers Kevin Ford Services Consaultant Accela, Inc.

Upload: luke-whelpley

Post on 31-Mar-2015

390 views

Category:

Documents


25 download

TRANSCRIPT

Page 1: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST

The Schema Behindthe Schema

Introduction to Accela Automation® Database for Report Writers

Kevin FordServices ConsaultantAccela, Inc.

Page 2: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Learning Objectives• Basic overview of Accela Automation database schema• Designed for Report Writers beginning to develop

reports for Accela Automation • Foundational knowledge for using database

documentation

Page 3: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

To benefit from this class,You should have . . .

• Basic understanding of database concepts and terms • Functional knowledge of Accela Automation, especially

relating to daily operational activities• Experience with developing reports for permitting

applications

Page 4: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

What is a Database Schema?

• Describes how data is organized• Map of database

– Entities (tables)– Their attributes and relationships

• Represented by Entity Relationship Diagram (ERD)

Page 5: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Types of Data Stored in Accela Automation Database

• Configuration data• Reference data• Transaction data• Log data

Page 6: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Configuration Data - Examples

• CAP types• Application Specific Info fields• Inspection types• Fee formulas• Workflows

Page 7: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Reference Data - Examples

• Address• Parcel• Owner

Page 8: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Transaction Data - Examples

• Information added to CAP– Address

– Work Description

– Fees

– Owner

– Licensed Professionals, etc.

• Activities performed on CAP– Workflow

– Inspections

– Payments, etc.

Page 9: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Log Data - Examples

• User Logins/Logouts• Cashier Session activity• Event Manager Script activity

Page 10: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Reports Use Transaction Data

• Reports usually display transaction data only

Page 11: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Transaction Tables - Overview

• Accela Automation is Record-centric• All daily transactions relate to a Record• B1PERMIT is main table• Almost all transaction tables store

CAP key ID & Agency ID

Page 12: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID

• Primary key for Records• Consists of 3 columns

– B1_PER_ID1– B1_PER_ID2– B1_PER_ID3

• Not the functional Record # or Permit #

Page 13: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID – 3 Columns

• Consists of 3 columns– B1_PER_ID1– B1_PER_ID2– B1_PER_ID3

• Each column is 5 characters

Page 14: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID: B1_PER_ID1

• 2 digit year + Category Code• Example: ‘08BCA’

Unique Category Code is assigned to each CAP

Group & Typewhen CAP types are

configured

Page 15: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID: B1_PER_ID2

• Value is always ‘00000’

Page 16: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID: B1_PER_ID3

• Left padded sequence number

• 5 digits, e.g. ‘00001’

Page 17: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

CAP Key ID vs. ALT ID

• CAP Key ID not visible to users• Alternative ID used as functional CAP #

– Permit Number, Case Number, License Number

• Example: Permit Number BCA2007-0001ALT ID: ‘BCA2007-0001’

CAP Key ID:

B1_PER_ID1 = ’07BCA’

B1_PER_ID2 = ‘00000’

B1_PER_ID3 = ‘00005’

Page 18: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Alternative ID in Use

Alt ID is used for “Application No.” and “Permit ID”

Page 19: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Agency ID

• Column name: SERV_PROV_CODE

• Distinguishes different agencies’ data in Accela Automation

Page 20: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Agency ID and CAP Key ID on All Transaction Tables

• All transaction tables have Agency ID & CAP Key ID columns SERV_PROV_CODEB1_PER_ID1B1_PER_ID2B1_PER_ID3

• Exceptions – No CAP Key ID– F4RECEIPT table – receipt data

– F4INVOICE table – invoice data

Page 21: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Agency ID & CAP Key ID in Transaction Tables

Page 22: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Primary Key: Agency ID & CAP Key ID

• Compound primary key for main permit table B1PERMITSERV_PROV_CODEB1_PER_ID1B1_PER_ID2B1_PER_ID3

• Part of primary key for other transaction tables

Page 23: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

B1PERMIT: Primary Key

Primary key symbols

Page 24: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

B3PARCEL: Primary Key

Page 25: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Foreign Key: Agency ID & CAP key ID

• Foreign Key in one table references Primary Key in another table

• Transaction tables link to main B1PERMIT table by foreign key

• Compound foreign key:SERV_PROV_CODEB1_PER_ID1B1_PER_ID2B1_PER_ID3

Page 26: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Example: B3PARCEL to B1PERMIT

B3PARCEL(foreign key) B1PERMIT

(primary key)

Page 27: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Hands-on:Identifying Primary & Foreign Keys

1. Open Accela Automation ERD

2. Find another table that has these columns:SERV_PROV_CODEB1_PER_ID1B1_PER_ID2B1_PER_ID3

3. What columns make up the primary key?

4. What columns make up the foreign key?

Page 28: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Required Joins: Agency ID & CAP Key ID

Example from Crystal Report’s Database Expert showing Links

Page 29: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

ALT ID: Alternative ID

• Used as functional CAP #• ALT ID is stored in main B1PERMIT table

– B1_ALT_ID column

• No other transaction tables store ALT IDExceptions:

• ACCOUNTING_AUDIT_TRAIL• GPART_TRANSACTION

Page 30: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

ALT ID: Alternative ID

• Most reports display the ALT ID, e.g. Permit Number

• Most report queries must include B1PERMIT table

Page 31: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Example: Payments Collected Report

Payment data from F4PAYMENT table

Permit Number from B1PERMIT table

Page 32: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Permit Number Parameter

• Used to select report data for a specific permit• ALT ID (permit #)

– Used to select data from B1PERMIT– Cannot be used directly against other transaction tables

Page 33: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Use Joins to Select Data

Select the permit’s B1PERMIT record using ALT ID parameter

Get the permit’s other data by joining tables

Page 34: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Custom Fields - Common Types

• Application Specific Info• Task Specific Info• APO Custom Attributes• People Custom Attributes

Page 35: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Custom Fields – Implementation in Schema

• One custom field value in one record• Primary key – Field Label

– Application Specific Info– Task Specific Info

• Primary key – Attribute Name – APO custom attribute– People custom attribute– Structure custom attribute

Page 36: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Custom Field Example: Application Specific Info

Data on CAP – 8 fields

Page 37: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Custom Field Example: Application Specific Info

Data in BCHCKBOX table – 8 records

Page 38: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Custom Fields: Database Functions

• FN_GET_APP_SPEC_INFO• FN_GET_TASK_SPEC_INFO_CS2• FN_GET_ASI_TABLE_VALUE• FN_GET_ADDRESS_ATTRIBUTE• FN_GET_PARCEL_NBR_ATTRIBUTE• FN_GET_CONTACT_ATTRIBUTE

Page 39: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Deleted and Disabled Records

• Soft Delete– Used in transaction data

– Example: Workflow History (Supervisor function)

– Flagged as (soft) deleted in REC_STATUS column with value of ‘I’• Deleted record: REC_STATUS = ‘I’• Non-deleted record: REC_STATUS = ‘A’

Page 40: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Deleted and Disabled Records

• Disabled Record– Used in Configuration or Reference Data

– Flagged as disabled in REC_STATUS column with value of ‘I’• Disabled record: REC_STATUS = ‘I’• Enabled record: REC_STATUS = ‘A’

Page 41: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Common Transaction Tables

CAP & Transaction Data Table

CAP basic information B1PERMIT, BPERMIT_DETAIL

Application Specific Information BCHCKBOX

Contacts B3CONTACT

Fees F4FEEITEM

Inspections G6ACTION

Licensed Professionals B3CONTRA

Owner B3OWNERS

Parcel B3PARCEL

Property Address B3ADDRES

Workflow GPROCESS

Page 42: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Common Configuration Tables

Configuration Data Table

Agency information RSERV_PROV

Application & Task Specific Info RCHCKBOX

CAP Types R3APPTYP

Fees RFEEITEM

Inspections RINSPTYP

Users PUSER, G3STAFFS

Workflows SPROCESS, R3STATYP

Page 43: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Common Reference Tables

Reference Data Table

Addresses L3ADDRES

Parcels L3PARCEL

Owners L3OWNERS

Contacts G3CONTACT

Licensed Professionals RSTATE_LIC

Page 44: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Finding Tables for Data

• Data Dictionary of Common Accela Automation Fields• Vantage360 Portlet Data Mapping spreadsheet• Accela Automation Data Dictionary spreadsheet

Page 45: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Hands-on:Data Dictionary of Common Accela Automation Fields

1. Open Data Dictionary of Common Accela Automation® Fields

2. Go to Table of Contents and find Workflow– What is the name of the table that stores workflow data?

3. Name 2 tables where receipt number is stored

Page 46: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

How to Determine Table Type

• Look for CAP Key ID

• Look up ERD

Page 47: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

How to Determine Table Type

• Table name prefix

Transaction tables usually have prefix of . . .

Configuration & Reference tables usually have prefix of . . .

B R

F L

G P

X (Cross-reference tables) S

Page 48: The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers mm.dd.yy, City, ST The Schema Behind the Schema Introduction

Accela Automation Database Reference Documents

• ERD (Entity Relationship Diagram)• Data Dictionary• Data Dictionary of Common AA Fields• Accela Vantage360 Portlet Data Mapping Spreadsheet• Database Function Reference Guide