Page 1 of 1

connect to publicly avaiable database

Posted: Mon Jun 20, 2011 2:40 pm
by stribor
There is gov web site that is publicly available http://webprod.hc-sc.gc.ca/dpd-bdpp/index-eng.jsp
Here anyone can go and type Drug Identification Number (DIN) and the site will return lots of information about particular drug.
I would like for example to develop web application that would connect to this same database and query it for particular drug.
Since I would need host name,database name,user name,password to connect to this same database how would i do this.
Other example is canada 411 http://www.canada411.ca/. I would like to have custom php application to connect to canada 411 database.
Is this actually possible to do?
Any info would be great

Re: connect to publicly avaiable database

Posted: Mon Jun 20, 2011 3:54 pm
by twinedev
Connecting to a database, and connecting to a site and submit information and get the results back are two different things.

I didn't check the second site, but since the first site clearly stats you need written permission to basically use it for what they are letting you use it for on their site, I would recommend you check with them first, as they would tell you 1. if you can legally, 2. if they provide an API that lets you have an app communicate directly with their system.

-Greg

Re: connect to publicly avaiable database

Posted: Tue Jun 21, 2011 7:55 pm
by califdon
I agree with twinedev, and further suggest that no administrator in his right mind would ever consider allowing some random requester to gain access to his database, even if the hosting server were to permit it, which is unlikely in the first place.

Aside from the legalities, it is possible to "scrape" data from a website, including data that is derived from a database, but this is a very long and tedious process and I would guess that anyone who has to even ask the question would be incapable of accomplishing this in a finite period of time.

Re: connect to publicly avaiable database

Posted: Tue Jun 21, 2011 9:14 pm
by stribor
Hi Twindev,
Connecting to web site could also work for me if I have idea on how to do it. So far what I have done is connecting to databases directly.
Would you show me example on how that is done or some tutorial on how to to do this.
Any input would be appreciated.