Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-180

Place a crude JDBC driver over Dbase files



    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Done
    • None
    • 0.7
    • Shapefile


      It would be useful to be able to query DBF content through SQL.
      But there are no free drivers available for the old Dbase 3 format.

      The first step is to create short implementations of Connection, Statement, ResultSet, ResultSetMetadata interfaces for a JDBC using our Database class as core binary loader at the begining.

      The main difficulty is to respond to a SQL request, and first : being able to analyze it to understand what is expected.
      The SQL request analysis is a very strong job, but I suggest to ease it a lot by relying on AntLR API for grammar analysis, associated with a BNF grammar file, maybe taken from 1 or from elsewhere (grammars are of public domain).

      The goal of this current JIRA is only to be able to perform a
      SELECT * FROM <shapefile layer name>
      The WHERE clause or the selection of fields, will come later in other JIRA.

      No transactions, classic Statement only.
      PreparedStatement would be also implemented later (another JIRA).

      Of course, this improvment can be discarded if an open source or free driver is discovered, that would allow us to execute SQL requests on DBase 3 easily.

      1 For example, http://www.savage.net.au/SQL/ has some BNF, but maybe elsewhere they will more compliant with AntLR.


        1. src.zip
          497 kB
          Marc Le Bihan

        Issue Links



              mlebihan Marc Le Bihan
              mlebihan Marc Le Bihan
              0 Vote for this issue
              3 Start watching this issue