Abstract. Motivated by research on how topology may be a helpful foundation for building information modeling (BIM), a relational database version of the notions of chain complex and chain complex morphism is defined and used for storing cw-complexes and their morphisms, hence instances of building projects and different views upon them, into relational databases. In many cases, this can be done without loss of topological information. The equivalence of categories between sets with binary relations and Alexandrov spaces is proven and used to incorporate the relational complexes into the more general setting of topological databases. For the latter, a topological version of a relational query language is defined by transferring the usual relational algebra operators into topological constructions. In the end, it is proven that such a topological version of relational algebra in general must be able to compute the transitive closure of a relation.