4 ms·
This looks very interesting. I recently had to teach a series of workshops on SQL and I was trying to figure out the best system to allow students to independe
by bobochan 9y ago
This looks very interesting.
I recently had to teach a series of workshops on SQL and I was trying to figure out the best system to allow students to independently work with small datasets without having to install any software. I found Alon Zakai's absolutely fantastic version of SQLite in JavaScript here:
https://github.com/kripken/sql.js https://github.com/kripken/sql.js
I coupled that library with a CodeMirror editor and got a working web based environment very quickly.
- j_s 9y agoIs there anything open-source similar to your web-based SQL IDE including sample data for teaching? Something from the first of these sites may be adaptable: · https://sqlbolt.com https://sqlbolt.com · https://www.sqlteaching.com https://www.sqlteaching.com · https://www.khanacademy.org/computing/hour-of-code/hour-of-sql https://www.khanacademy.org/computing/hour-of-code/hour-of-s... · https://pgexercises.com https://pgexercises.com | https://news.ycombinator.com/item?id=6893333 https://news.ycombinator.com/item?id=6893333 · http://sqlzoo.net http://sqlzoo.net · http://academy.vertabelo.com http://academy.vertabelo.com
- bobochan 9y agoI did not see anything when I started putting it together, but I already had a number of datasets that I put together for illustrating specific points. My favorite is a list of pairs of airport codes and the distances between them. This is a simple table, but students can have a lot of fun with a challenge like "Be the worst possible travel agent you can be. Find an itinerary from NYC to CDG, with a maximum of four stops, that will cover the most miles." Hilarity ensues as we look at the result, but it is challenging enough for beginners learning about joins, etc. The other great thing about this type of setup is that students can feel free to experiment with deleting records and doing all kinds of things in SQL knowing that they can immediately restore everything to the initial state by hitting refresh. The last component that I think helped the class was adding an anonymous "share" button that allowed students in the class to submit the contents of their editor so that I could run it for the whole class and we could talk about the trade-offs of different approaches.
- frik 9y agoThere is the WebSQL standard, it's works for the majority of web users: https://en.wikipedia.org/wiki/Web_SQL_Database https://en.wikipedia.org/wiki/Web_SQL_Database Only Mozilla dev, a die-hard NoSQL fan, prevented adoption in Firefox (he since left Mozilla) and Microsoft couldn't decide which of it's 10 SQL engines (no joke, think about MS Access, AD, Exchange, Outlook, WinFS, etc all had/have their own embedded SQL database incarnations) to use in Internet Explorer. In the end Microsoft nowadays ships SQLite with Windows. But WebSQL isn't supported by Firefox and IE/Edge - but the web users moved on, and like 99% of mobile devices have a webkit/blink based browser, and Chrome and Safari have the largest user base on desktop too.
- fiatjaf 9y agoWebSQL is deprecated or something like that. Some people from Google have developed https://github.com/google/lovefield https://github.com/google/lovefield on top of IndexedDB to replace it.
- deleted 9y ago[deleted]
- Groxx 9y agoIt's not quite that simple. The WebSQL standard wasn't a "standard" at all, it was just "browsers already expose whatever SQLite they have, lets write that down!". No tests, no conformity, no way to tell if browser X supported SQLite feature Y, nothing. Just raw access to whatever SQLite was baked in. There were lots of inconsistencies. Yeah, it was super simple and useful, but nobody wanted to do the work to make sure interoperability was a thing, in part because SQLite has very complex behavior and lots of quirks to adhere to.
- dbond 9y agoWe recently launched https://www.db-fiddle.com/ https://www.db-fiddle.com/ which you may find useful, you could save your scheme/data sql and your students can fork it for their own version :)