简体   繁体   中英

Java bridge between PHP and Database

First, I will present what it is doing my web-application: The subject of this web-application is different distributed databases and distributed data sistems with a specific type of information. Until now I programed using PHP, JavaScript and JQuery-ui. For databases I used MySQL and PostgreSQL and I thinking to use and Oracle. On short way on my web application the user firstly have to register. If he is accepted by Admin then he have the possiblities:

  1. Connect to HIS database (MySQL, Oracle, Access, PostgreSQL)
  2. Run queries between two, different or not, databases

  3. To connect to his database the user enter information like: host, user, password and name of database. At next step he can see the tables from database. If he select one line he will be able to Update, Create and Delete the content from the selected table.

  4. On this section the user can look for similarities between the two databases (with key words or structures of tables): one that belongs to him and another one that belongs to the Admin.

I use WampServer, version 2.1 with Apache/2.2.17 and PHP/5.3.5 and I want to do a bridge who will be responsable with the connection to the databases and in which I will comunicate with different databases. The informations from interface will be sent as MySQL queries and in the bridge I will adapt that queries for each type of database.

Can someone to help me? Soon as possible.

Thank you !

Simon

The informations from interface will be sent as MySQL queries and in the bridge I will adapt that queries for each type of database.

This is a very bad idea for two serious reasons:

  1. To implement it, you'd have to write your own SQL parser.
  2. Each major database implements its own dialect of SQL, which means you'll have to know how to translate between their specific syntax and command sets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM