The Schema Behind the Schema – Introduction to Accela Automation Database for Report Writers...

Preview:

Citation preview

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.

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

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

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)

Types of Data Stored in Accela Automation Database

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

Configuration Data - Examples

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

Reference Data - Examples

• Address• Parcel• Owner

Transaction Data - Examples

• Information added to CAP– Address

– Work Description

– Fees

– Owner

– Licensed Professionals, etc.

• Activities performed on CAP– Workflow

– Inspections

– Payments, etc.

Log Data - Examples

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

Reports Use Transaction Data

• Reports usually display transaction data only

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

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 #

CAP Key ID – 3 Columns

• Consists of 3 columns– B1_PER_ID1– B1_PER_ID2– B1_PER_ID3

• Each column is 5 characters

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

CAP Key ID: B1_PER_ID2

• Value is always ‘00000’

CAP Key ID: B1_PER_ID3

• Left padded sequence number

• 5 digits, e.g. ‘00001’

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’

Alternative ID in Use

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

Agency ID

• Column name: SERV_PROV_CODE

• Distinguishes different agencies’ data in Accela Automation

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

Agency ID & CAP Key ID in Transaction Tables

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

B1PERMIT: Primary Key

Primary key symbols

B3PARCEL: Primary Key

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

Example: B3PARCEL to B1PERMIT

B3PARCEL(foreign key) B1PERMIT

(primary key)

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?

Required Joins: Agency ID & CAP Key ID

Example from Crystal Report’s Database Expert showing Links

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

ALT ID: Alternative ID

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

• Most report queries must include B1PERMIT table

Example: Payments Collected Report

Payment data from F4PAYMENT table

Permit Number from B1PERMIT table

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

Use Joins to Select Data

Select the permit’s B1PERMIT record using ALT ID parameter

Get the permit’s other data by joining tables

Custom Fields - Common Types

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

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

Custom Field Example: Application Specific Info

Data on CAP – 8 fields

Custom Field Example: Application Specific Info

Data in BCHCKBOX table – 8 records

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

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’

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’

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

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

Common Reference Tables

Reference Data Table

Addresses L3ADDRES

Parcels L3PARCEL

Owners L3OWNERS

Contacts G3CONTACT

Licensed Professionals RSTATE_LIC

Finding Tables for Data

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

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

How to Determine Table Type

• Look for CAP Key ID

• Look up ERD

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

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

Recommended