Question

Hi I've been researching on how to use heroku with postgresql. Im supposed to code the application in eclipse and the language I'm using is java. So far, I've downloades pgadmin 3 and connected it to heroku. Im currently stuck, confused and wondering whether I'm in the right direction. Is this correct:

  1. Postgresql is hosted on heroku so you only need to establish a connection between postgres and java.

  2. To connect java to heroku on eclipse, a JDBC of sorts should be used.

  3. The database tables can be created in pgadmin and this should be pushed to heroku.

  4. Changes in the database should be done in the code.

I've gone through the postgresql guides on heroku and also found codes on the jdbc connection in java. However, im confused as to uow to piece everything together. Are there any guides that could be recommended as well?

Was it helpful?

Solution

My ideas for your questions:

1,2. You can apply JDBC or any object relational mapping framework (Hibernate, Open JPA, Eclipse Link...).

3,4 Yes, you're right... The main point is Heroku just provide you a Postgre service the way you deal with the service like you did in your localhost.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top