With improving techniques in semantic mapping it becomes relevant to persistently store the gathered geometric and semantic information about the environment and continuously integrate new data. Using spatial databases to maintain a spatial environment model can be vital in the creation of semantic maps, because their spatial indexing allows for efficient lookup of geometric entities across large datasets. Another advantage is that spatial relations, like above, overlaps, etc., can directly be used in the retrieval queries. However, current state-of-the-art spatial databases, like PostGIS, are focused on 2D data and allow little 3D functionality beyond storage of 3D data. This thesis describes how spatial databases can be extended to feature 3D spatial reasoning which makes them applicable in an robotics context. It will be shown how the resulting framework is used to manage the spatial layer of a semantic map and how suitable target objects can be identified, which is helpful in a multitude of robotic tasks.