Skip to main content

Entity-Relationship Model — SQL MI Ground Truth

Source

Extracted directly from Azure SQL Managed Instance, database PS608 (Watermark TPO / MWFI Holdings tenant), March 2026. This replaces the earlier PB DataWindow approximation which only captured ~170 tables referenced by PowerBuilder UI code. The actual database contains 585 base tables and 258 views.

Schema Overview

MetricPB Extraction (old)SQL MI Ground Truth
Base tables~170585
Views2258
Primary key constraints550
Foreign key constraints283 (313 FK column mappings)
SQL triggers45
Unique constraints13
Default constraints7
Table-valued functions7
Stored procedures30 (mostly legacy dt_* source control)

The PB extraction only surfaced tables touched by DataWindow SQL. The true schema is 3.4x larger — entire subsystems like B2B pricing integration (psb2b_*), ULDD delivery (psuldd_*), bid packaging (psbid_*, rmcat_bidpkg_*), SFAS hedge accounting (rmcat_sfas_*), and servicing valuation (rmcat_svcng_*) were invisible from the UI layer.


Table Prefix Taxonomy

All 585 tables organized by naming convention. Prefixes reveal the module architecture.

Core Business — pscat_* (115 tables)

The "PowerSeller Catalog" — master data and transactional tables for trading, pooling, pricing, pipeline management, and document tracking.

SubdomainExample TablesCount
Instruments & Pricingpscat_instruments (102 cols), pscat_instrument_dde_links, pscat_inst_dde_links_multi, pscat_dde_result_names, pscat_rate_sheet_configuration~12
Tradingpscat_trades (66 cols), pscat_trade_counterparties, pscat_trade_arms, pscat_trade_builder, pscat_pair_offs, pscat_trades_best_efforts~18
Pools & Securitiespscat_pools (110 cols), pscat_securities (41 cols), pscat_pool_fee_overrides, pscat_pool_security_relation~12
Programs & Commitmentspscat_programs, pscat_master_commitments, pscat_master_agreements, pscat_guarantors~20
Reservationspscat_reservations, pscat_reserv_loan_rel, pscat_reserv_roll_rel, pscat_reservation_gfee~12
Pipeline & Docspscat_loan_statuses, pscat_loan_stages, pscat_documents, pscat_loans_documents_relation~15
Reference Datapscat_companies, pscat_contacts, pscat_sources, pscat_conforming_loan_limits~10
Securitization Rulespscat_securitization_rules, pscat_guar_sec_rules_relation, pscat_inv_inst_sec_rule_rel~8
Margin Managementpscat_margin_activity, pscat_margin_adjust, pscat_margin_tracking~4

Loan Pipeline — loan* (9 tables)

The loan lifecycle is modeled as parallel "snapshot" tables sharing an identical 157-column schema.

TableColsPurpose
loan157Active pipeline — current state of each loan
loan_inquiry157Rate-lock inquiry / what-if copy
loan_notional157Notional (hypothetical) loans for risk modeling
loan_modifications157Loan modification snapshots
loan_shipped157Purchased/settled loans — final state
loan_history150Historical snapshots on status changes
loan_extended2Extension columns (currently just unused)
loan_history_errors4Fallout processing error log
loan_user7Per-loan document tracking status

Risk Management — rmcat_* (178 tables)

The largest module by table count. Covers position analysis, best execution, hedge optimization, SFAS hedge accounting, fallout analysis, and MBS pricing.

SubdomainExample TablesCount
Profile Configurationrmcat_profile_names, rmcat_setup_profile_parameters, rmcat_setup_risk_parameters, rmcat_segment_names~12
Loan/Trade Analysisrmcat_loan (136 cols), rmcat_trades (79 cols), rmcat_bestex_analysis (67 cols)~12
Best Execution (BX)rmcat_bx_profile_names, rmcat_bx_setup_parameters, rmcat_bx_todays_prices~14
SFAS Hedge Accountingrmcat_sfas_loans, rmcat_sfas_trades, rmcat_sfas_sim_asset_groups, rmcat_sfas_parameters~22
Pricing & Par Ratesrmcat_todays_prices, rmcat_par_rates, rmcat_dpcs, rmcat_mbs_dealer_prices~12
Bid Packagingrmcat_bidpkg_analysis, rmcat_bidpkg_investor_bids, rmcat_bidpkg_inv_price_grids~14
Fallout Analysisrmcat_fa_profiles, rmcat_fa_details, rmcat_fa_loan_stats, rmcat_fa_closing_ratios~10
Servicing Valuationrmcat_svcng_contracts, rmcat_svcng_packets, rmcat_svcng_msr_prices~14
Adjustmentsrmcat_adj_agg_values_* (10 variants), rmcat_adj_ind_values_* (10 variants)~20
Price Adjustmentsrmcat_price_adjustment_groups, rmcat_price_adjustments, rmcat_price_adjustment_values~6
Position Reconciliationrmcat_risk_pos_recon, rmcat_risk_pos_recon_arc, rmcat_risk_pos_recon_prior~12
Historyrmcat_ra_history_loans (137 cols), rmcat_ra_history_trades (80 cols)~8
Sec 105/109rmcat_sec105, rmcat_sec109 and archive/prep variants~6
Rate Conesrmcat_rate_cones, rmcat_rate_cone_values~2

Risk Temp/Working — rmtmp_* (40 tables)

Scratch tables used during risk analysis calculations. Populated and cleared during processing runs.

Risk Archives — rmarc_* (7 tables)

Archived best execution, inquiry, and notional analysis results plus historical price/par-rate/yield data.

Risk Reports — rmrep_* (8 tables)

Pre-computed report data for position detail, proxy hedging, benchmark factors, and loan/trade preparation.

Risk Report SFAS — rmrpt_* (8 tables)

SFAS loan/trade volume reporting (current, prior, archived, summarized).

Risk User — rmusr_* (5 tables)

User-specific best execution output: all feasible executions, best execution, last/next top executions.

Platform / System — pxcat_* (105 tables)

Security, configuration, UI metadata, macros, import/export, and the Visual Metadata Designer (VMD) query builder.

SubdomainExample TablesCount
Users & Securitypxcat_users, pxcat_groups, pxcat_groups_users, pxcat_password_history, pxcat_login_attempts~10
Menus & Controlspxcat_menus, pxcat_controls, pxcat_menus_controls, pxcat_groups_menus~6
Import/Exportpxcat_external_file_maps, pxcat_external_db_maps, pxcat_external_xml_maps, pxcat_column_mappings~18
VMD Query Builderpxcat_vmd_queries, pxcat_vmd_selects, pxcat_vmd_wheres, pxcat_vmd_joins, pxcat_vmd_functions~25
Data Pipelinespxcat_vmd_data_pipelines, pxcat_vmd_data_pipeline_cols, pxcat_vmd_pipe_history~8
Macrospxcat_macros, pxcat_macro_modules, pxcat_macro_parameters~8
Referencepxcat_states, pxcat_counties, pxcat_holidays, pxcat_site_info~10
Validationpxcat_acceptable_values, pxcat_alarm_values, pxcat_conversion_values~10
Metadatapxcat_tables, pxcat_table_columns, pxcat_syntax_tables, pxcat_database_settings~8

B2B Pricing Integration — psb2b_* (37 tables)

Automated pricing feeds from GSEs and investors. One psb2b_pricing_* table per counterparty.

Table PatternPurpose
psb2b_pricing_fnm / _freFannie Mae / Freddie Mac MBS pricing
psb2b_pricing_ahm / _mh / _phmVarious investor whole-loan pricing
psb2b_pricing_jpmcb / _usb / _truistBank counterparty pricing
psb2b_pricing_cal / _mrc / _radianCorrespondent/MI pricing
psb2b_bubd_freFreddie Mac buy-up/buy-down grids
psb2b_products / _products_fnm / _products_aotProduct definitions per entity
psb2b_instr_prod_rel / _inv_instr_prod_relInstrument-to-product mappings
psb2b_income_limitsAMI income limits for affordable housing

ULDD — psuldd_* (19 tables)

Uniform Loan Delivery Dataset — structured data for GSE loan delivery.

TableColsPurpose
psuldd_loan_closed150Full loan data for closed delivery
psuldd_borrower94Borrower demographics, HMDA data
psuldd_property92Property details for delivery
psuldd_borrower_ps640467PS-specific borrower extension
psuldd_loan_arm29ARM-specific delivery fields
psuldd_loan_servicing31Servicing transfer data
psuldd_loan_party13Loan party roles
OthersClosing costs, escrow, down payments, investor features

Bid Management — psbid_* (8 tables)

Whole-loan bid packaging: loan mapping to bids, confirmations, payup tracking.

Archive — psarc_* (20 tables)

Archived copies of core trading tables (psarc_trades, psarc_pools, psarc_securities, etc.) with identical schemas plus archive timestamps.

PowerFill — pfill_* (4 tables)

Synthetic trade optimization for pool fill: carry cost tables, synthetic trade base, and the PowerFill guide rankings.

PS Temp — pstmp_* (4 tables)

Working tables for fallout processing and archive exclusion.

PS User — psusr_* (5 tables)

User-workspace tables for ASC 815 (Sec 105) analysis and trade valuation options.

Watermark TPO — wtpo_* (2 tables)

Customer-specific tables for E11tec fraud detector integration: investor results and loan-level detector output.

Other — supp_*, ps_*, pbcat*, dtproperties (12 tables)

PrefixCountPurpose
pbcat*5PowerBuilder catalog metadata (legacy)
ps_core_stats1Fallout analysis core statistics
psrep_*1Margin report blocks
pxarc_*1Activity log archive
supp_tbl_companies1Supplemental company list
dtproperties1SQL Server diagram properties
Foreign_Key_Table1FK metadata view

The loan Table — 157 Columns

The most important table in the system. Every active pipeline loan is a row. The same schema is replicated across loan_inquiry, loan_notional, loan_modifications, and loan_shipped.

Identification & Keys

ColumnTypeDescription
loan_idvarchar(30)PK — Loan identifier
agency_loan_numbervarchar(30)Agency (FHLMC/FNMA) loan number
mers_mortgage_idvarchar(30)MERS registration ID
fha_case_numbervarchar(15)FHA case number
servicing_numbervarchar(20)Servicing system loan number
universalloanidentifiervarchar(45)CFPB Universal Loan Identifier
mkt_investor_loan_numbervarchar(30)Investor-assigned loan number
mkt_commitment_numbervarchar(30)Investor commitment number
mkt_confirmationvarchar(30)Trade confirmation number
bid_idnumeric(12,0)Link to bid package

Loan Amounts

ColumnTypeDescription
loan_amountnumeric(12,2)Current loan amount
orig_loan_amountnumeric(11,2)Original loan amount
baseloanamountnumeric(12,2)Base loan amount (before MI/fees)
issue_date_prin_balnumeric(11,2)Principal balance at issue date
unsched_prin_balnumeric(11,2)Unscheduled principal balance
purchase_pricenumeric(11,2)Property purchase price
appraised_valuenumeric(11,2)Appraised value
annualincomenumeric(16,2)Borrower annual income
borrower_incomenumeric(10,2)Borrower income

Rates & Pricing

ColumnTypeDescription
note_ratenumeric(9,6)Current note rate
orig_interest_ratenumeric(6,4)Original interest rate
discount_pointsnumeric(6,3)Discount points
buy_pricenumeric(8,5)Buy/sell price
srp_paidnumeric(8,5)Service release premium
mkt_sale_pricenumeric(9,6)Investor sale price
arm_marginnumeric(6,3)ARM margin
life_of_loan_rate_capnumeric(6,4)Lifetime rate cap
rate_cap_percentnumeric(9,6)Periodic rate cap
percent_increasenumeric(6,4)Rate change percent

Dates

ColumnTypeDescription
application_datedatetimeLoan application date
lock_datedatetimeRate lock date
lock_expiration_datedatetimeRate lock expiration
close_datedatetimeActual closing date
estimated_close_datedatetimeExpected closing date
note_datedatetimeNote date
disbursement_datedatetimeDisbursement date
mkt_lock_datedatetimeInvestor lock date
mkt_lock_expiration_datedatetimeInvestor lock expiration
mkt_purchase_datedatetimeInvestor purchase date
mkt_shipped_datedatetimeShipping date
first_adjustment_datedatetimeARM first adjustment
maturity_pi_datedatetimeMaturity date
llpa_eligible_datedatetimeLLPA eligibility date
thirdpartyloanacquisitiondatedatetimeThird-party acquisition date
import_los_datedatetimeLOS import timestamp
import_servicing_datedatetimeServicing import timestamp
time_stampdatetimeLast modification timestamp
mod_datedatetimeModification effective date

Borrower Information

ColumnTypeDescription
borr_first_name / last_name / mid_name / suffixvarcharPrimary borrower name
borr_social_securityvarchar(11)Borrower SSN
borr_credit_scorenumeric(4,0)Borrower credit score
coborr_first_name / last_name / mid_name / suffixvarcharCo-borrower name
coborr_social_securityvarchar(11)Co-borrower SSN
coborr_credit_scorenumeric(4,0)Co-borrower credit score
coborr2_* / coborr3_* / coborr4_*varcharAdditional co-borrowers (name + SSN)
loanlevelcreditscorevalueintRepresentative credit score
first_time_borrowervarchar(5)First-time homebuyer flag
selfemployedindicatorvarchar(5)Self-employed flag
debt_to_income_rationumeric(6,3)DTI ratio

Property

ColumnTypeDescription
property_street_addressvarchar(40)Street address
property_cityvarchar(30)City
statevarchar(2)State code
property_zip_codevarchar(10)ZIP code
property_countyvarchar(30)County name
statecountycodevarchar(5)FIPS state+county
property_typevarchar(20)Property type
num_of_unitsnumeric(3,0)Number of units
occupancy_codevarchar(20)Occupancy type
census_tractvarchar(11)Census tract
msa_numbervarchar(12)MSA number

Loan Characteristics

ColumnTypeDescription
loan_typevarchar(30)Conv/FHA/VA/USDA
purpose_codevarchar(30)Purchase/Refinance/etc.
amort_typevarchar(25)Fixed/ARM/etc.
amortization_termnumeric(3,0)Amortization term (months)
orig_termnumeric(3,0)Original term
remaining_termnumeric(3,0)Remaining term
product_codevarchar(100)Product code
ltvnumeric(7,3)Loan-to-value ratio
cltvnumeric(7,3)Combined LTV
baseltvnumeric(7,4)Base LTV
index_codevarchar(100)ARM index code
cash_out_indicatorvarchar(5)Cash-out refinance flag
refinancecashouttypevarchar(30)Cash-out refinance type
interestonly / int_onlyvarchar(5)Interest-only flag
subordinate_financing_flagvarchar(5)Subordinate financing
buydown_flagvarchar(5)Rate buydown
flood_insurance_flagvarchar(3)Flood zone indicator
loanaffordableindicatorvarchar(5)Affordable housing flag
conformingloanlimitindicatorvarchar(5)Conforming limit flag
jumboindicatorvarchar(5)Jumbo loan flag
highbalanceindicatorvarchar(5)High-balance conforming
enoteindicatorvarchar(5)eNote flag
assumableindicatorvarchar(5)Assumable flag
LienPriorityTypevarchar(20)Lien position
doctypevarchar(30)Documentation type

Insurance / MI

ColumnTypeDescription
mi_coverage_percentnumeric(3,0)MI coverage percentage
mi_financed_single_premnumeric(8,2)Single premium MI amount
upfront_mip_amt / annual_mip_amtnumeric(10,2)FHA MIP amounts
upfront_mip_rate / annual_mip_ratenumeric(9,6)FHA MIP rates
loss_mit_flagvarchar(3)Loss mitigation flag
ami_percentnumeric(5,2)AMI percentage

Investor / Marketing

ColumnTypeDescription
instrument_namevarchar(30)FK → pscat_instruments
pool_namevarchar(30)FK → pscat_pools
source_namevarchar(30)Loan source/channel
packet_namevarchar(30)Servicing packet assignment
mkt_investorvarchar(30)Investor name
mkt_marketing_programvarchar(30)Marketing program
mkt_master_commitmentvarchar(30)Master commitment
asc_best_efforts_flagvarchar(1)Best efforts delivery flag
curr_statusvarchar(50)Current pipeline status
branchvarchar(30)Originating branch
loan_officervarchar(50)Loan officer
investorprogramvarchar(50)Investor program
investorcollateralprogramidvarchar(35)Collateral program ID
down_pymt_assistvarchar(5)Down payment assistance

Import Tracking

ColumnTypeDescription
import_los_sourcevarchar(30)LOS import source identifier
import_los_datedatetimeWhen imported from LOS
import_servicing_sourcevarchar(30)Servicing import source
import_servicing_datedatetimeWhen imported from servicing
nmls_id_companyvarchar(30)Company NMLS ID
nmls_id_lovarchar(30)Loan officer NMLS ID

Payments

ColumnTypeDescription
curr_pi_pymtnumeric(10,2)Current P&I payment
curr_piti_pymtnumeric(10,2)Current PITI payment
orig_pi_pymtnumeric(10,2)Original P&I payment
curr_pi_datedatetimeCurrent P&I date
orig_pi_datedatetimeOriginal P&I date
escrowindicatorvarchar(5)Escrow flag

GSE Program Identifiers

ColumnTypeDescription
aus_enginevarchar(20)AUS engine (DU/LP)
aus_resultsvarchar(30)AUS recommendation
refinanceprogramidentifiervarchar(40)Refi program (HARP, etc.)
projectlegalstructuretypevarchar(15)Condo project type
projectattachmenttypevarchar(8)Attached/detached
constructionmethodtypevarchar(20)Construction method
loanprogramidentifiervarchar(60)Loan program ID
studentloancashoutrefivarchar(5)Student loan cash-out flag
mersorigmortgageeofrecordindvarchar(5)MERS mortgagee of record
appraisal_waiver_flagvarchar(5)Appraisal waiver
mh_typevarchar(20)Manufactured housing type

Core Entity ER Diagrams

Trading Domain

Pricing Domain

Risk Management Domain

Pipeline & Commitment Domain

Securitization Rules Domain


Foreign Key Relationship Map

The database has 283 foreign key constraints with 313 FK column mappings. These cluster around a small number of hub entities.

Hub Entities (Most Referenced)

FK Relationship Groups

pscat_instruments (referenced by ~20 tables)

The central entity of the pricing/trading system. Referenced by:

  • pscat_trades.instrument_name — trades are for an instrument
  • pscat_securities.instrument_name — securities belong to an instrument
  • pscat_inst_dde_links_multi.instrument_name — pricing data links
  • pscat_instrument_dde_links.instrument_name — DDE links
  • pscat_inst_dde_rslt_names_rel.instrument_name — result name associations
  • pscat_programs_instruments_rel.instrument_name — program membership
  • pscat_programs_inv_inst_rel.instrument_name — investor instrument mapping
  • pscat_inv_inst_sec_rule_rel.instrument_name — securitization rules
  • pscat_trade_builder.instrument_name — trade builder templates
  • pscat_rm_inv_delivery_win.instrument_name — delivery windows
  • pscat_rm_bestex_inst_names.instrument_name — BestEx instrument list
  • pscat_bestefforts_ins_pgm_inv.instrument_name — best efforts mapping
  • pscat_best_efforts_inst_rel_071.instrument_name — best efforts (v071)
  • pscat_trade_arms.instrument_name — ARM trade details
  • pscat_treasury_dde_links_multi.instrument_name — treasury pricing
  • rmcat_instrument_par_rate_rel.instrument_name — par rate mapping
  • rmcat_setup_instr_prog_inv.instrument_name — risk setup
  • rmcat_sfas_group_inst_rel.instrument_name — SFAS groups
  • rmcat_inst_benchmark_values.instrument_name — benchmarks

pscat_trade_counterparties (referenced by ~15 tables)

  • pscat_trades.trade_counterparty_name — trade execution
  • pscat_trade_builder.trade_counterparty_name — trade templates
  • pscat_margin_activity.counterparty_name — margin calls
  • pscat_margin_tracking.trade_counterparty_name — margin monitoring
  • pscat_trade_cntrprtys_doc_rel.counterparty_name — documents
  • pscat_trade_cp_sec_rule_rel.counterparty_name — securitization rules

pscat_guarantors (referenced by ~12 tables)

  • pscat_instruments.guarantor_name — instrument guarantor
  • pscat_pools.guarantor_name — pool guarantor
  • pscat_programs.guarantor_name — program guarantor
  • pscat_master_commitments.guarantor_name — commitment guarantor
  • pscat_master_agreements.guarantor_name — agreement guarantor
  • pscat_reservations.guarantor_name — reservation guarantor
  • pscat_securities.guarantor_name — security guarantor
  • pscat_guar_doc_relation.guarantor_name — document requirements
  • pscat_guar_inst_terms_rel.guarantor_name — instrument terms
  • pscat_guar_sec_rules_relation.guarantor_name — securitization rules
  • pscat_instr_product_name_rel.guarantor_name — product naming

pscat_pools (referenced by ~10 tables)

  • pscat_trades_pools_relation.pool_name — trade-to-pool designation
  • pscat_pool_security_relation.pool_name — pool-to-security
  • pscat_pools_sec_rule_rel.pool_name — securitization rules
  • pscat_pools_ach.pool_name — ACH banking
  • pscat_pools_certificate.pool_name — certificates
  • pscat_pool_fee_overrides.pool_name — fee overrides
  • pscat_states.pool_name — state concentration limits
  • pscat_pool_note_rate_cpn_adj.pool_name — note rate adjustments

pscat_trades (referenced by ~8 tables)

  • pscat_pair_offs.trade_id — pair-off designations
  • pscat_trades_pools_relation.trade_id — pool designations
  • pscat_trades_securities_rel.trade_id — security designations
  • pscat_trades_assignments.trade_id — trade assignments
  • pscat_trades_best_efforts.trade_id — best efforts details
  • pscat_trades_documents_rel.trade_id — documents
  • pscat_trades_rollover_rel.trade_id — rollovers
  • pscat_trade_shipment_relation.trade_id — shipment tracking
  • pscat_trade_cash_grid.trade_id — cash window pricing

rmcat_profile_names (referenced by ~10 tables)

  • rmcat_loan.profile_name — loan analysis
  • rmcat_trades.profile_name — trade analysis
  • rmcat_setup_profile_parameters.profile_name — configuration
  • rmcat_setup_segment_names.profile_name — segments
  • rmcat_setup_instr_prog_inv.profile_name — instruments
  • rmcat_bestex_analysis.profile_name — best execution results
  • rmcat_sfas_loans.profile_name — SFAS analysis
  • rmcat_sfas_trades.profile_name — SFAS analysis
  • rmcat_margin_tracking.profile_name — margin tracking

pscat_reservations (referenced by ~8 tables)

  • pscat_reserv_loan_rel.reservation_id — loan assignments
  • pscat_reserv_cancellation_rel.reservation_id — cancellations
  • pscat_reserv_consolidation_rel.reservation_id — consolidations
  • pscat_reserv_roll_rel.reservation_id — rollovers
  • pscat_reserv_merge_rel.reservation_id — merges
  • pscat_reservation_affiliates.reservation_id — affiliates
  • pscat_reservation_gfee.reservation_id — guarantee fees

pscat_securitization_rules (referenced by ~8 tables)

Applied across multiple entity types — guarantors, instruments, pools, master commitments, programs, trade counterparties, and master agreements.


Views Inventory (258 views)

Views by Prefix

PrefixCountPurpose
v_*~60Position/gain summary views (hedge, loan, trade, timeslot)
psview_uld4a_* / psview_uld5_*~50ULDD v4a and v5 delivery views
rmcatv_*~20Risk analysis aggregate views
rmrepv_*~15Risk reporting views (MBS, DPC, MTM)
psusrv_*~20User-facing data views (risk, notional, rate sheets)
pxcatv_*~15System metadata views (FK columns, PKs, triggers)
psrepv_*~8Trade/security/pool summary reporting
wtpov_*~6Investor export views (Citi, Citizens, Truist, RBB)
rmtmpv_*~3Temporary calculation views
psvmd_*1VMD fallout study base
pscatv_*1RM investor instruments
psulddv_*1ULDD table research
loan_view1Base loan view
psv_*1Pooled loan table

Key Views

ViewPurpose
loan_viewBase view over loan table
v_pos_sum / v_pos_sum_segrollPosition summary with segment rollup
v_loan_and_loan_shipped / v_loan_loan_shippedCombined active and shipped loans
rmcatv_loan_analysisRisk analysis enriched loan view
rmcatv_bestex_analysisBest execution analysis view
psview_uldd_loansULDD-formatted loan data
psrepv_trade_summaryTrade position summary
psrepv_security_summarySecurity/pool summary
psusrv_notional_analysisNotional analysis user view
pxcatv_foreign_key_columnsFK metadata introspection
wtpov_investor_export_baseBase view for investor exports

Triggers Inventory (45 triggers)

By Operation Type

PrefixCountOperationPurpose
tad_*7AFTER DELETECascade deletes on reference data
tai_*5AFTER INSERTAuto-populate fields on loan insert
taiud_*1AFTER INSERT/UPDATE/DELETEDDE result name sync
tau_*8AFTER UPDATEStatus sync, timestamp updates
tbi_*3BEFORE INSERTValidate DDE link inserts
tbu_*3BEFORE UPDATEValidate DDE link updates
ti_*7INSERTAuto-populate delivery windows, pair-offs
tu_*8UPDATECascade updates on instruments, trades

Triggers by Table

TableTriggersDescription
loantai_loan, tau_loanAfter insert/update — status sync, timestamp
loan_inquirytai_loan_inquiry, tau_loan_inquiryInquiry pipeline sync
loan_notionaltai_loan_notional, tau_loan_notionalNotional loan sync
pscat_instrumentstad_pscat_instruments, tu_pscat_instrumentsCascade instrument changes
pscat_tradestu_pscat_tradesCascade trade updates
pscat_trade_counterpartiestu_pscat_trade_countrpartCascade counterparty updates
pscat_pair_offsti_pscat_pair_offs, tu_pscat_pair_offsPair-off balance tracking
pscat_dde_result_namestad_pscat_dde_result_names, taiud_pscat_dde_result_namesDDE result sync
pscat_loan_statusestad_pscat_loan_statusesStatus cascade
pscat_cash_grid_syntaxtad_pscat_cash_grid_syntaxCash grid cleanup
pscat_rm_inv_delivery_winti_pscat_rm_inv_delivery_win, tu_pscat_rm_inv_delivery_winDelivery window sync
pxcat_dde_applicationstad_pxcat_dde_applicationsDDE app cleanup
pxcat_userstad_pxcat_usersUser cleanup cascade
psusr_trd_val_optionstai_psusr_trd_val, tau_psusr_trd_valTrade valuation sync
pscat_instrument_dde_linkstbi_dde_links, tbu_dde_linksDDE link validation
pscat_inst_dde_links_multitbi_dde_links_multi, tbu_dde_links_multiMulti-coupon link validation
pscat_treasury_dde_links_multitbi_treasury_dde_links, tbu_treasury_dde_linksTreasury link validation
rmcat_par_rate_basistad_rmcat_par_rate_basisPar rate cleanup
rmcat_segment_nametad_rmcat_segment_nameSegment cleanup
rmcat_mbs_inst_delivery_posti_rmcat_mbs_inst_delivery_pos, tu_rmcat_mbs_inst_delivery_posMBS delivery sync
rmcat_msr_pricesti_rmcat_msr_prices, tu_rmcat_msr_pricesMSR pricing sync
rmcat_bidpkg_investor_instti_rmcat_bidpkg_investor_inst, tu_rmcat_bidpkg_investor_instBid package sync
pscat_settlement_datesti_single_settlement_dateSettlement date validation
Various pxcat_user_preference*tau_user_preference_value_*Preference cascades
reservation_product_listReservation product trigger
*_distinct_active_productti_*, tu_*Active product maintenance

Stored Procedures and Functions

Stored Procedures (30)

Most stored procedures are legacy dt_* Visual SourceSafe integration stubs from PowerBuilder. Only a few are business-relevant:

ProcedurePurpose
dt_addtosourcecontrolVSS add to source control
dt_addtosourcecontrol_uVSS add (Unicode)
dt_adduserobject / _uVSS user object
dt_checkinobject / _uVSS check-in
dt_checkoutobject / _uVSS check-out
dt_displayoaerror / _uVSS error display
dt_droppropertiesbyidVSS property cleanup
dt_dropsourcecontrolVSS disconnect
dt_dropuserobjectbyidVSS user object removal
dt_generateansinameANSI name generation
dt_getoaborecord / _uVSS OA record
dt_getpropertiesbyid / _uVSS property retrieval
dt_isaborecord / _uVSS record check
dt_removefromsourcecontrolVSS remove
dt_setpropertybyid / _uVSS property set
dt_validateloginparams / _uVSS login validation
dt_verstamp006 / 007VSS version stamps
dt_whaborecord / _uVSS WH record

Table-Valued Functions (7)

These are inline TVFs used by DataWindows and reports for complex query encapsulation. Names not captured in this extraction but they serve pricing interpolation, pipeline filtering, and position calculations.


Data Volume Analysis

Tables With Significant Row Counts

TableRowsObservations
rmcat_possible_loans732KRisk analysis candidate loans — largest table
rmcat_eligible_loans561KRisk-eligible loan universe
pxcat_vmd_pipe_log_db_errors504KData pipeline error log (accumulated)
pscat_inst_dde_links_multi444KInstrument pricing data (coupon × result × date)
loan_notional434KNotional (synthetic) loans for risk modeling

Module Usage Signals

Many tables have zero rows, indicating modules not activated by this customer (Watermark TPO):

Empty Module AreaTablesInterpretation
pscat_builder_commitments0 rowsBuilder forward commitments not used
pscat_margin_activity / _tracking0 rowsMargin management not active
pscat_trade_contract_groups0 rowsFutures/options contract tracking unused
rmcat_coh_*0 rowsCost-of-hedge optimization unused
rmcat_sfas_* (most)0 rowsSFAS/ASC 815 hedge accounting not configured
psbid_*0 rowsWhole-loan bid packaging unused
pfill_*0 rowsPowerFill pool optimization unused
rmcat_bidpkg_*0 rowsBid packaging module unused

Heavily Used Modules

ModuleEvidence
Pipeline Managementloan table has active rows; loan_history captures status transitions
Risk Analysisrmcat_possible_loans (732K) and rmcat_eligible_loans (561K) — heavy risk processing
Pricing / DDEpscat_inst_dde_links_multi (444K) — extensive real-time pricing integration
Notional Analysisloan_notional (434K) — active rate-sheet / what-if analysis
Best ExecutionActive rmcat_bestex_* data
Securitizationpscat_pools, pscat_securities have active data

Observations

Key Differences from the PB Extraction

  1. 3.4x more tables — The PB extraction only saw tables referenced by DataWindow SQL (~170). The full schema has 585 base tables, revealing entire subsystems invisible from the UI layer.

  2. B2B pricing is massive — 37 psb2b_* tables implement per-counterparty automated pricing feeds (Fannie Mae, Freddie Mac, JPMorgan Chase, US Bank, Truist, PennyMac, and 15+ others). This was completely invisible from the PowerBuilder extraction.

  3. ULDD delivery is a full subsystem — 19 psuldd_* tables model the complete Uniform Loan Delivery Dataset with borrower demographics (94 cols), property details (92 cols), and ARM data (29 cols). The PB extraction captured none of this.

  4. Risk module is enormous — 178 rmcat_* tables plus 40 rmtmp_* working tables. The SFAS hedge accounting subsystem alone has 22 tables. The PB extraction captured ~72 risk tables.

  5. Archive pattern is explicit — 20 psarc_* tables mirror core trading tables with identical schemas, used for archiving settled transactions. The rmarc_* prefix (7 tables) archives risk analysis results.

  6. The loan table schema is replicated 6 timesloan, loan_inquiry, loan_notional, loan_modifications, and loan_shipped all share the same 157-column schema. loan_history has 150 columns (same columns minus some that don't need tracking). This is a classic PowerBuilder pattern: separate tables for each loan "state" rather than a status column on one table.

  7. Position detail is the widest tablermrep_position_detail has 279 columns, holding pre-computed position summary data across all dimensions.

  8. Securitization rules are polymorphicpscat_securitization_rules contains SQL syntax strings applied across 6+ entity types via junction tables. This is a rule engine pattern that needs careful SaaS redesign.

  9. DDE is pervasive — "Dynamic Data Exchange" was the Windows IPC mechanism for real-time pricing. Tables like pscat_instrument_dde_links and pscat_inst_dde_links_multi (444K rows) store pricing feed configurations. The SaaS replacement will need API-based feeds instead.

  10. Customer-specific tables existwtpo_* tables (Watermark TPO) contain customer-specific E11tec fraud detector integration, suggesting the legacy schema allowed per-customer schema extensions.

Implications for the SaaS Data Model

  • Normalize the loan table — 157 columns with 6 copies is unsustainable. Break into loan_core, loan_borrower, loan_property, loan_pricing, loan_investor, etc. with a single status column and proper history tracking.

  • Replace DDE with API feeds — All *_dde_* tables need reimagining as REST/WebSocket pricing integrations.

  • Merge archive patterns — Instead of psarc_* shadow tables, use soft deletes or temporal tables in Azure SQL.

  • Consolidate risk temp tables — The 40 rmtmp_* tables can be replaced with CTEs, temp tables in stored procedures, or in-memory calculation in the .NET application layer.

  • Abstract B2B pricing — The per-counterparty psb2b_pricing_* pattern (one table per investor) should become a generic pricing feed with a counterparty discriminator column.

  • Re-examine SFAS — 22 SFAS tables with zero rows at this customer suggests this is a niche feature. Consider making it a separate module or plugin rather than core schema.

  • Schema-per-tenant — With database-per-tenant (ADR-005), the SaaS schema will be identical across tenants. Customer-specific tables like wtpo_* will not carry over — any tenant-specific needs must go through the extension mechanism.