To keep a database from being exposed to the internet, there are a few things that may be done. One option is to deploy a firewall to limit database access to just authorized users. Another option is to implement appropriate authentication and authorization rules to guarantee that only authorized users have access to the database. Furthermore, the database should be appropriately secured, with restricted access to the data and the underlying infrastructure. Similarly, the database should be checked and patched on a regular basis to ensure that any vulnerabilities are addressed. Finally, regular backups of the database should be taken so that the data can be restored if it is ever hacked.