Differing from other books on the subject, this one uses the framework of constraint databases to provide a natural and powerful generalization of relational databases. An important theme running through the text is showing how relational databases can smoothly develop into constraint databases, without sacrificing any of the benefits of relational databases whilst gaining new advantages. Peter Revesz begins by discussing data models and how queries may be addressed to them. From here, he develops the theory of relational and constraint databases, including Datalog and the relational calculus, concluding with three sample constraint database systems -- DISCO, DINGO, and RATHER. Advanced undergraduates and graduates in computer science will find this a clear introduction to the subject, while professionals and researchers will appreciate this novel perspective on their subject.