Entity-Relationship-Attribute ideas are commonly used to specify and design information systems. They use a graphical technique for displaying the objects of the system and relationships among them. The design process can be enhanced by specifying constraints of the system and the natural environment for these is the categorical notion of sketch. Here we argue that the finite-limit, finite-sum sketches with a terminal node are the appropriate class and call them EA sketches. A model for an EA sketch in a lextensive category is a `snapshot' of a database with values in that category. The category of models of an EA sketch is an object of models of the sketch in a 2-category of lextensive categories. Moreover, modelling the same sketch in certain objects in other 2-categories defines both the query language for the database and the updates (the dynamics) for the database.
Keywords: sketch, model, database, update.
2000 MSC: 18C30, 68P15.
Theory and Applications of Categories, Vol. 10, 2002, No. 3, pp 94-112.