JavaScriptSQL (JSSQL)

A database engine developed entirely with JavaScript

JSSQL is a database engine developed entirely with JavaScript. It is a tool for developers to interpret and execute SQL statements on a offline database. It has a conversion class developed in PHP for use with relational databases (ex. PostgreSQL, MySQL, etc..) that generates a series of data files, then the database engine in JavaScript (JSSQL) accesses the data through SQL querys and return a set of records, similar to any database engine. This is useful for querying offline databases dynamically without increasing the work of the web server or better yet: without the need for a database server

The engine can interpret JavaScriptSQL SQL queries with the following structure:
    * | select_expresion [ AS alias_field ] [, ...]
    FROM table_name [table_name] [, ...]
    [ WHERE where_condition ]
    [ GROUP BY field_number [, ... ] [HAVING having_condition ] ]
    [ ORDER BY field_number [ ASC | DESC ] [, ...] ]
    [ LIMIT amount ]                    


  • Allows offline data query without the intervention of Web servers or database servers.
  • Allows flexible SQL syntax, accepting the use of tables and fields aliases with case-insensitive terms and llows the use of multiple spaces, so that the writing of SQL querys is simple and intuitive.
  • Allows use of all JavaScript functions and operators so that is totally intuitive for JavaScript developers. Allows the use of functions externally defined by users.
  • Allows the definition and use of indexes to speed up the queries.
  • It allows table pagination so you can use tables with lot of records without overloading the memory used by the browser.
  • Includes functionality for text search within documents indexed by the indexer JSBD_Indexador and associated with link data types defined at the database tables .
  • Allows creation of JavaScript databases using the converter JSBD_Conversor from PostgreSQL and MySQL engines.
  • Clearly reports syntax and runtime errors, and loading of the database and SQL queries.
  • Provide debug mechanisms to help the development, maintenance and testing of the engine.
  • Use a clear structure for the definition of database structures, data storing and indexes. Using JSON structures.
  • Use and installation is simple, with low requirements and compatible with most popular browsers.

Possible Applications:

Any application that requires search documents disconnected from a database, for example: example:

  • A dictionary or encyclopedia.
  • Un catalog.
  • A document recopilation.

Any web application with data management where you need a more dynamic usage without server intervention. For example, a dynamic data table (or spreadsheet) that allows to filter the values ​​presented, make arrangements for the different columns and auxiliary calculations (sums, subtotals, averages, etc.).

A Business Intelligence (BI) aplication where data are grouped by different fields dynamically showing the various statistics. For example, a BI application that analyzes a company's sales, to see dynamically sales by country, vendor, customer type, product, etc. Without the need for repeated requests to the server.

Some examples of how it could be used: