use of triggers and removal of investment_record table