Over the past six months or so, I’ve been working on an application to help out one of our other businesses. It’s a Windows application that maintains inventories of products and parts. Early on, I decided to store the data in a SQL Server database. I did that for many reasons including:
- I could avoid writing file loading/saving code.
- I could easily look at the data in the database anytime I wanted. That makes for easier debugging.
- I could add constraints to the database to keep the data consistent.
Over the past month, I discovered yet another good reason. The application has a bunch of UI. Unfortunately, I haven’t had time to add UI for some of the rare operations yet. But we still need to use the application. So when I need to perform one of those rare operations (and there’s no UI), I just start up SQL Server Management Studio and write a database script. Then I save it away just in case I need to use it again.
I didn’t think of that advantage when I decided to use a database. But I’m really glad I have that option now!