Ess Expression Database

Under DynamicRelational, the idea of an EssExpression Database popped up. What if a database had "tables" with more or less this structure (emulation-wise):

  table: EssExs
  ------------
  table_name
  row_id        // auto-gen
  ess_expression  // long-text

Suppose we made an SQL-like query language for such a tool. What would a query language look like for it? What do EssExpression query systems look like in general. A quick googling didn't turn up anything about query languages for ess-expressions. perhaps general tree query languages can be studied, but there's the issue of ordered trees versus unordered trees. (Lisp uses ordered trees).

How could one effectively index the bugger besides on just ID and table name? I suppose every item in the ess-expression could be indexed, similar to text indexers, but this would only do part of the job.

A query language on quoted EssExpressions would look a lot like XPath/XQuery minus the XML bias, likely integrated with a transform language. Within the SQL context, such a query language would be a bit like a function over the ess_expression column, excepting with the ability to return multiple values (each of which would become a row in the returned table... e.g. if you applied a function over ess_expression that returned leaves of the tree, you might end up with a table where 'row_id' is repeated once per leaf). One cannot express 'unordered trees' in EssExpressions; instead, one would need to craft some queries and operators themselves so they are unconcerned about order (e.g. describing pattern-matches within the tree).


EditText of this page (last edited February 14, 2009) or FindPage with title or text search