thimes has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way to use DBI with a home-grown database. It is an object-oriented db and I only have a Java command line interface to do queries with. It uses a SQL like query language. i.e. jdql "select OBJECT_NAME from <collection>"

Replies are listed 'Best First'.
Re: DBI question
by igelkott (Priest) on May 31, 2008 at 09:29 UTC

    Sure, if you write the specific driver for you language. Don't know if it helps but that's what you'd need to do for a custom DB.

    Might try looking at DBIx::AnyDBD or another DBD for help. Could also check http://dbi.perl.org/.

Re: DBI question
by graff (Chancellor) on May 31, 2008 at 16:11 UTC
    If there is an unavoidable mandate to keep the "home-grown database" in operation (e.g. because some critical activity is intricately dependent on using that Java command line interface tool, and you can't change that), then a worst-case-kluge scenario for a perl interface might be to write a wrapper module that simply runs your java command line tool in some sensible way.

    But I'd really want to check whether it would be possible to replace this home-grown DB with something else that has broader support and better (more flexible) accessibility. Just use the existing java command line tool to dump out the current contents, load them into some other DB, and move on.