connecting databases

Questions and answers regarding general SQL and backend databases

connecting databases

Postby mikemiller » Sun Apr 13, 2014 10:27 am

Can somebody help please
When I create new postgresql database I cannot find it anywhere on computer.
It gives URL as JDBC:postgresql://localhost:5432:[new data base name]
I need to know where to find it
I am new to Java . I have spent many years just developing in foxpro for own company.
What does" "localhost" refer to
Michael
mikemiller
 
Posts: 1
Joined: Sun Apr 13, 2014 10:17 am

Re: connecting databases

Postby sovanm » Mon Apr 14, 2014 6:50 am

Hi Micheal,

Welcome to the servoy community.. :)

PostgreSQL come in bundled with servoy. When you installed servoy you must have got an option to installed bundled PostgreSQL or want to connect to some other database.
If you have selected to install PostgreSQL, you can find the PostgreSQL folder here
/path/to/application_server/postgres_db


If you want to administrate PostgreSQL externally, you can use PGAdmin.

For your second portion, "localhost" refers to the PostgreSQL's instance that is running on your own machine. When you start the servoy developer, you are also starting the PostgreSQL instance which can be reached with that URL.

Thanks
sovanm
 
Posts: 99
Joined: Fri Oct 28, 2011 1:55 pm
Location: Bhubaneswar, India

Re: connecting databases

Postby ROCLASI » Mon Apr 14, 2014 9:15 am

Hi Michael,

Welcome to the forum :)

mikemiller wrote:What does" "localhost" refer to


Certain JDBC drivers connect to file-based databases like SQLite, VFP and even CSV files so you would see the file path in the connection string. With PostgreSQL however you need to connect to the (PostgreSQL) server to access the database, just like you would with MSSQL Server (and others). So then the connection string will require an network address. In your case localhost is a standard hostname for the local machine which translates to the IP address 127.0.0.1.
And in the connection string you see that behind the colon you find the port number PostgreSQL is listening on (5432).
So the syntax is: JDBC:postgresql://<address>:<port>:<databasename>

There is a wikipedia page explains localhost in more detail.

Hope this clears things up for you.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 7 guests

cron