Skip to content

Instantly share code, notes, and snippets.

Avatar

Jens Lechtenbörger lechten

View GitHub Profile
@lechten
lechten / gist:97f07fac4adc9b7b6bca593cc0da2eef
Last active Nov 15, 2019
Query processing example for slides with the The Complete Book
View gist:97f07fac4adc9b7b6bca593cc0da2eef
-- 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
@lechten
lechten / relax-example
Last active Nov 11, 2020
A gist to be used with relax for queries in the relational algebra, https://dbis-uibk.github.io/relax/
View relax-example
-- 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.
]]