Privacy-preserving data publishing and analytics using data cubes