FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation