Git Product home page Git Product logo

relational-playground's People

Contributors

actions-user avatar axj2613 avatar beetisushruth avatar ceb3745 avatar dependabot[bot] avatar greenkeeper[bot] avatar michaelmior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

relational-playground's Issues

Decide on set vs. bag semantics

Right now there isn't an explicit choice on whether expressions are evaluated using set or bag semantics. It may be helpful to have this be an option and it would likely also help support #3.

Add more example data

Data should be randomly generated with more columns and rows and possibly additional relations.

Fix highlighting and display of evaluation

Some queries, such as the one below, don't properly highlight the specific expression whose data will be displayed below. The title displayed at the top of the table is also sometimes incorrect.

SELECT * FROM Doctor JOIN Patient ON Doctor.id=Patient.primaryDoctor WHERE Doctor.salary > 150000

Add support for sorting

This is one step towards #3. Sorting is probably the easiest operator to implement next. Sort is written as τ with a list of columns to sort by as a subscript. Keep in mind that ascending order is the default in SQL. I would also suggest including a small arrow next to each column to indicate the sort order (i.e. ↑ and ↓)

Allow stepping through expression execution

This consists of two parts:

  1. Some way of calculating the order each expression will be executed and the number of steps. (The easiest way is probably to actually execute the expression and record steps.)
  2. Controls to step forward and backward through each execution step. This should just change which expression is highlighted using the existing highlighting mechanism.

Note that users should still be able to click on expressions to see how they will be evaluated. In this case, the current step in query execution should be synchronized with whatever expression has been clicked.

Make selecting things less confusing

Currently clicking on some relations directly does nothing and selecting some expressions (e.g. joins is challenging). Since the relations can be viewed on the right, instead the expression the relation is contained in should be used.

Add query optimization

The tool could also be useful for explaining some simple query optimizations. For example, pushing a filter through a join. This would probably best take the form of a series of optimization rules which can be toggled on and off with some clear way to see how the expression changes.

Add support for extended relational algebra

There are many other types of operations that can be expressed in relational algebra. This should probably end up behind a toggle since ordering requires lists which changes semantics. An example are those below:

  • Sorting
  • Aggregation
  • Extended projection (expressions)
  • Duplicate elimination

Remove react-select

This package is quite large and is only used for the drop-down menu when selecting tables. It should be fairly straightforward to replace it with a native <select> element.

Add support for table aliases

SQL queries such as SELECT d.id FROM Doctor AS d should be supported. While the SQL parser supports this, there is currently no support in the relational algebra or query execution for having tables with different names.

Include current query in URL

The query that the user has typed should be stored in the URL so that it can be bookmarked or shared. When a page is loaded, the URL should be checked for a query and the query populated if needed.

Add support for binary operators (e.g. joins)

Currently, only unary operators are supported. Extending support for binary operators will allow for things like joins, set difference/union, etc. The first one to be implemented should probably be cross-product since it's likely to be the most generally useful.

Add support for OR in query conditions

Currently only AND is supported, but OR should be as well. This will require looking at the conditions in the parsed query and deciding on a structure to represent the expression. This structure would then be used to display the relational algebra expression as well as evaluate the query when the expression is selected.

Track interaction with the tool

It's important to understand how students are interacting with the tool. Below are examples of a few things that we may want to log.

  • Which datasets are commonly used
  • Queries entered
  • What types of expressions are clicked on
  • What browsing features of tables are used

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.