Connecting to the database using JDBC