I’m writing a simple document management system for my work. I’m only a hobbyist but have been programming for a while now. My problem is this. When I delete a number of documents through my app, I then need to remove the related database records. What’s the best way to go about this without ending up with files with no database records, or records pointing to files that do not exist, if there is an exception thrown?
Share
Store the files in the database. Then you can have referential integrity without adding complexity (MSMQ etc) to your application. Yes, this will increase the size of your db. But the files are already on your server, so it’s just the same bits in a different place.