On BP-complete query languages on K-relations

The relational model has recently been extended to so-called K-relations in which tuples are assigned a unique value in a semiring K. A query language, denoted by RA+K, similar to the classical positive relational algebra, allows for the querying of K-relations. We study the completeness of RA+K in the sense of Bancilhon and Paredaens (BP) and show that RA+K is, in general, not BP-complete. Faced with this incompleteness, we identify two necessary and sufficient operators that need to be added to RA+K to make it BP-complete: difference (−) and duplicate elimination (δ). We investigate conditions on semirings under which these constructs can be added in a natural way, and investigate basic properties of our query languages.