I'm looking for embedded db with Java API for testing purposes.
Also i need pl/sql support because we use oracle in production and migrations are written in pl/sql.
I want to test my DAO objects and i need to create db in memory in process of unit test using migration scripts.
Now we use HSQLDB but it does't support pl/sql.
Can you recommend anything?
According to the wikipedia page about PL/SQL, the databases supporting PL/SQL are Oracle and DB2:
Embedded DB2
Embedded Oracle
If these don't suit you, there's nothing else. PL/SQL is a creation of Oracle, so it's not expected to be widely spread.
You could try installing Oracle XE on your local developer workstation and Continuous Integration server. Then connect with the SYS as SYSDBA or SYSTEM user to create your schema(s) before executing your unit tests.
We use Firebird's pl/sql extensively. It has an embedded server you can access through JDBC.
Related
I have developed a Java project that uses an SQL Server 2008 Database. Now if I want to deliver this Java application to any person such as client that will practically implement my Java application into his/her use, how will I deliver the database that is used to store the data used by the application? i-e I need to deliver the database with jar file.
If I understand correctly, you're asking how to package an MS SQLServer database in a java jar file?
That's just not possible, sorry. SQLServer is a commercial, platform-specific (Windows), native application, so the will have to be installed by the 'client'.
If you really need to embed the database in your application, and don't absolutely need to use SQL Server, there are several Java-based, embeddable databases available, such as HSQLDB, H2, Derby, SQLite, etc.
I've been searching for an answer to a question which is as easy to ask, as it difficult to find an answer:
Is there any possible way in .Net that I can use to connect to Apache Derby?
Is there any supported embedded database [with in local drive] as same as Apache Derby in .net?
Is there any supported network database [with in local drive on network] as same as Apache Derby in .net?
As .Net can't connect through JDBC and Derby doesn't support anything else I doubt you will be able to do this.
As you are apparently looking for an embedded Database you might want to have a look at Firebird: http://www.firebirdsql.org/
It does have a .Net connector if I'm not mistaken and you can run it as a network server, or a "file-base" embedded engine.
It is a very nice and capable DBMS (it has several features Derby does not have), the only drawback is that the documentation is a mess (there is no single complete manual that would cover the complete SQL syntax for the current version).
Is there a database that can be embedded in a Java program but also allow access through ODBC; more specifically, ODBC through ADOdb?
The environment is MS Windows (XP on).
The situation is that a Java program (mine) runs an external program (not mine) that uses an ADOdb.Connection object to connect to the embedded database and extract data. Oh, legacy support.
I've been trying to set this up using Derby (i.e. JavaDB/Cloudscape) and the NetworkServerControl object, but cannot figure out how to configure the System DSN such that an ADODB.Connection object can connect. Chances are I'm doing it wrong, but I can't figure out how to specify the path to the Derby files.
Is there an embedded db that can be accessed in this manner? Preferably one (unlike Derby) that doesn't require unsupported third-party drivers for ODBC access?
Alternatively, am I going about this completely wrong? I'm not very conversant with databases, nor ADOdb or .NET in general.
H2 stated a ODBC driver on the features list (but still experimental).
I want to see the tables of my Play! application with the H2 console, but all I see is a list of internal tables of the db engine. How can I view the tables of my application?
Log on to the JDBC URL jdbc:h2:mem:play instead. That is where the development database runs on at least on my Play instance.
Most likely, you are looking a different database. Could you verify the database URL is really jdbc:h2:~/play?
You should also consider upgrading to a more recent version of H2. The version you are using (1.3.149) is a beta version.
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.
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.
You can also use PDO with ODBC.