The best practices for the security of a database

At present 2020, many security systems have come out. I would like to know what systems they use and above all good practices focused on:

1 - Accessing the DB through a Login from an application (Unreal)

  • Personally I am thinking of PHP + WebServices + Firewall

2 - Accessing the real time database at all times. API or a control using JSON

3 - Protected database

  • Personally I am thinking of reducing privileges + encryption + Firewall

4 - For the launcher?

Suppose hypothetically that you have an application called “game”, someone “could” decipher the source code (reverse engineering) with which, we should have the database away from the application code, therefore, only send requests to an external factor such as a WebApplication and if these requests are correct return data. But for example, WebServices or WebApplication are 100% safe? Are there other new systems (from 2019-2020)?

Could you detail the systems or mechanisms in the 4 cases? What systems does “Blizzard”, “Epic Games” use in their games?

Could they be free mechanisms? Without intermediaries?