FAQ
Kirill Simonov and myself would like to introduce HTSQL, a novel
approach
to relational database access which is neither an ORM nor raw SQL.

HTSQL is a URI-based high-level query language for relational databases.
It's implemented as a Python WSGI application. Currently it supports
PostgreSQL and SQLite (more databases & juicy features forthcoming).

Homepage: http://htsql.org
Download: http://pypi.python.org/pypi/HTSQL/
Source: http://bitbucket.org/prometheus/htsql

At this point, HTSQL 2.0 may not be mature enough for production use; we
expect to fill in any remaining gaps in the coming months.

We're curious what you think. Join us in #htsql on freenode [1],
subscribe
to the mailing list [2] and please come to our PyCon 2011 talk [3].

Clark & Kirill

[1] irc://irc.freenode.net/#htsql
[2] http://lists.htsql.org/mailman/listinfo/htsql-users
[3] http://us.pycon.org/2011/schedule/sessions/264/

Search Discussions

  • Rusi at Jan 22, 2011 at 5:25 am

    On Jan 22, 2:45?am, "Clark C. Evans" wrote:
    Kirill Simonov and myself would like to introduce HTSQL, a novel
    approach to relational database access which is neither an ORM nor raw SQL. :
    We're curious what you think.
    Thanks -- looks interesting.

    Given the claim htsql is higher level than sql I am interested in
    bill-of-materials type (recursive) queries.
  • Clark C. Evans at Jan 22, 2011 at 5:13 pm

    On Fri, 21 Jan 2011 21:25 -0800, "rusi" wrote:
    On Jan 22, 2:45?am, "Clark C. Evans" wrote:
    Kirill Simonov and myself would like to introduce HTSQL, a novel
    approach to relational database access which is neither an ORM
    nor raw SQL.
    Given the claim htsql is higher level than sql I am interested in
    bill-of-materials type (recursive) queries.
    Rusi,

    HTSQL 2.0 does not yet support SQL's common table expressions.
    However, this particular use case, along with CUBE, server-side
    stored procedures, and related needs is what made us branch
    from our 1.X production release. Our immediate focus is SQL-92.
    Once we cover most SELECT patterns and SQL back-ends, we'll be
    looking at SQL:1999, SQL:2003, and SQL:2008 (as well as
    proprietary equivalents such as Oracle's CONNECT BY).

    Best,

    Clark
  • Kirill Simonov at Jan 22, 2011 at 5:20 pm

    On 01/22/2011 12:25 AM, rusi wrote:
    On Jan 22, 2:45 am, "Clark C. Evans"wrote:
    Kirill Simonov and myself would like to introduce HTSQL, a novel
    approach to relational database access which is neither an ORM nor raw SQL. :
    We're curious what you think.
    Thanks -- looks interesting.

    Given the claim htsql is higher level than sql I am interested in
    bill-of-materials type (recursive) queries.
    Currently HTSQL does not support recursive queries. That said, it's
    certainly within the reach of HTSQL and I could sketch here how the
    support may look like:

    We add an operator `closure()` that, given a self-referential link
    `link`, produces a transitive closure `closure(link)` of the link.

    For example, take a table `program` with a link `program.part_of`. Then
    `program.closure(part_of)` is a plural link mapping a program to its
    super-programs, which you can use just like a regular plural link, for
    instance, in aggregate expressions.

    To return, for each program, a list of its super-programs:

    /program{code, /closure(part_of){code}}

    To return all sub-programs of a specific program 'xxx':

    /program?exists(closure(part_of).code='xxx')

    Compare that with

    /program{code, part_of.code}
    /program?part_of.code='xxx'

    I think it would be a modest improvement over a SQL alternative.

    I'm adding it to the roadmap right now, but don't hold your breath -- Q4
    this year or early next year is a realistic ETA. I expect the
    implementation to be at least moderately painful and, obviously, it
    could only work with those backends that support WITH RECURSIVE.


    Thanks,
    Kirill
  • Rusi at Jan 22, 2011 at 5:36 pm

    On Jan 22, 10:20?pm, Kirill Simonov wrote:
    On 01/22/2011 12:25 AM, rusi wrote:

    On Jan 22, 2:45 am, "Clark C. Evans"<c... at clarkevans.com> ?wrote:
    Kirill Simonov and myself would like to introduce HTSQL, a novel
    approach to relational database access which is neither an ORM nor raw SQL. :
    We're curious what you think.
    Thanks -- looks interesting.
    Given the claim htsql is higher level than sql I am interested in
    bill-of-materials type (recursive) queries.
    Currently HTSQL does not support recursive queries. ?That said, it's
    certainly within the reach of HTSQL and I could sketch here how the
    support may look like:

    We add an operator `closure()` that, given a self-referential link
    `link`, produces a transitive closure `closure(link)` of the link.

    For example, take a table `program` with a link `program.part_of`. ?Then
    `program.closure(part_of)` is a plural link mapping a program to its
    super-programs, which you can use just like a regular plural link, for
    instance, in aggregate expressions.

    To return, for each program, a list of its super-programs:

    ? ? ?/program{code, /closure(part_of){code}}

    To return all sub-programs of a specific program 'xxx':

    ? ? ?/program?exists(closure(part_of).code='xxx')

    Compare that with

    ? ? ?/program{code, part_of.code}
    ? ? ?/program?part_of.code='xxx'

    I think it would be a modest improvement over a SQL alternative.

    I'm adding it to the roadmap right now, but don't hold your breath -- Q4
    this year or early next year is a realistic ETA. ?I expect the
    implementation to be at least moderately painful and, obviously, it
    could only work with those backends that support WITH RECURSIVE.
    O well...
    I was hoping for some some quick-queries (one-liners?) to probe
    firefox's bookmarks (which are in sqlite)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 21, '11 at 9:45p
activeJan 22, '11 at 5:36p
posts5
users3
websitepython.org

People

Translate

site design / logo © 2021 Grokbase