Jump to content
Sign in to follow this  
lynkfs

Database connectivity

Recommended Posts

The usual way to access an external database from a html/js client is through ajax.

However this requires server-side scripting (php) to connect to the db-server and echo query results back.

The downside among others is the requirement for a separate php server.

 

The other way is to use node.js server side, install a node.js mysql / oracle connector and set up the connection from the client.

Downside is that it involves setting up a separate node server 

 

Devart (www.devart.com) supplies database connectivity components for delphi, lazarus, free pascal on windows, mac-os, android, ios in 32 and 64 bit versions for all major databases. I've used them from Delphi and they work great.

The interesting thing is that some of their products (mydac, dbexpress) are able to connect NATIVELY to external databases, not using additional server side processing or any specific client libraries at all.

https://www.devart.com/mydac/
 
"MyDAC-based DB applications are easy to deploy, do not require installation of other data provider layers
(such as BDE or ODBC), and that's why they can work faster than the ones based on standard data connectivity 
solutions. Moreover, MyDAC provides an additional opportunity to work NATIVELY without involving 
any client library."

This native connectivity is built on tcp/ip

 

Question : would it be possible to do something similar and end up with a native SMS client-dbserver connection not involving any other server side processing or os specific drivers ?

Share this post


Link to post
Share on other sites

In order to make remote MySQL connections more secure with MyDAC, you have to use SSL or SSH in trusted networks, both SSH and SSL are designed to protect network connections. 

 
SSH tunnel can ensure data transferring from several clients of one secure area to clients in another secure area through one protected TCP connection. 
 
In some cases SSH client and SSH server are embedded into applications whose connections have to be protected.

SSL connection resembles SSH tunnel. The difference is that SSL client and SSL server are always embedded into applications. To put some data into network, an application calls methods of the embedded SSL client/server, and data is encrypted and sent. To get data from network, the application also calls methods of SSL. So, SSL clients and servers operate within the application's address space. 

 

In order to ensure data safety in insecure networks, it is essential to take care of data protection and integrity, as well as of data receiver identification. So before putting the data into the insecure area, it should be encrypted. On the other side the data should be decrypted. 

 
IMHO, this is very insecure.
 
+------------------------+-------------------------------------------------+-------------------+
| Presentation Layer |             Logic Layer                                              | Data Layer       |
+------------------------+-------------------------------------------------+-------------------+
| Web browser          | web-server Resources data layer                  | Database            |
| GET Sales Total     | Performs Calculation/Auth/Connection      | DB (Storage)       |
+------------------------+-------------------------------------------------+-------------------+
 
IF (Presentation Layer) access the (Data Layer) directly THEN
Begin
  I could easily access the DB myself;
  I would be able to read/delete/post/create data in the client side;
  The credentials details are public.
End;

Share this post


Link to post
Share on other sites

Thanks for the write up, it helps

 

I suppose that most database vendors or hosting providers will have integrated ssh/ssl and/or native encryption in their products in some way or form.

I've seen that for instance the mysql workbench (clientside) offers the option to connect through ssh, which means they must have the complementary server-side ssh components embedded in their database server software.

 

Not sure if the Devart products are designed along these lines.

 

My question though was, would it be possible to contemplate a native SMS client-dbserver solution not involving additional server products or clientside libraries.

 

I tend to answer that question with a tentative yes.

However that would involve extensive low-level programming, which falls outside my domain.

 

Maybe Devart would be interested in extending their coverage to include SMS ....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×