TinyQueries for Nerds
Nowadays dozens of NoSQL database engines have emerged due to some restrictions of the traditional relational databases. Instead of switching to a completely new engine TinyQueries provides a much simpler solution.
Four nerds just after they compiled queries using the TinyQueries SQL compiler
Which problems does TinyQueries solve?
- Main drawback of new NoSQL database engines is overcome: Will your NoSQL engine still be popular and maintained over 5 years? SQL is popular for more than 30 years and has proved itself to be rock solid. TinyQueries can be used on top of any SQL database
- Main drawback of relational databases is overcome: inflexible, tabular data can be transformed into flexible data structures which are suitable to be used by your front-end web apps
- Main drawback of Object Relational Mapping is overcome: inefficiency, creating lots of objects you won't need. Just get the data you want. But without the need to abandon your existing ORM; TinyQueries can be used in conjunction
- TinyQueries can be used for realtime analytics and reporting
- TinyQueries can be used to build fast API's
- TinyQueries can be used for data conversions (ETL)
TinyQueries versus SQL
Handwritten SQL is in general considered to be the fastest way to retrieve data from a relational database. However it may still be difficult to find to most optimal way of querying, especially if many tables are involved. TinyQueries is designed to take advantage of several best practices in query design, like splitting up complex queries into simpler ones.
We did a test on MySQL's Sakila sample database containing movie and actor data. One of the views retrieves a list of the actors and for each actor gets a the list of movies they played in, grouped by the movies' category. We compared the views' underlying query with an equivalent query written in TinyQueries. Below are the results.
These kind of benchmarks are of course dependent on the hardware used and the size of the database. But anyhow it shows the potential gain in performance which is possible by the TinyQueries type of querying.
Key advantages of TinyQueries
- Fast performance, even for rich, deeply nested data
- Best of three worlds: it has a simple interface for developers like ORM, it is optimized for efficiency like plain SQL and it has the flexibility like NoSQL
- Analytics can be done without transferring the data to an analytical database
- Stimulates developers to improve code quality by separating code and queries
TinyQueries can be connected to all major Cloud database platforms, including Amazon Redshift, Google BigQuery and Microsoft Azure SQL. Furthermore TinyQueries is listed as Third Party Service on IBM Cloud. On top of the reporting we can automatically generate a customized API to export the data in any format you would like to have, including JSON, XML and CSV.
If you want to see a demo or have questions don't hesitate to contact us. We are happy to help you with any question you might have.