As I continue learning SQL and PostgreSQL, I am moving beyond working with databases locally and exploring how databases work in the cloud.
For this project, I use Aiven to host a PostgreSQL database and DBeaver to connect to and work with the database.
1. Setting Up PostgreSQL on Aiven
I start by creating a PostgreSQL service on Aiven. Aiven hosts the database in the cloud and provides the connection details I need to access it.
These details include:
- Host
- Port
- Database name
- Username
- Password
- SSL certificate
2. Connecting Aiven to DBeaver
I open DBeaver and create a new PostgreSQL connection.
I enter the connection details provided by Aiven, including the host, port, database, username, and password.
Since Aiven requires a secure connection, I go to the SSL settings in DBeaver, enable SSL, and add the CA certificate I download from Aiven.
I then click Test Connection to confirm that the connection works successfully.
3. Working With the Cloud Database
Once the connection is successful, I can access my PostgreSQL database directly through DBeaver.
I can now:
- Create and manage tables
- Import data
- Write SQL queries
- View database records
- Work with a database hosted remotely
The database is hosted in the cloud, but I can still interact with it through DBeaver just like I would with a local PostgreSQL database.
What I Learnt
This exercise helped me understand that SQL databases don't have to exist only on my laptop. They can be hosted on cloud platforms and accessed remotely using database tools such as DBeaver.
I also learned how SSL certificates help secure the connection between the database and the client.
Final Takeaway
Connecting Aiven PostgreSQL to DBeaver gives me a practical understanding of how SQL works in a cloud environment. It allows me to take the SQL concepts I learn locally and apply them to a remotely hosted database. ☁️🐘


Top comments (0)