# alasql/alasql

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/alasql-alasql).**

7,278 stars · 691 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/AlaSQL/alasql
- awesome-repositories: https://awesome-repositories.com/repository/alasql-alasql.md

## Description

AlaSQL is a JavaScript SQL database engine that allows for the filtering, grouping, and joining of in-memory object arrays and JSON data. It functions as an in-memory SQL database and client-side data processor, enabling the execution of SQL statements against JavaScript arrays and external data sources in both browser and server environments.

The project serves as a universal data query tool capable of performing relational joins across diverse sources, such as merging Google Spreadsheets, SQLite files, and remote APIs into a single result set. It also acts as an IndexedDB SQL wrapper, allowing complex queries and joins to be executed over browser-based storage.

Its capabilities cover cross-format data integration, including the import and export of CSV, JSON, and multiple Excel workbook formats. The engine supports graph data analysis for identifying entity relationships and provides extensibility through custom SQL functions, plugin integration, and multi-stage aggregators.

The system includes a command line interface for executing SQL statements and supports offloading database operations to web workers to prevent blocking the user interface.

## Tags

### Data & Databases

- [In-Memory Databases](https://awesome-repositories.com/f/data-databases/in-memory-databases.md) — Functions as a high-performance in-memory database for filtering and grouping JavaScript object arrays.
- [In-Memory Relational Models](https://awesome-repositories.com/f/data-databases/in-memory-relational-models.md) — Implements a relational model using JavaScript objects to enable rapid SQL filtering and grouping without a formal disk schema.
- [SQL Query Execution](https://awesome-repositories.com/f/data-databases/sql-query-execution.md) — Provides a complete SQL engine to run statements against diverse data sources in the browser or server. ([source](https://github.com/alasql/alasql/wiki/Speed))
- [Client-Side Data Processing](https://awesome-repositories.com/f/data-databases/client-side-data-processing.md) — Provides a complete pipeline for importing, querying, and exporting data across CSV, Excel, and JSON formats in the browser.
- [Client-Side Storage](https://awesome-repositories.com/f/data-databases/client-side-storage.md) — Integrates with IndexedDB and localStorage to provide persistent data storage within the browser.
- [Cross-Source Data Integration](https://awesome-repositories.com/f/data-databases/cross-source-data-integration.md) — Performs relational joins across diverse data sources including Google Spreadsheets, SQLite files, and remote APIs.
- [Cross-Source Joins](https://awesome-repositories.com/f/data-databases/data-collections-datasets/cross-source-joins.md) — Enables relational joins across disparate data sources, such as merging text files with spreadsheets in one query. ([source](https://github.com/alasql/alasql/wiki/AlaSQL-CLI))
- [Data Joins](https://awesome-repositories.com/f/data-databases/data-joins.md) — Merges multiple JavaScript arrays by matching common keys or properties to create combined data sets. ([source](https://github.com/alasql/alasql/wiki/Data-manipulation))
- [Cross-Source Querying](https://awesome-repositories.com/f/data-databases/data-querying/cross-source-querying.md) — Enables the execution of SQL queries that span and join data from multiple remote sources, including cloud spreadsheets. ([source](https://github.com/alasql/alasql#readme))
- [Client-Side Databases](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/client-side-databases.md) — Executes SQL statements against browser storage like IndexedDB or localStorage to manage application state.
- [IndexedDB Wrappers](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-systems/database-wrappers/indexeddb-wrappers.md) — Acts as an SQL wrapper for IndexedDB, enabling complex relational joins over browser-based storage.
- [In-Memory State Querying](https://awesome-repositories.com/f/data-databases/in-memory-state-querying.md) — Allows running SQL queries and aggregations directly against in-memory JavaScript application collections. ([source](https://github.com/alasql/alasql/wiki/Meteor))
- [JavaScript Data Transformations](https://awesome-repositories.com/f/data-databases/javascript-data-transformations.md) — Performs SQL-based filtering, grouping, and transformations directly on JavaScript arrays of objects. ([source](https://github.com/alasql/alasql#readme))
- [JavaScript SQL Engines](https://awesome-repositories.com/f/data-databases/javascript-sql-engines.md) — Provides a full SQL engine that parses and executes statements directly against in-memory JavaScript arrays and JSON.
- [JSON Object Querying](https://awesome-repositories.com/f/data-databases/object-oriented-querying/json-object-querying.md) — Executes SQL statements against JSON arrays and objects to filter and restructure data. ([source](https://github.com/alasql/alasql/wiki/Data-manipulation))
- [SQL Engines](https://awesome-repositories.com/f/data-databases/sql-engines.md) — Implements a relational query processor that executes SQL against JavaScript arrays and JSON objects.
- [SQL Query Interfaces](https://awesome-repositories.com/f/data-databases/sql-query-interfaces.md) — Executes standard SQL statements including joins and subqueries against relational tables or nested JSON data. ([source](https://github.com/alasql/alasql#readme))
- [CSV Imports](https://awesome-repositories.com/f/data-databases/csv-imports.md) — Reads data from local files, URLs, or server uploads and parses CSVs into a queryable format. ([source](https://github.com/alasql/alasql/wiki/Import-export))
- [Custom Data Source Definitions](https://awesome-repositories.com/f/data-databases/custom-data-source-definitions.md) — Allows users to define custom JavaScript functions to integrate external databases and remote APIs as SQL data sources. ([source](https://github.com/alasql/alasql/wiki/User-Defined-Functions))
- [Data Format Transformations](https://awesome-repositories.com/f/data-databases/data-format-transformations.md) — Transforms data between formats, such as reading CSV or XLSX and writing the results as JSON. ([source](https://github.com/alasql/alasql/wiki/AlaSQL-CLI))
- [CSV Exports](https://awesome-repositories.com/f/data-databases/data-serialization-formats/structured-data-exporters/analysis-result-exporters/query-result-exporters/csv-exports.md) — Writes query results and JavaScript arrays directly into CSV files for download or storage. ([source](https://github.com/alasql/alasql/wiki/Import-export))
- [SQL IndexedDB Interfaces](https://awesome-repositories.com/f/data-databases/database-management-systems/database-systems-management/database-systems/database-wrappers/indexeddb-wrappers/sql-indexeddb-interfaces.md) — Runs complex SQL queries and joins across tables stored in a browser-based IndexedDB database. ([source](https://github.com/alasql/alasql/wiki/Getting-started))
- [Data Aggregators](https://awesome-repositories.com/f/data-databases/database-record-management/record-counting/data-aggregators.md) — Calculates sums, counts, and averages across object arrays using grouping functions to summarize information. ([source](https://github.com/alasql/alasql/wiki/Data-manipulation))
- [CSV Query Engines](https://awesome-repositories.com/f/data-databases/distributed-sql-querying/csv-query-engines.md) — Fetches and filters data from remote CSV files using SQL syntax. ([source](https://github.com/alasql/alasql/wiki/Google-maps))
- [Excel Workbook Exports](https://awesome-repositories.com/f/data-databases/excel-workbook-exports.md) — Writes data from JavaScript arrays or HTML tables into multi-worksheet Excel workbooks. ([source](https://github.com/alasql/alasql/wiki/Import-export))
- [Graph Querying](https://awesome-repositories.com/f/data-databases/graph-querying.md) — Provides specialized search operators to query graph structures and identify relationships between entities. ([source](https://github.com/alasql/alasql/wiki/GRAPH))
- [Aggregation Pipelines](https://awesome-repositories.com/f/data-databases/search-result-aggregators/aggregation-pipelines.md) — Processes grouped data through custom JavaScript aggregators in a pipeline to calculate summarized values.
- [Custom SQL Functions](https://awesome-repositories.com/f/data-databases/sql-aggregate-functions/custom-sql-functions.md) — Enables the definition of custom scalar functions via JavaScript to perform specialized calculations in queries. ([source](https://github.com/alasql/alasql/wiki/User-Defined-Functions))
- [Custom Aggregation Function Writing](https://awesome-repositories.com/f/data-databases/sql-aggregate-functions/custom-sql-functions/custom-aggregation-function-writing.md) — Allows the implementation of multi-stage user-defined aggregation functions to summarize grouped data. ([source](https://github.com/alasql/alasql/wiki/User-Defined-Functions))
- [Statement Precompilation](https://awesome-repositories.com/f/data-databases/sql-statement-parsing/statement-precompilation.md) — Optimizes performance by parsing queries into reusable executable forms to avoid repeated parsing overhead. ([source](https://github.com/alasql/alasql/wiki/Compile))
- [SQLite Integration](https://awesome-repositories.com/f/data-databases/sqlite-integration.md) — Extracts data from SQLite database files for use within SQL queries. ([source](https://github.com/alasql/alasql#readme))
- [Browser Storage Persistence](https://awesome-repositories.com/f/data-databases/state-persistence/browser-storage-persistence.md) — Saves and retrieves database state using browser localStorage and DOM-storage with optional autocommit behavior. ([source](https://github.com/alasql/alasql#readme))
- [Multi-Format Data Loading](https://awesome-repositories.com/f/data-databases/tabular-data-frameworks/csv-data-loaders/multi-source-csv-loading/multi-format-data-loading.md) — Provides the ability to read and process data from multiple formats including CSV, JSON, and Excel. ([source](https://github.com/alasql/alasql#readme))
- [File Format Querying](https://awesome-repositories.com/f/data-databases/virtual-table-querying/external-table-querying/file-format-querying.md) — Allows reading and filtering data from XLSX files or Blobs using SQL queries without manual import. ([source](https://github.com/alasql/alasql/wiki/XLSX))
- [Virtual Tables](https://awesome-repositories.com/f/data-databases/virtual-tables.md) — Maps diverse formats like CSV and Excel as virtual relational tables for use in SQL joins and aggregations.

### Business & Productivity Software

- [Spreadsheet Data Extractors](https://awesome-repositories.com/f/business-productivity-software/spreadsheet-data-extractors.md) — Extracts and filters data from local or remote Excel and Google Sheets files using SQL syntax.
- [Google Sheets Manipulations](https://awesome-repositories.com/f/business-productivity-software/google-workspace-integrations/google-sheets-manipulations.md) — Executes SQL queries against published Google Spreadsheet data to filter and group remote records. ([source](https://github.com/alasql/alasql/wiki/Google-Spreadsheets))

### Development Tools & Productivity

- [Data Format Importers](https://awesome-repositories.com/f/development-tools-productivity/project-imports/external-file-importers/data-format-importers.md) — Reads Excel files and converts the data into a JSON representation for use in SQL queries. ([source](https://github.com/alasql/alasql/wiki/Import-export))

### Programming Languages & Runtimes

- [Web Worker Execution](https://awesome-repositories.com/f/programming-languages-runtimes/web-worker-execution.md) — Offloads heavy database operations to background threads to prevent blocking the browser user interface. ([source](https://github.com/alasql/alasql#readme))

### Software Engineering & Architecture

- [Pluggable Data Source Architectures](https://awesome-repositories.com/f/software-engineering-architecture/pluggable-data-source-architectures.md) — Uses a pluggable architecture to map SQL clauses to custom JavaScript functions for external API and file integration.

### Part of an Awesome List

- [Databases](https://awesome-repositories.com/f/awesome-lists/data/databases.md) — In-memory SQL database for browser and Node.js.
