Jump to content

JDBC and PHP. How is it done? Are there limitations?


jpmad4it

Recommended Posts

 

 

 

Hi there,

 

At present, our I.T. department are exploring different methods of connecting to our IDMS database via the internet.

 

We have realised that we could use an alternative to ODBC drivers to connect to our IDMS database. The alternative is JDBC Type 4 drivers. If we have to use ODBC drivers, it means we are going to have to set up a lot of new software on our mainframe which will be a lengthy process.

 

If we use JDBC, we may be able to establish a connection with our IDMS database a lot sooner than if we were to use ODBC. It all depends upon the pros and cons of both ODBC and JDBC.

 

So, can JDBC be connected to through PHP, ASP, etc.........or does it have to be connected to via JSP and Java? Will using JDBC limit which scripting technologies we can use? If connecting to JDBC via PHP, ASP etc is possible, is it a tricky process? Or is it relatively straight forward? What does it involve?

 

Will using JDBC limit what kind of applications we can build? Or is it just as flexible as ODBC?

 

We don't want rush ahead and implement the use of JDBC without checking with first. Even though it may be quicker to set up JDBC initially, there may be complications that pop-up further down the line that some of you may be aware of?

 

Also, the way that we set up the connection to our database mentions these 3 possible routes:

 

1) TCP/IP connects to the Type 4 JDBC driver, which resides on the Java Platform.

2) Type 4 JDBC driver connects to a servlet, which connects to web server (these also reside on the Java Platform)

3) The web server then connects to an applet on the browser client.

 

When it says any Java Platform, does this mean Windows, Linux etc? And then where it says it connects to an applet on the browser client, does that mean it connects to the internet browser? I am a little confused.

 

Another route is as follows:

 

1) TCP/IP connects to the Type 4 JDBC driver, which resides on the Java Client.

2) The Type 4 JDBC driver then connects directly to the applet, which also resides on the Java Client.

 

What is a Java Client?

 

The final route is using JDBC type 3 drivers. It says that to use these drivers, we must have a JDBC Server which is located on the Java Platform. It connects this way:

 

1) TCP/IP connects to the JDBC server, which resides on the Java Platform.

2) The JDBC server connects to the Type 3 JDBC driver, which resides on the browser client.

3) The type 3 ODBC driver then connects to an applet on the browser client.

 

I am so stumped by all this. Can anyone help clarify all this for me???

 

Any advice on this subject would be great.

 

Thank you.

 

 

Link to comment
Share on other sites

We can use ODBC, but it involves adding new software to our mainframe, which will take quite a long time.

 

Trust me, this is simple compared to other options lol.

 

I know that JDBC connects to our mainframe via TCP/IP.....but after that I get confused with java clients, servers, platforms etc.

 

I think that if we can use PHP, all that will happen is that we connect to JDBC using PHP, and then query our database to gather info -> and display it on the web. I just can't see it being that simple?

 

I think there are more steps required when connecting PHP to JDBC, and I also need to know if there are limitations of using PHP with JDBC.

Link to comment
Share on other sites

I honestly don't know, There is probably PHP extensions made to work with your type of setup. But I don't think that its all that common. I guess its no secret, that PHP and MySQL work together nicely, as do flat file databases. But I've never heard of JDBC before.

 

If infact, JDBC is apart of PHP(I doubt it is) or there is extensions available for JDBC support. They would most likely be complicated to use in my opinion, and may not have the flexibility to do things the same way your current setup in the I.T. Department can.

Link to comment
Share on other sites

ODBC and PHP go together well don't they? Or have I just assumed that over the years!

 

JDBC is similar to ODBC.

 

ODBC is open database connectivity. So I guess it works with a range of scripting languages.

 

Nice definittion for JDBC:

 

Java Database Connectivity. Java API that enables Java programs to execute SQL statements. This allows Java programs to interact with any SQL-compliant database. Since nearly all relational database management systems (DBMSs) support SQL, and because Java itself runs on most platforms, JDBC makes it possible to write a single database application that can run on different platforms and interact with different DBMSs. JDBC is similar to ODBC, but is designed specifically for Java programs, whereas ODBC is language-independent. JDBC was developed by JavaSoft, a subsidiary of Sun Microsystems. See ODBC.

 

So it looks like it is designed for Java (as I thought).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.