SQL Database

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
Post Reply
fex
In need of some credit
In need of some credit
Posts: 6
Joined: Fri Feb 17, 2012 6:05 pm

SQL Database

Post by fex » Mon Feb 27, 2012 11:16 am

Hello.
Should i use connection to sql database in client side (client application)? Isn't it unsafe (sniffing / disassembling application to get password to database) ? And how can I use wxWidgets to connect to internal database (for example mysql / sqlite)?

utelle
Moderator
Moderator
Posts: 897
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: SQL Database

Post by utelle » Mon Feb 27, 2012 2:53 pm

fex wrote:Should i use connection to sql database in client side (client application)? Isn't it unsafe (sniffing / disassembling application to get password to database) ?
When you use a server-based database managment system you usually don't have a choice: you have to rely on the connection methods offered by the DBMS. In a company intranet securing the connection might not be an issue; in public networks it would be a good idea to use SSL protected connections.

Regarding password sniffing or disassembling an application as a developer you should be aware that storing a password within the application is usually not a good idea under security aspects. Your application should usually ask the user to enter his password and after establishing the connection the password string should be removed from memory ASAP.

How much effort you spend on securing your application depends on how high the requirements are. However keep in mind there is no protection scheme guaranteeing 100% security.
fex wrote:And how can I use wxWidgets to connect to internal database (for example mysql / sqlite)?
MySQL is mostly used as a client/server DBMS. If you want a compact SQL aware database for locally storing data of your application SQLite is certainly a good alternative. For accessing an SQLite database from a wxWidgets-based application you might consider to use wxSQLite3, a SQLite wrapper for wxWidgets. If you want to be able to easily exchange the underlying database system you might consider DatabaseLayer as it abstracts several different DBMSs for wxWidgets-based applications.

Regards,

Ulrich

Post Reply