A Database Query Language¶
Overview¶
HTSQL is a URI-based high-level query language for relational databases. HTSQL wraps your database with a web service layer, translating HTTP requests into SQL and returning results as HTML, JSON, etc.
HTSQL is designed for those who need a usable and comprehensive query tool for data access and reporting.
- Introduction
- get a taste of HTSQL
- Tutorial
- learn HTSQL by example
- Reference
- an in-depth discussion of how HTSQL works
- Download
- binary and source distributions
- Usage
- configuring and running HTSQL
Community¶
- Follow HTSQL community announcements on twitter.
- See conference slides, videos & papers.
- Subscribe to the mailing list htsql-users.
- Chat with us on the #htsql IRC channel on Freenode.
- Submit a bug report at HTSQL issue tracker.
Applications¶
HTRAF Toolkit is a Javascript framework for embedding data into HTML pages. It can be used with HTSQL to quickly create attractive reports and dashboards.
<body>
<h3>Select a School</h3>
<select id="school"
data-htsql="/school{code, name}"></select>
<div style="width: 500px; height: 350px;"
data-htsql="/program{title, count(student)}
?school_code=$school&count(student)>0"
data-ref="school" data-type="pie" data-widget="chart"
data-title="Percent of Students by Program"></div>
<h3>Departments</h3>
<p>Filter by name: <input id="department_name"/></p>
<table id="department" data-hide-column-0="yes"
data-htsql="/department{code, name, school.name}
?school_code=$school&name~$department_name"
data-ref="school department_name"></table>
<p>
The selected department:
<em data-htsql="/department{name}?code=$department"
data-ref="department"></em> <br/>
The number of courses in the selected department:
<strong data-htsql="/department{count(course)}
?code=$department"
data-ref="department"></strong>
</p>
<h3>Courses</h3>
<table id="course"
data-htsql="/course?department_code=$department"
data-ref="department"></table>
</body>
The dashboard above shows a 3-level drill down (school, department and course) for a university schema. For more examples like this, browse our Gallery.
License¶
HTSQL is a a high-level query language and web service gateway for relational databases. Prometheus Research offers HTSQL under a dual licensing model.
- HTSQL is under a BSD style permissive license (no restrictions on proprietary applications) when used in conjunction with public domain or open source database system software, such as SQLite, PostgreSQL or MySQL.
- In the future we may offer commercial licensing for database systems such as Microsoft SQL Server and Oracle. Please contact us at Prometheus Research
Although this licensing strategy does not conform with all OSI criteria for an “open source license”, we feel it provides significant benefit to the open source community while maintaining our ability to fund future development.
Credits¶
HTSQL was developed by Clark C. Evans and Kirill Simonov, both of Prometheus Research, LLC. Generous support for HTSQL was provided by the Simons Foundation. This material is also based upon work supported by the National Science Foundation under Grant #0944460. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
