Is it possible to access a local HSQL database from Ruby as well as from Java? (separately of course, not concurrent) The Ruby SQL toolkit called Sequel, for example, claims to have "adapters" for JDBC, so I think the answer is yes, yes? =)
If the answer is "kind of" or something, is there a better RDBMS that would allow straightforward access from both languages? Ideally I would want support for server-side DB's as well...
Yes, provided that you use the JRuby implementation of Ruby. I've used Sequel with H2 on JRuby - IIRC I just installed Sequel and the h2 gem on JRuby and then specified the database connection as normal.
There is a rubyforge project for an HSQLDB driver. I haven't used it, but it looks like what you're after.
I am not a Ruby programmer so not sure about Ruby. But if there is a JDBC adapter for that database then you should be able to access the database.
If you're using JRuby, you can use all JDBC adapters.
Related
see https://docs.oracle.com/en/database/oracle/oracle-database/19/jjdbc/continuos-query-notification.html#GUID-17D0D7C5-77C9-420D-9D13-F668C1056792
The documentation defines use for JDBC, does this mean that other Oracle drivers will not work?
If it does work on a particular version of Oracle please specify (presumably after 11g).
No, although the feature documentation page only mentions JDBC, it's also possible for other languages.
see https://docs.oracle.com/database/121/ODPNT/featChange.htm#ODPNT413
Also logically, JDBC must communicate over the network to the Oracle database server, and therefore it's feasible to implement for the client libraries of other software languages and not technically limited to just Java and .Net Framework.
I have a program in c# and need to connect to SQL via JDBC. I read that JDBC works with java and since I need to use it from C#, I found out that there is jni4net that bridges between the two.
I can't seem to find any samples or tutorials on how to do so. Any help will be appreciated. I have read and tried using jni4net, but I couldn't find any sample connecting to a database.
JDBC stands for Java DataBase Connectivity, which means it is for Java (or other languages that can run on the Java Virtual Machine). C# is a different language with its own runtime. Although it may be possible to access Java from C#, doing so for database connections would probably be really cumbersome and slow.
Instead you should look for an ADO.net database provider for your database system(s). Most database systems have one.
You may use the robbiblubber.org JDBC Extension Libaray to connect to a database via JDBC from .NET. Of cource, if there is a native driver for ADO.NET, you should use that.
I am currently working on a simple web-based program involving a user typing in a word in a client program(written in Java), and sending the word and other basic information to a database. I am finished with the word typing portion, but I have no idea what to do about the database. What software should I use for the database? Here are the requirements that I need for the database:
Read/Write Functionality
Java compatibility
Easy to use/set up
Has plenty of tutorials/documentation
Thank you all for your help!
It sounds to me that this is either a dev experiment or a school project. If this is something you're playing with I think the easiest/quickest would be to go with Sqlite. Here is some info on using it with Java: Java and SQLite
If it is something you intend to deploy in a production environment then go with mysql and jdbc.
How about sqlite?
Its very simple, extremely well supported and if you need to do some more advanced SQL queries it can do that as well.
I would use MySQL and a JDBC driver for communicating with it. The trick is to Google
java mysql jdbc
That should give a lot of usefull results. Good luck!
If you're just learning about databases and getting started, nothing is simpler than an sqlite database since it's actually nothing more than a static file. Here is a jdbc driver for it: http://www.zentus.com/sqlitejdbc/
I'm trying to select a JDBC driver for an application I'm building and I've found lots of drivers, but I can't seem to narrow the selection down to one. The driver I select should have the following features:
Free for commercial use
Easy to install (eg. single jar file, no drivers to install)
Easy to use (well documented)
No database server required
Multi-user / Network support
What JDBC database drivers would you suggest?
So far I've considered TinySQL and SQLite.
The database is not very large think maybe 10k records.
The JDBC driver depends on the database you want to use. Some free databases include:
Derby (small, lightweight, comes with Java 1.6)
MySQL (bigger, lots of features)
PostgreSQL (bigger, lots of features)
I'm sure there are others.
When you install the database, the documentation will tell you where to get the JDBC driver.
Unless you have specific requirements, I would have suggested that you use MySQL, it is free and very popular. Also, it is very easy to use through JDBC. However, I then saw your comment:
I want to use a JDBC driver so if I
change databases the database will
have the same interface. Right now I
need a database that meets the above
requirements.
The problem is that, as far as I know, JDBC alone isn't that flexible. With JDBC you basically pass strings to and fro the application and the database engine. If you want something that allows you to change the database but doesn't impact the way that your application and database communicate, you should consider and ORM tool like Hibernate.
The OP asked for 'no database server'. That means that there are two options in common use: Derby and HSQLDB that integrate well into Java.
I'm very interesting in inexpensive (better free) SQL query tool for working with multiple databases.
Generally speaking it should works with all databases which Hibernate supports, but it must work with Microsoft SQL Server (2000/2005/2008), Oracle (9i/10g/11g), Postgres 8.x, Sybase, Firebird, MySQL and HSQLDB.
Must have features:
SQL code completion
Syntax highlighting
Nice to have features:
Hibernate integration
Database specific options (like query execution plan)
Not sure if it worth to mentioned, but it will be used together with Eclipse (multiple workspaces).
My favorite is Squirrel SQL. Works well, simple to set up, nice GUI, works with all JDBC databases.
http://squirrel-sql.sourceforge.net/
I really liked SQUrrel until I discovered DBClient THere's also DbVisualizer but it's not free anymore
I'm really surprised nobody mentioned any Eclipse plugins which will fit neatly into your requirements. See my answer to this question. Also, MyEclipse recently released a cool visual query builder which you might want to check out.
i think everyone will give you same solution, squirrel sql ,we are all using same tool =)