Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for TableDum and TableDee (Tutorial D) #212

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

rlaiola
Copy link
Contributor

@rlaiola rlaiola commented Oct 9, 2024

Reference issue

#15

What does this implement/fix?

This PR provides a way to define two special relations proposed in Tutorial D. TableDum denotes a relation of degree zero (no attributes) and cardinality zero (no tuples). On the other hand, TableDee represents a relation of degree zero and cardinality one (it has one single tuple of degree zero). In other words, TableDee represents a true proposition (identity relation under join operators) whereas TableDum is a false one.

Dum and Dee relations can be represented as follows in both Relational and Multiset Algebra:

Dum = {}   -- inline relation with empty heading and no tuples
Dee = {()} -- inline relation with empty heading but one tuple of degree zero

Given a relation R with n (n > 0) attributes and t (t > 0) tuples

R x Dum -- returns a relation with the same schema of R but no tuples
R x Dee -- returns the very same relation R

How to test this PR?

Test it live at https://rlaiola.github.io/relax/calc/local/uibk/local/0. For automated tests visit https://rlaiola.github.io/relax/test.html

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant