Test ACID properties SQLITE
Does anyone know how to check acid properties of sqlite?
(2) By Gunter Hick (gunter_hick) on 2021-08-11 10:18:58 in reply to 1 [source]
Check the definition and test the property behind each letter separately. Atomic: Try making two changes and then either ROLLBACK or COMMIT. Look for not-ROLLBACKED and not-COMMITED changes. Check combinations of rows changed by 1 UPDATE, rows changed by 2 UPDATEs in the same table, different tables or different attached databases. Consistency: Try inserting/updating rows that violate constraints (remember to enable foreign key constraints). What those are is up to the author of the schema. Independance: Try performing two transactions on the same row/table/database/across multiple attached databases in independent threads/processes. Check that data reread after both transactions are complete conform to expecations. In SQLite you will have to set a busy timeout to avoid the second transaction failing with "database is locked". Try to start the transactions simultaneously, so the changes occur in both orders. Durability: Try killing threads/processes/power while transactions are in all states of progress (before/after first/last change, during commit), check to see if all comitted transactions are still present after the journal/WAL file has been processed.
"SQLite" is fully certified. You can read the leaflet. It has few contraindications. And few known side effects. And 10^12 units have already been sold.
(4) By Gunter Hick (gunter_hick) on 2021-08-12 11:21:15 in reply to 3 [link] [source]
Impressive. That would be about 125 copies per person alive today. Or over 200 times the total COVID vaccine shots administered worldwide.
Regarding: "....125 copies per person "
One dose leaves you wanting more.
If you have a smartphone, a car, a SatNav device, a TV, a PVR, a security camera, a power smartmeter, a smartwatch, a games console, you have nine copies of SQLite. If you have a Windows/Apple computer too, you have another four or five copies.
Some of the less expected devices I have found SQLite in:
- the machines in carparks (parking lots ?) which record entry/exit/payments
- the hand-held devices some parking inspectors use to print tickets
- a lathe which you can program with curve profiles
- a hand-held gas detector used to spot leaks
- the smartmeter connected to my power supply
Almost every Android and iOS app has at least one SQLite DB. Per phone 50 to 100 DBs is quite common.