Schema evolution and versioning: a logical and computational characterisation