cardinality database explained