Commits

Clark C. Evans committed 8d34ed7

filling in last part of showcase
some editing of previous examples

Comments (0)

Files changed (2)

NEWS

-List of Changes
-===============
-
-
-2.0.0 beta 5 (2010-12-14)
--------------------------
-
-* Completed the SQLite backend.
-* Completed the standard library.
-
-
-2.0.0 beta 4 (2010-12-05)
--------------------------
-
-* Refactored peep-hole optimization of the frame tree and SQL
-  serialization; refined the generated SQL.
-* Refactored the internal API for adding functions.
-* Added new (experimental) syntax for infix function call.
-* Added an "Examples" section to the documentation.
-* Fixed compatibility with Python 2.5.
-* Many minor bugfixes, documentation updates, etc.
-
-
-2.0.0 beta 3 (2010-11-09)
--------------------------
-
-* Refactored the translator from the term tree to the frame tree;
-  added a new translation step to collapse nested frames and reduce
-  SQL expressions.
-* Added the HTRAF demo: use HTSQL with client-side javascript
-  to define complex dashboards.
-* Added the SSI demo: using HTSQL for web without giving direct access
-  to the database.
-* Updated the tutorial, minor bugfixes, regression test updates, etc.
-
-
-2.0.0 beta 2 (2010-10-01)
--------------------------
-
-* Refactored the translator from the expression graph to the term tree.
-* Added `Content-Disposition` header to `:json` and `:csv` renderers.
-* Merged the tutorial to the repository.
-
-
-2.0.0 beta 1 (2010-09-21)
--------------------------
-
-* Initial beta release.
-* PostgreSQL and SQLite backends are (mostly) supported, the former
-  more than the latter.
-* The SQL translator needs more work, in particular, the term tree,
-  the frame structure and the serializer.
-* Lots of functions are either not implemented or missing a proper
-  serializer, especially in the SQLite backend.
-* Other areas which need more work before the final release: rendering,
-  introspection, regression tests and documentation.
-
   HTSQL Showcase
 ******************
 
-
 What is HTSQL?
 ==============
 
 HTSQL is a query language and web service for relational databases.
 
-
 HTSQL is a Web Service
 ----------------------
 
 .. _Accept: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
 .. _URLs: http://www.ietf.org/rfc/rfc3986.txt
 
-
 HTSQL is a Relational Database Gateway
 --------------------------------------
 
 the database.  At runtime, each request is then translated into SQL and
 executed.
 
-
 HTSQL is an Advanced Query Language
 -----------------------------------
 
 were a database assembler.
 
 
-Show me HTSQL
-=============
+Show me this HTSQL!
+===================
 
 HTSQL was designed from the ground up as a self-serve reporting tool for
 data analysts.  With HTSQL, the easy stuff is truly easy; oh, yea, and
 complex stuff is easy too.
 
-For the examples below, the following "university catalog" schema is
-used.  It has two top-level tables, ``school`` and ``department``, where
-``department`` has an optional link to ``school``.  Subordinate tables,
-having mandatory foreign key references are ``course`` and ``program``::
+Database Introspection
+----------------------
+
+On startup, HTSQL examines tables, primary keys, and foreign keys
+to construct a navigational graph of your database.  For example::
 
          +------------+               +------------+
     /---+| DEPARTMENT |>-------------o|   SCHOOL   |+---\
     |.   +------------+        .      +------------+   .|
     | .                       .                       . |
     |  .                     .                       .  |
-    |   department       department         a school    |
-    |   offers           may be part        has one or  |
-    |   courses          of school          programs    |
+    |   department       department        school may   |
+    |   offers           may be part       offer some   |
+    |   courses          of school         programs     |
     |                                                   |
     |                                                   |
     |    +------------+               +------------+    |
     \---<|   COURSE   |               |  PROGRAM   |>---/
          +------------+               +------------+
 
+For the examples below, the "university catalog" schema above is used.
+It has two top-level tables, ``school`` and ``department``, where
+``department`` has an optional link to ``school``.  Subordinate tables,
+having mandatory foreign key references are ``course`` and ``program``.
 
 Choosing a Table
 ----------------
 
 .. _Q1: http://demo.htsql.org/department
 
-
 Selecting Columns
 -----------------
 
      http://demo.htsql.org
      /department{school.name :as 'School', name :as 'Department'}
 
-
 Filtering Rows
 --------------
 
      http://demo.htsql.org
      /course?department.school='egn'&credits>3
 
-
 Paging and Sorting
 ------------------
 
      http://demo.htsql.org
      /course.sort(credits).limit(10,20)
 
-
 Aggregating Data
 ----------------
 
 
 HTSQL can be used with any number of higher-level tools.
 
-
 HTSQL Makes Dashboarding Easy
 -----------------------------
 
 drill down (``school``, ``department`` and ``course``) for a university
 schema.  The live demo for this dashboard is at http://htraf.htsql.org/.
 
-
 HTSQL is a Communication Tool
 -----------------------------
 
 What's up Next?
 ===============
 
+Over the next few months we'll be adding more features (some
+of them are already implemented in our internal 1.X branch).
+
+Projections
+-----------
+
+HTSQL supports complex grouping operations.
+
+.. container:: vsplit
+
+   .. sourcecode:: htsql
+
+      /program{degree^, count()}
+
+   .. sourcecode:: sql
+
+      SELECT degree, COUNT(TRUE)
+      FROM ad.program
+      GROUP BY 1
+      ORDER BY 1;
+
+This query (N1_) returns the number of programs per degree.
+
+.. _N1:
+     http://demo.htsql.com
+     /program{degree^,count()}
 
 Hierarchical Output
 -------------------
 
-HTSQL will not be limited to tabular output.
+HTSQL is not limited to tabular output.
 
-.. sourcecode:: htsql
+.. container:: vsplit
 
-   /school{name, /program{title}, /department{name}}
+   .. sourcecode:: htsql
 
-This query (R1_) returns programs and departments
+      /school{name, 
+          /program{title}, 
+          /department{name}}
+
+   .. sourcecode:: sql
+
+      SELECT name, code
+      FROM ad.school
+      ORDER BY code;
+
+      SELECT s.code, p.title
+      FROM ad.school AS s
+      INNER JOIN ad.program AS p
+      ON (s.code = p.school)
+      ORDER BY s.code, p.code;
+
+      SELECT s.code, d.name
+      FROM ad.school AS s
+      INNER JOIN ad.department
+      AS d ON (s.code = d.school)
+      ORDER BY s.code,d.code;
+
+This query (N2_) returns programs and departments
 in each school.
 
-.. _R1:
+.. _N2:
      http://demo.htsql.com
      /school{name}/(program{title};department{name})
 
+More Backends
+-------------
 
-Projections
------------
+The current release of HTSQL supports PostgreSQL and SQLite.
+Subsequent releases will add support for MySQL, Oracle and
+Microsoft SQL Server.
 
-HTSQL will support complex grouping operations.
+The challenge here is providing consistent function definitions 
+and semantics that work across various SQL database systems.
 
-.. sourcecode:: htsql
-
-   /program{degree^, count()}
-
-This query (R2_) returns the number of programs per degree.
-
-.. _R2:
-     http://demo.htsql.com/program{degree^,count()}
-
-