TheDailyWTF describes how poor database design and user error bankrupted a small chain of pet stores.
“MegaPetCo” was upset that its website ran incredibly slow. Consultant Rick discovered MegaPetCo was using a single shared database for its website and everything else in its business — sales, payroll, HR, inventory, tax records, invoices and maintenance tickets. The database was incredibly simple: a single table with hundreds of columns. It probably had humble beginnings as a spreadsheet and organically grew into a vast monolith over the seven years that MegaPetCo was in business. All told, the database had millions of rows in a single table.
Then one day a developer was optimizing the database and removing records that MegaPetCo no longer needed. All it took was a single, poorly-formed delete query to wipe out each and every row in the database table. MegaPetCo’s sales immediately ground to a halt, along with everything else in the company. And of course — you guessed it — there were no backups.
Within a few months, the company filed for bankruptcy and was forced to close every one of its stores, laying off several hundred people along the way.