MySQLDealing with sparse or missing data