Re: Should the DBI layer be query language agnostic, even completely "ignorant"?
hga@xxxxxx 20 Sep 2019 14:11 UTC
> From: Lassi Kortela <xxxxxx@lassi.io>
> Date: Friday, September 20, 2019 7:06 AM
>
>> That's indeed my point, and those two non-SQL databases, plus we
>> assume the in-progress Graph Query Language (GQL), match the SQL
>> interaction shape, including columns having names. Which we can be
>> sure is No Accident.
>
> I don't know much about graph databases in general, but GraphQL query
> results have a completely different structure from SQL query results.
> It's hierarchical (literally JSON, basically) instead of tabular.
I too don't know much about them, but see for example
https://neo4j.com/docs/cypher-manual/current/introduction/ for
some ways Neo4j get around this, as I assume GQL will.
I assume they're expressing graph results as relations since everyone is
used to consuming the latter, and to wild contortions in SQL queries.
> Document databases like CouchDB can be expected to hit the same issue.
> IIRC they also return hierarchical results, or at least some of them.
It's not in the top 20 of either of the lists, in fact no document
database made the cut with all the constraints I used.
>> Strongly suggesting my project will be (re-)named sdbi for Scheme
>> Database Interface
> This is a tangential nit, but I'd avoid inventing new acronyms where
> possible. A Scheme Database Interface could be called just "database",
> since you always call it from Scheme, and anything you can call is an
> interface. So procedures named like "database-connect" (or abbreviated
> "db-connect") would be clearer than "sdbi-connect".
You have a point, but:
> Using a generic name like "database" has the added benefit that it
> discourages people from making slightly different APIs for the same
> task; if the obvious name is already reserved, it sends a strong signal
> that this is the official one (even if it isn't officially official :)
I'm more than a bit hesitant to declare that my entirely theoretical
API will become official. And I doubt John would be willing to wait for
perhaps a year for it to possibly become a real thing and even an SRFI,
while the Scheme community needs yesterday a persistence facility ably
supplied by the zero-admin dynamically typed SQLite.
- Harold