calculate scale, simple database communication