Mnesors for databases
We add commutativity to axioms defining mnesors and substitute a bitrop for the lattice. We show that it can be applied to relational database querying: set union, intersection and selection are redifined only from the mnesor addition and the granula…
Authors: ** Gilles Champenois (Collège Saint‑André, Saint‑Maur, France) – *gilles_champenois@yahoo.fr* **
Mnesors for databases Gilles C HAMPENOIS Collège Saint-André, Saint-Maur, France gilles_champenois@yahoo.fr ABSTRACT . We add commutativity to axioms defining mnesors and substitute a bitrop for the lattice. We show that it can be applied to relational database querying: set union, intersection and selection are redefined only from the mnesor addition and the granular multiplication. Union-compatibility is not required. “If you tell me you have 50 different ways of representing data in your system at the logical level, then I’ll tell you that you have 49 too many.” Ted Codd (1923-2003) I. INTRODUCTION The theory of mnesors is here modified by assuming commutativity. We used for instance to consider the colomn tuple € Sweden Germany " # $ % & ' as an ordered stack, € Sweden being older in the stack than € Germany . So € Sweden Germany " # $ % & ' was different to € Germany Sweden " # $ % & ' . Now by assuming commutativity ( € x + y = y + x ), the order does not matter, i.e. € Sweden Germany " # $ % & ' equals € Germany Sweden " # $ % & ' . So we will simply write € Sweden Germany ( ) * + , - . Our purpose is to find a mathematical model for information [1][2] similar to abstract vectors. We first define a structure called a bitrop which plays the role of the field for vectors, and then we will define semimodules over bitrops. The resulting two-sorted structure forms an interesting linear algebra because it mixes properties of lattices (boolean for example) with properties of vectors: the addition of mnesors aggregates information and the external multiplication selects information. We first define what we call a bitrop. A bitrop € B is a set with two operations, a commutative addition and a distributive multiplication. Moreover, it has an element € τ called the center of € B verifying the next two properties. € x ⊗ τ = x for any € x ∈ B (1) € τ ⊕ τ = τ (2) Two other properties are added. The subset of elements verifying € λ ⊕ τ = τ is denoted by € B + . So for any € x , y ∈ B and € λ , µ ∈ B + there exists € α ∈ B + such that € x ⊕ y ( ) ⊗ α = x (3) absorption property € x ⊗ λ = x ⊗ µ implies € λ = µ (4) cancellation property EXAMPLE . The min-plus integers with the minimum as addition ( € + ) and the addition as multiplication ( € ⊗ ) form a commutative bitrop. II. DEFINITION OF A COMMUTATIVE MNESOR SPACE A mnesor space is a semimodule ( € M ) over a commutative bitrop. € M possesses an addition (written € + ) and an identity element € 0 . According to vector scalars, bitrop elements are called granulars. The commutative semimodule € M verifies the following properties: (unital property) € x τ = x (4) (mnesor distributivity) € x + y ( ) λ = x λ + y λ (5) (associativity of granular multiplication) € x λ ( ) µ = x λ ⊗ µ ( ) (6) (granular distributivity) € x λ ⊕ µ ( ) = x λ + x µ (7) The absorption property is added: For any mnesors € x , y , there exists a granular € α ∈ B + such that € x + y ( ) α = x (8) Idempotence . The addition of mnesors is idempotent. PROOF . Letting € λ = µ = τ in (5) yields € x τ + x τ = x τ ⊕ τ ( ) = x τ . Thus, € x + x = x , for any € x ∈ M [by (4)] Addition ordering . A mnesor € x is a prefix of a given mnesor € a if we can write € x + a = a . The relation “is a prefix of” is an order relation (since € M is a commutative idempotent monoid) called addition ordering. Multiplication ordering . “ € x is lower than € a ” iff we can write € x = a λ where € λ ∈ B + ( € x is said to belong to the orbit set of € a ). PROOF . Reflexivity ( € x = x τ ), Antisymmetry ( € x = a λ and € a = x µ implies € x = x τ = x τ ⊕ µ ( ) = x τ + x µ = x + a = a λ + a = a ), Obviously transitivity. The two orderings are equivalent, that is € x = a λ iff € x + a = a . PROOF . ( € ← ) We apply property (8). There exists € λ ∈ B + such that € x + a ( ) λ = x . But € x + a = a , then, € a λ = x ( € → ) € x + a = a λ + a = a λ + a τ = a λ ⊕ τ ( ) = a τ = a Mnesor intersection . Let be € x , y ∈ M given. Since the multiplication is commutative, then there exist € λ , µ ∈ B + such that € x λ = y µ . PROOF . € x + y ( ) λ = x and € y + x ( ) µ = y . By multiplying by € µ and € λ , we get € x + y ( ) λ ( ) µ = x µ and € y + x ( ) µ ( ) λ = y λ . Thus € x + y ( ) λ ⊗ µ ( ) = x µ = y λ . If € 6 λ is another granular that verifies € x + y ( ) 6 λ = x , then € y 6 λ = y λ = x µ . Thus, € y λ is uniquely defined for each € x . € x λ = y µ is denoted by the operation € x o y (the intersection of € x and € y ). Note that the intersection is commutative, associative and idempotent. Lattice . € M , + , o ( ) is a lattice. PROOF . The addition and the multiplication of mnesors are commutative, associative, idempotent. Absorption laws hold: € x + x o y ( ) = x + x µ = x τ + x µ = x τ ⊕ µ ( ) = x τ = x and € x o x + y ( ) = x τ = x . III. EXAMPLES Three of the operations of relational algebra can be expressed with mnesor addition and external multiplication. But here there’s no need for union-compatibility. Set union . The set union of tables € x and € y is performed by the addition € x + y . EXAMPLES . The bitrop is the boolean lattice of intergovernmental organization membership. € Sweden Germany ( ) * + , - + France Sweden ( ) * + , - = Sweden Germany France ( ) 7 * 7 + , 7 - 7 € europe NATO + europe NATO = europe NATO ⊕ NATO ( ) = europe Intersection . The intersection of tables € x and € y is performed by € x o y . EXAMPLE . € Germany Denmark ( ) * + , - o Germany Sweden ( ) * + , - = Germany { } because there exists € λ = NATO such that € Germany Denmark ( ) 7 * 7 + , 7 - 7 + Germany Sweden ( ) * + , - 8 9 : ; < = λ = Germany Denmark Sweden ( ) 7 * 7 + , 7 - 7 λ = Germany Denmark ( ) * + , - Thus, € Germany Sweden ( ) * + , - λ = Germany { } Selection . It is directly performed by the external multiplication. Properties (6) of mnesors is equivalent to the composition of selections. A case of filtering failure: € Sweden EU = Sweden and case of matching failure: € Australia EU = 0 . EXAMPLE . The selection of countries with € λ = EU -membership: € x λ where € x is the tuple representing all the countries wordwide. REFERENCES 1. K OHLAS J. (2003), Information Algebras: Generic Structures for Inference, 2. T ROPASHKO V. (2005), Relational Algebra as non-Distributive Lattice.
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment