The by-now-standard perspective on databases within the deductive database community is that they can be specified by sets of first-order sentences. As such, they can be said to be claims about the truths of some external world; the database is a representation of that world. Within the logical database paradigm, virtually all approaches to database query evaluation treat queries as first-order formulas, usually with free variables whose bindings resulting from the evaluation phase define the answers to the query. Following Levesque [10, 11], we argue that, for greater expressiveness, queries should be formulas in an epistemic modal logic. Queries, in other words, should be permitted to address aspects of the external world as represented by the database, as well as aspects of the database itself, i.e., aspects of what the database knows about that external world. We shall also argue that integrity constraints are best viewed as sentences about what the database knows, not, as is usually the case, as first-order sentences about the external world. On this view, integrity constraints are modal sentences and hence are formally identical to a strict subset of the permissible database queries. Integrity maintenance then becomes formally identical to query evaluation for a certain class of database queries. We formalize these notions in Levesque's language KFOPCE and define the concepts of an answer to a query and of a database satisfying its integrity constraints. We also show that Levesque's axiomatization of KFOPCE provides a suitable logic for reasoning about queries and integrity constraints. Next, we show how to do query evaluation and integrity maintenance for a restricted, but sizable, class of queries/constraints. An interesting feature of this class of queries/constraints is that Prolog's negation as failure mechanism serves to reduce query evaluation to first-order theorem proving. This provides independent confirmation that negation as failure is really an epistemic operator in disguise. We then provide sufficient conditions for the completeness of this query evaluator. Finally, we show how to use this evaluator to answer queries under the closed-world assumption.