This project aims to create a mini SQL engine implemented in TypeScript.
The Mini SQL Engine will consist of three core modules:
- Parser: Takes a SQL query as input and generates a parse tree representing the query's structure.
- Query Executor: Processes the parse tree and executes the corresponding SQL query.
- Query Generator: Generates valid SQL queries from data structures or user input.
Step 1: Define the SQL Grammar
- Create a formal grammar (BNF/EBNF) to define the syntax of the supported SQL dialect.
Step 2: Implement the Parser
- Develop a parser using a parsing technique like recursive descent or LL(k) parsing.
- The parser should convert SQL queries into parse trees.
Step 3: Implement the Query Executor
- Design a query executor to process parse trees and execute queries.
- This could involve simulating a database or interacting with a real data store.
Step 4: Implement Query Generator
- Develop a module to generate SQL queries based on data structures or user input.
Step 5: Integration and Testing
- Integrate the modules into a functioning Mini SQL Engine.
- Perform thorough testing with a variety of SQL queries.
- parser: Contains the parser module.
- executor: Contains the query executor module.
- generator: Contains the query generator module.
- utils: Contains utility functions used across the project.
- test: Contains test cases for each module.
- Gain experience building a simple SQL engine.
- Understand the fundamentals of SQL parsing and execution.
- Develop skills in TypeScript programming.
- TypeScript
- (Optional) A data store or mock database for testing.
- Clone this repository.
- Install dependencies using npm or yarn.
- Start implementing the project steps.
Contributions are welcome! Please open issues or submit pull requests.