Connecting to a database with best practices
Up to this point, we've learned how to launch a PostgreSQL database with AWS, load data into it, and connect it to Metabase. If you plan on using Metabase in an existing organization, chances are that there will already be a database full of data for you. At the same time, it's unlikely that the database your organization uses to store data can be connected to in the same way as we learned previously. This is unlikely for two main reasons:
- Most databases are not publicly accessible. Recall that in the last section, we made our database publicly accessible. That was to make loading data and connecting it to Metabase easy. Generally, it's a bad idea to make a database publicly accessible, as it lets anyone attempt to connect to it.
- Doing analytics on a production application database is dangerous. Your application database is what is serving critical information to your application. Sending queries to it for analytical...