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...

  • Have you looked into any installers?
    – JeffO
    Commented Jul 22, 2014 at 12:55
  • My issue is not really with installers, but with DB architecture... Commented Jul 22, 2014 at 12:58
  • I am interested in what "other" like minded developers are currently doing... in this type of scenario. Commented Jul 22, 2014 at 13:07

1 Answer 1

  • 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...

  • Is this really practical, I mean installing a database software for data in client's machine. Commented Jun 23, 2018 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.