How to Connect PostgreSQL Database with Netbeans

Make a database in Postgres(PgAdmin)

1 . Open the PostgreSQL(PgAdmin).

2. First, Expand ‘Server‘ Option(When you will open PgAdmin, You will find a ‘Server’ option)

pg1.png

then PostgreSQL Version (e.g PostgreSQL 9.6).

 

3. Here you will find multiple option. Now, If you want to create a new Database then right click  over ‘Database‘ option and write the name of your Database (You can write anything) and click finish  and then expand it.

Otherwise, You can use the Database which is already present in database ‘postgres‘.

 

4. Now Expand the Database where you will get multiple menu out of which Expand Schema menu. Here, You will find a option of ‘Public Scheme/ Public‘ Expand it. Now go to the Tables menu, You will find that no table is present at that time because till now we didn’t created any table.

For this click on SQL and write the code to create a Table.

Screenshot (163).png

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s