database
database copied to clipboard
db normalization: consolidate CHECKINGACCOUNT and BILLSDEPOSITS, eliminate BUDGETSPLITTRANSACTIONS
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):
I don't know if data migration could be implemented in pure SQL...