Giter Club home page Giter Club logo

jssql's Introduction

jsSQL

Purpose

This package evaluates basic operators from relational algebra and SQL. It serves as a backend for visualisations and other frontend tools. The generation of single tuples as well as of whole relations can be observed via the classic visitor pattern.

NPM

jsSQL is built in vanilla javascript on purpose, to have a small set of dependencies and high compatibility with many browsers and versions. It can therefore be used from within a browser as is shown in the index.html where all required files are just included as scripts.

But this repository features an NPM package that wraps around the vanilla functionality.

Known Issues

  • The most basic form of logic is an instance of Predicate, which in turn holds a lambda Tuple -> bool. While this makes sense functionally, it isn't very clean when it comes to parsing queries from an input string, as it would require the usage of eval sooner or later. Maybe expressions should be built dynamically as ASTs instead?

jssql's People

Contributors

ogrady avatar

Watchers

 avatar  avatar

jssql's Issues

CrossProduct of relations with overlapping schema

Creating the CrossProduct of two relations with overlapping schema

schema(A) = ["a","b"]
schema(B) = ["b","c"]

Leads to an error (tuples don't match schema). This stems from both schemas having a field b which, which can't be reflected in the schema, which internally is a key-set. So it should either be renamed to something like b' automatically or fail with a more appropriate error message.

NB: formally, this operation is not defined anyway. Having to rename it is the most appropriate way to handle it.

Make Join-Predicates more flexible

Joins currently only support equality predicates, like A.x = B.y. We should be flexible enough to handle arbitrary predicates, including inequalities.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.