You can connect to DB instances using drivers, such as JDBC and ODBC.
Development Guidelines
Using JDBC to Connect to a Database
Using ODBC to Connect to a Database
Using libpq to Connect to a Database
Using Psycopg to Connect to a Database