Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace MySQL Server with Apache Derby as a PHP application database?

What's the code syntax, and what all do I need to install and configure, for connecting to a Derby DB and invoking Derby Stored Procedures (which are really Java code) from a PHP Application?

i.e. In the PHP code, I want to replace the familiar mysql_connect() and mysql_query() calls with something that will connect to a Derby database instead, and execute queries and stored procedures there.

like image 406
Alex R Avatar asked Mar 10 '10 21:03

Alex R


People also ask

What is the difference between Derby and mysql?

Derby suits well when there is need of small RDBMS in an application. MYSQL suits well for both small and large organizational data storage for an application.

Is Apache a Derby relational database?

Apache Derby, an Apache DB subproject, is an open source relational database implemented entirely in Java and available under the Apache License, Version 2.0. Some key features include: Derby has a small footprint -- about 3.5 megabytes for the base engine and embedded JDBC driver.


2 Answers

If I understand correctly, you want to connect to JavaDB (also called Derby or Apache Derby) from PHP?

If so, you'll need IBM DB2 support on your PHP server.

like image 192
dev-null-dweller Avatar answered Nov 14 '22 22:11

dev-null-dweller


You can also use PDO with ODBC.

like image 39
v6ak Avatar answered Nov 14 '22 22:11

v6ak