Answering queries in categorical data bases