PostgreSQL is an object-relational database system, ORDBS, cross platform, and like MySQL, is also open-source and free. It is supported by a consortium of companies and names like Red Hat, Skype, and HP listed at their website.
As with MySQL, PostgreSQL also features a GUI for management called PGAdmin.
Setting up PostgreSQL with NetBeans is not as straightforward as with MySQL, but NetBeans still comes with the appropriate JDBC driver, so don't worry, it is still no rocket science.
For this recipe, we will use PostgreSQL version 8.4.4 and PGAdmin version 3.
Installation and configuration of PostgreSQL and components onto the Operating System is beyond the scope of this recipe. What will be learned here is how to configure PostgreSQL with NetBeans so that integration between the database and the IDE can be achieved.
In this recipe, we assume that the Database is installed locally and that the password is chosen by the user.
It is necessary to have an existing database in PostgreSQL for this recipe to work; we will assume that the name of the database is mydb.
With the IDE open, and PostgreSQL running:
NetBeans validates the entered information to access the database. This ensures that no misconfigured database is going to be used and prevents the user to actually create a a misconfigured connection and even prevents the user to proceed further in the wizard.
When Finish is clicked, NetBeans then connects to the PostgreSQL and fetches existing databases from the server. A new Database connection is placed under the Databases subsection of the Services tab.
How to connect and disconnect PostgreSQL from within NetBeans?
18.225.55.170