Skip to content

Instantly share code, notes, and snippets.

View lechten's full-sized avatar

Jens Lechtenbörger lechten

View GitHub Profile
@lechten
lechten / relax-example
Last active November 11, 2020 10:13
A gist to be used with relax for queries in the relational algebra, https://dbis-uibk.github.io/relax/
-- To be used with RelaX: https://dbis-uibk.github.io/relax/calc.htm
-- https://dbis-uibk.github.io/relax/calc/gist/02c807c63faf1d57d77f487d6a0726f4
group: bank example
description[[ Sample data for crash course on the Relational Model.
* Relation _Customer_ contains identifiers and names of customers of a bank.
* Relation _Account_ contains identifiers, customer IDs, types and balances of bank accounts. Note that a customer can have any number of accounts, while each account is owned by exactly one customer.
* Relation _BadAccount_ contains information about accounts and customers in one place.
* Query _SampleQuery_ return names of customers with high balances.
]]
@lechten
lechten / gist:97f07fac4adc9b7b6bca593cc0da2eef
Last active November 15, 2019 09:10
Query processing example for slides with the The Complete Book
-- Data from query optimization slides by Hector Garcia-Moline at http://infolab.stanford.edu/~hector/cs245/notes.htm
-- To be used with RelaX: https://dbis-uibk.github.io/relax/calc.htm
-- https://dbis-uibk.github.io/relax/calc.htm?data=gist:97f07fac4adc9b7b6bca593cc0da2eef
group: query evaluation plan example
description[[More or less random data.]]
R = { A, B, C
a 1 10
b 1 20