SMS: Efficient computation and maintenance of datalog materialisations