Latest Release: restSQL 0.8.10, released Feb 16, 2015, adds performance monitoring and resource documentation. See the release notes for more detail.
If you would like to be notified of new releases, please subscribe to our mailing list.
What it is
- an SQL generator with Java and HTTP APIs
- uses a simple RESTful HTTP API with XML or JSON serialization
- presents flat or hierarchical views of relational database tables
- organizes access through query-able and updatable database views called SQL Resources
- uses declarative authorization
- offers declarative and plugin mechanisms for implementing domain constraints and business logic
- a JEE web application or a Java library
- platform, JEE container and database agnostic
What it is Not
- an HTTP to JDBC/ODBC bridge that tunnels SQL over HTTP
- an Object-Relational Mapping tool (ORM) that maps tables to objects
- a database or a data storage engine
- a sophisticated query or report generator
- an OLAP-style cube or data warehousing engine
Where it could be Used
- basic CRUD (Create-Read-Update-Delete) access to relational databases
- a database abstraction layer
- a lighter-weight alternative to ORM (e.g. ADO or EJB)
- a lighter-weight alternative to WSDL/SOAP
- Conventional ORM is too heavyweight
- We’ve gone overboard with objects
- Oodles of classes, interfaces, deployment descriptors
- OQL - another language to learn
- Conventional ORM is inflexible
- A domain object layer rarely serves multiple apps well
- Entity objects can’t be joined into arbitrary views
- More accidental complexity: code required to join entities
- Conventional Web Services is too heavyweight
- WSDL and SOAP are complicated
- RESTful Web Services and WADL are simpler
The bottom line – 80/20
- restSQL is targeted at the 80% of data access that is basic CRUD
- No more messing around with basic SQL, some complex ORM tool, oodles of Objects and Interfaces, or quirky OQL.
- Developers can spend their efforts on the remaining 20% of the database access, using an approach appropriate to the problem.
- restSQL frees developers to focus on the essential work of software engineering:
- architecture, data modeling, workflow, UI design, business logic, testing and tuning
- and making our stakeholders happy
The framework is used in two ways: 1) Clients may connect directly to the restSQL engine using the HTTP API, and 2) your Services use a Java API.
Optionally, applications provide Java-based triggers to manage data validation and business logic. restSQL right-sizes five technologies: SQL, XML, JSON, Java and HTTP. SQL is embedded in XML files that define resources, like database views, that may be queried, added to, updated or deleted using HTTP or a Java access API. Data is serialized over XML or JSON. The framework itself is written in Java and deployed as a JAR or WAR on a standard JEE Container.
restSQL enables you to build multiple SQL Resources, queryable and updatable database views that exist on the middle tier and are accessible via Java or HTTP APIs. SQL Resources may be flat views or hierarchical parent-child. The SQL Resource is defined in an XML file. The core of the definition is the query expression, an SQL DML expression.
restSQL – Trim your Middle