Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy database along with project

I need to create an application that does the following:

  • The application is going to be installed on multiple computers on the same network

  • There is going to be a computer that contains the database other computers will connect to that database. (So there is a server version of the software and a client version)

  • All the computers that have the application installed should be able to do CRUD (create, read,...) operations in the database.

  • Database will be small, that is it should be less than 1GB in size.

Problems that I have:

I don't know which database to use:

  • SQLite - From researching on the internet this seems like a great database. It is fast, very easy to deploy . The problem is that from researching I think it is not that good handling multiple connections. When I say multiple I mean 5 computers using the database simultaneously.

  • MySQL - I work with this database and I know it is great handling multiple connections. The problem with that database is that I don't know how I will be able to deploy that database. I am required to deploy a database when installing the software. I know that if I require the users to instal MySQL doing a separate installation that will work. Maybe there is a way of deploying MySQL when doploying a project in visual studio.

  • SQL Server Express - I believe this will be my best option. I have researched on the internet and I found out that it is possible to deploy a SQL Server Express database with a application. I believe it will be easy to figure out how to deploy such database with a project but it will be nice if someone can point me on the right direction on how to connect to that database remotely from a computer on the same network. The database will obviously be shared in the network in order to achieve this.

  • Microsoft Access Database - I never use this database. I know it can handle multiple connections. Maybe it is a good choice.

It will be nice if someone can point me on the right direction of how to be able to deploy a database when installing my application. Moreover how will I be able to connect to that database from a computer remotely on the same network. Since the database is small and it will just contain text I think that the best idea will be to keep the database on the internet but I cannot do that. The software is required to work without an internet connection.

EDIT

From looking at your answers it looks like I have to install SQL Server express or MySql on the server computer. The problem is that I am required to do one installation. Is there a way of deploying MySql or SQL Server Express when deploying my application. Perhaps I have to embed mysql in the application and make my application install it somehow. My boss want to be able to install the software without having a internet connection.

EDIT 2

I been thinking and this part will be very hard to implement. Do you guys have any ideas how QuickBooks implement their database? I guess I need something similar. When you install Quickbooks you perform just one installation. Quick-books handles pretty well simultaneous connections. Do they use their own database? Oracle? MySQL? I agree with all of you. It will be so easy to perform two installations. Also it will be cleaner. The software that I am creating is supposed to run on windows xp, and latter versions of windows.

like image 572
Tono Nam Avatar asked Jun 09 '26 05:06

Tono Nam


2 Answers

If you want a dbms as your backend you are installing two things, It could look to the user like one thing, but I can tell you from bitter experience, that can be a lot of fun.

For instance to install 2005/ 2008 express, there are various prerequisites. Like a .net framework. Then there's patches and updates, then opening up the firewall(s), depends on set up. Different topology / os choices. Peer to peer, domain based, Active directory, Terminal Services, citrix. So automagically installing without an internet connection, and using the installer for the db, is nigh on impossible, unless you have rigid control over the user environments.

Welcome to a world of hurt.

Oh did I mention permissions, shares, UAC, 32/64 bit (for sql server dmo and smo, maybe)

Do you want to block installs on "incompatible" environments.

Oh and what about upgrades. To the db, to your apps. What if your client already has a server install and doesn't want to clutter up their kit with another...

and many many more.

And I bet you just can't wait to test all the potential combinations.

You haven't said what your target environments are going to be, so I can't say how many worms are in the tin, but its's very big time with plenty of room for lots of worms. Ours is a long running legacy app, so we are pretty much snookered, I'd never willingly start with this design again though. Locally deployed web app would take a lot of the pain out of it.

Go back and scare the crap out of your boss.

like image 200
Tony Hopkinson Avatar answered Jun 10 '26 18:06

Tony Hopkinson


I would recommend Sql Server Express installed on a server on your network. Microsoft Access doesn't handle multiple simultaneous connections very well and is not very efficient when accessed from a remote machine.

You don't need to worry about deploying the database with your client application, you can install Sql Server Express directly on the server. (This only needs to be done once). You will need to configure Sql Server Express to accept remote connections after it is installed on the server.

like image 35
JSR Avatar answered Jun 10 '26 19:06

JSR