I am fairly experienced with web design and programming, C, C++ and a little java (used it to build some small GUI).

I am trying to work with Python, and I am faced with some technical structuring issues.

Here is a description of what I want to do

1. I want to build a standalone application that will be deployed in a company with several computers connected over a local network.

2. The application is to communicate with a database. (One database shared by applications in all computers)

3. Only one of the computers will have the database installed (more like client server relationship in web)

So here is my question

1. Can the application be written in such a way that when it is installed on a new computer, it installs the database(mysql or sqlite etc) without the need to first install database?

2. And is it possible that the content of the database can only be seen by the application?

3. I am a little bit not sure if the structure as described above is the best way to go. Please advice me on this.

I would be glad if pointed to a literature online on structuring standalone applications.

Thank you for the help

  • If there any restriction forbidding you to to install the app on only one machine, and open up a web interface where the other machine can connect to (instead of a local GUI). There less overhead, easy to manage, easy to get new users in, and more secure (you don't store code, passwords on each machine). But it all depends on what does the actually app does.
    – Radu Maris
    Feb 25, 2015 at 14:12
  • Thank you for your answer, I would like to know more about this approach. I am deliberately avoiding Web based application (by this I mean using a browser to access it). If what you are suggesting is different from that, please can you explain a little more and point me to relevant literature I can read. Feb 26, 2015 at 13:07
  • I do mean a Web app (visible via any Browser). It all depends on what you need. I work on an app that's composed of 70% C++ code, a DB, and we expose a Web UI (and a CLI for those with access to the server). The customers like the web approach because it's hassle free, you have one/more admin(s) granting access in the app, and you don't care with which machine they log with (in their LAN). And all this for a very complex app. Also if you're scared of browser compatibility you can negotiate with customers. We charge them a lot if they ask for compatibility with older browsers. Hope this helps.
    – Radu Maris
    Feb 27, 2015 at 13:49

1 Answer 1

... when it is installed on a new computer, it installs the database 
(mysql or sqlite etc) without the need to first install database?

Yes, but I would suggest, don't.

Install the database separately (and only once) on a known machine. Then provide the name/ I.P.Address of that machine when installing all of the client applications.

If you don't do this, then you run the risk of having the database created on the boss' laptop and he's out of the office most of the time!

... is it possible that the content of the database can only be seen by the application?

Yes, up to a point.

You can set up the database security so that the application uses a pre-defined account and credentials that the Users are never told about. If you want users to have "accounts" within the database, then set these up using your own tables, not as actual database accounts. It just makes everything easier - database permissions are only given to the "application" account, not to individual users, which means there's zero overhead of managing all those user accounts and, if you want these users to have passwords, then you always have a working password-reset mechanism (how's that going to work if a user can't connect to the database to reset their password because they've forgotten their password?).

But, as always, security is only "so good"; anything that can be built can be broken.

All that said, many client applications with a single, central database is definitely the way to go.


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.