Read Database Metadata

X

Xd Ork

Hi All,

I'm reviewing Ruby if its appropriate for my project. I'm planning to
port my existing application made from Java to Ruby but before I do that
I have to check if Ruby have capablities of doing the following:

1. Connect to different Database.
2. Read Database Metadata.
3. JDBC like way of communicating with databases.


I would really appreciate if you can name some APIs and documents that
may enlighten me with my queries.

Thanks in advance,
Jag
 
B

Brian Candler

Xd said:
I'm reviewing Ruby if its appropriate for my project. I'm planning to
port my existing application made from Java to Ruby but before I do that
I have to check if Ruby have capablities of doing the following:

1. Connect to different Database.
2. Read Database Metadata.
3. JDBC like way of communicating with databases.

You can certainly connect to different databases and read metadata. I
have no idea what a "JDBC like way" of communicating with databases
means.
I would really appreciate if you can name some APIs and documents that
may enlighten me with my queries.

http://ar.rubyonrails.com/ [used by Rails]
http://sequel.rubyforge.org/
http://datamapper.org
http://www.nitroproject.org/ [look for og]

Plus you have the lower-level ruby-dbi, and then the low-level APIs for
the native databases (e.g. ruby-oci8 for Oracle)
 
F

Florian Gilcher

Hi All,

I'm reviewing Ruby if its appropriate for my project. I'm planning to
port my existing application made from Java to Ruby but before I do
that
I have to check if Ruby have capablities of doing the following:

1. Connect to different Database.
2. Read Database Metadata.
3. JDBC like way of communicating with databases.

If you want do have a behaviour that matches JDBC, use JRuby and
JDBC ;).

But to make things clear: Ruby as well as Java has no idea what a
database is.
So it is not a "Ruby capability". But there are enough well-tested
libraries for
doing this in a lot of fashions that you can imagine. Databases are no
problem.

Regards,
Florian Gilcher
 
X

Xd Ork

Florian said:
If you want do have a behaviour that matches JDBC, use JRuby and
JDBC ;).

But to make things clear: Ruby as well as Java has no idea what a
database is.
So it is not a "Ruby capability". But there are enough well-tested
libraries for
doing this in a lot of fashions that you can imagine. Databases are no
problem.

Regards,
Florian Gilcher


Thanks Florian for the reply.
I already tried JRuby and JDBC but I was thinking that since JDBC is
really for java, my code will then be only run in JRuby, making my
application requires their runtime which for me is not ideal and there's
is no point anymore of migrating my old java application to ruby. I'm
looking for a library which works like JDBC. I googled around and found
Ramen but it only works now for few database. Can you name some library?
 
X

Xd Ork

Brian said:
Xd said:
I'm reviewing Ruby if its appropriate for my project. I'm planning to
port my existing application made from Java to Ruby but before I do that
I have to check if Ruby have capablities of doing the following:

1. Connect to different Database.
2. Read Database Metadata.
3. JDBC like way of communicating with databases.

You can certainly connect to different databases and read metadata. I
have no idea what a "JDBC like way" of communicating with databases
means.
I would really appreciate if you can name some APIs and documents that
may enlighten me with my queries.

http://ar.rubyonrails.com/ [used by Rails]
http://sequel.rubyforge.org/
http://datamapper.org
http://www.nitroproject.org/ [look for og]

Plus you have the lower-level ruby-dbi, and then the low-level APIs for
the native databases (e.g. ruby-oci8 for Oracle)


Hi,

In JDBC, to connect into a database you just need to have a driver for
the database you want to connect to. Once connected you can get the
metadata of the database and query its properties. Same code and logic
will work in any database. These are the kinds of freatures I'm looking
if there is an equivalent in Ruby.

Thanks
Jag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top