title: Which relational databases exist with a public API for a high level language?
body: <p>We typically interface with a RDBMS through SQL. I.e. we create a sql string and send it to the server through JDBC or ODBC or something similar.</p>
  
  <p>Are there any RDBMS that allow direct interfacing with the database engine through some API in Java, C#, C or similar? I would expect an API that allows constructs like this (in some arbitrary pseudo code):</p>
  
  <pre><code>Iterator iter = engine.getIndex("myIndex").getReferencesForValue("23");
  for (Reference ref: iter){
      Row row = engine.getTable("mytable").getRow(ref);
  }
  </code></pre>
  
  <p>I guess something like this is hidden somewhere in (and available from) open source databases, but I am looking for something that is officially supported as a public API, so one finds at least a note in the release notes, when it changes.</p>
  
  <p>In order to make this a question that actually has a 'best' answer: I prefer languages in the order given above and I will prefer mature APIs over prototypes and research work, although these are welcome as well.</p>
  
  <p>------------------ Update ----------------</p>
  
  <p>Looks like I haven't been clear enough.</p>
  
  <p>What I am looking at is a lower level API, sort of what the RDBMS probably use internally. RDBMS have the concept of an execution plan, and the API I am looking for would allow us to actually execute an execution plan without specifying the intended result, using SQL or similar.</p>
  
  <p>The very vague idea behind this is to implement a DSL which translates directly to RDBMS system calls, without going through SQL or similar.</p>
  
  <p>Trying to explain it in yet a different way: When e.g. Oracle gets fed with a SQL statement, it parses that statement, creates an execution plan out of it and finally executes the execution plan using some internal API, which probably allows things like: retrieving a specific row from a table, retrieving a range or rowids from an index, joining to sets of rows using a hash join and so on. I am looking for that API (or something similar for an RDBMS where this is available)</p>
  
  <p>---------- Another update after comment by Neil ----------------</p>
  
  <p>I think it would be appropriate to consider the API I am looking for the 'ISAM' level as in the second bullet point on this article: <a href="http://en.wikipedia.org/wiki/ISAM" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/ISAM</a></p>