The development of wireless sensor and actor network applications is made difficult by the fact that developers have to face up to a set of resource-constrained devices which have to work wirelessly and distributely. In this work, we propose a framework to create and integrate light databases within nodes that need to manage and process data. The databases will be designed by means of simple entity-relationship models from which the code needed to manage the database will be generated. Basically, this code will be composed of data structures and the algorithms in charge of managing them. This architecture will help developers avoid data redundancy to better manage the memory of the nodes and to save time in developing applications. Copyright © 2012 John Wiley & Sons, Ltd.