Shop Algebraic Structures In Automata And Database Theory