382 karma · joined August 16, 2023
When 346 people died on the 737 Max 8s there was headline news speculating on the role of new software. The FAA had a lengthy investigation of Boeing and we saw pieces put out by experts like IEEE opining about what went wrong and how software played a role. Boeing paid $2.5bn to avoid being put on trial.
45,000 people in the USA die in motor vehicle incidents every year. How many hundreds if not thousands of those were caused by software faults? Is the software in sensor-based safety packages working as flawlessly as flight control systems?
I bet more than 346 pedestrians have been killed by drivers of Subarus that have EyeSight packages, drivers who think EyeSight might make a difference in them not hitting someone if they aren't paying full attention to the road.
Instead automakers keep on reusing platforms that are hardly different from their previous generation and tack on software-based 'innovations' like they're a tech company. Usually for the worse like in this instance, replacing the (hardly) tried and true interfaces of CarPlay and Android Auto with their own software. Before this it was switching out climate control knobs for on-screen which don't work with gloves, throttle profiles which will never be used, etc...
At a basic level you could duplicate the entire record into the audit table on every action, e.g. the audit table would look like `audit_id | record_id | user/process_id | action (insert, update, delete) | timestamp | ...<record rows>`.
You can optimize it to not duplicating column values unless necessary. On inserts you only need the metadata of the action. On updates, the old value of columns with changes goes into the audit table. On deletes the whole record goes into the audit table.