开发者

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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜