A robust logical and computational characterisation of peer-to-peer database systems