database icon indicating copy to clipboard operation
database copied to clipboard

db normalization: consolidate CHECKINGACCOUNT and BILLSDEPOSITS, eliminate BUDGETSPLITTRANSACTIONS

Open slodki opened this issue 5 years ago • 0 comments

All transaction's details from BILLSDEPOSITS can be stored in CHECKINGACCOUNT with TRANSDATE set to NULL. Then BUDGETSPLITTRANSACTIONS can be migrated to SPLITTRANSACTIONS.

  • All existing queries to CHECKINGACCOUNT should verify TRANSDATE is not null
  • All existing queries to BILLSDEPOSITS should read details from linked CHECKINGACCOUNT and SPLITTRANSACTIONS
  • There is no data lose as TRANSDATE is always equal to NEXTOCCURRENCEDATE in BILLSDEPOSITS

Schema changes (BILLSDEPOSITS simplified, BUDGETSPLITTRANSACTIONS removed): tables

I don't know if data migration could be implemented in pure SQL...

slodki avatar Dec 01 '18 23:12 slodki