We have a database that many clients need to read/write via internet. There are two methods to deploy:
(A) [Database server] <---internet/SSL---> [Clients]: Allow database can be directly accessed from internet using SSL connection.
(B) [Database server] <--- LAN --> [Application Server] <---internet/webAPI---> [Clients]: Database can be locally accessed only by Application Server. Application server provide webAPI (https) for clients to read/write to database.
is method (A) safe? Which is best pratice for this scenario (in security/performance ...)?