T
T
TheRevan2018-02-06 14:45:58
Java
TheRevan, 2018-02-06 14:45:58

Is it safe to make an application with direct queries to the DB?

Is it safe to make an application that will directly connect to the database using jdbc and manipulate it? Or is it better (and more correct) to make a separate server and protocol for interacting with it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
InoMono, 2018-02-06
@InoMono

Through the internet you mean?
Safely. But it is not rational for performance reasons.

A
alfss, 2018-02-06
@alfss

It is safe if the connection is encrypted, otherwise it is not recommended.
It is better to have a backend with a REST/SOAP/etc API, then it will be painless to tie something else.

K
koshiii, 2018-02-07
@koshiii

alfss
Absolutely not safe, even if the traffic is encrypted, read below.
@author
You need to have a backend so that the values ​​first go through sanitation, and then queries are already generated in the database to avoid SQL injections.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question