Source: https://www.inf.unibz.it/~artale/DB2/handout2.pdf