Question

I have always "custom developed" software for clients. This means:

  • Develop the software
  • Install SQL Express on client site
  • Import DB, create DB user, set DB permissions etc.
  • Install software on client site (multiple pc's)
  • Voila!

Now, I am looking at deploying your basic "end user" app, to a mass of unknown audience. I.e. your basic app someone will download.

What are the best common methods for deploying an app with a database? I am looking for the classic (one setup app, deploying both app and db) without the user needing to do some technical configs.

I would appreciate some ideas...

Was it helpful?

Solution

  • Install SQL Express on client site
  • Import DB, create DB user, set DB permissions etc.
  • Install software on client site (multiple pc's)

Do you expect the end-user to be savvy enough to install SQLExpress on their own? If not, you might want to look into including it in your installer (or download it from Microsoft when necessary) and have it installed for them as a part of the process. Things to consider: Can the SQLExpress installer run in headless mode? Can you pre-define any installation-required parameters/settings so that the user doesn't have to worry? Is the SQLExpress installer scriptable? If they already have SQLExpress installed, can you handle it if their installation configuration is different from how you would do it (You might want to give them the option of pointing your installer at an existing instance of SQLExpress and using that if you can)? Does it have to be SQLExpress? What if they have SQL Server (will you really make them install SQLExpress if they already have MS SQL Server)?

The second step shouldn't be hard. You should already have all of the appropriate DDLs and DMLs and once SQLExpress has a minimal working setup, you should be able to execute your DDL and DML statements to get your database up to a good starting point. Again, your installer process will need to be able to do this in the background.

The third point should already be covered by whatever you're currently doing, but it should be the last step in your general installer after these other steps have succeeded.

I've worked on a desktop application before that required the user to install SQLExpress, but the DB set up and post-install config was done via scripts. Future updates to the database (such as schema changes and reference data DML) were handled through a separate "DB Update" application that just ran SQL scripts.

Every scenario is going to be a little different, but I hope this gives you enough info...

Licensed under: CC-BY-SA with attribution
scroll top