This document presents a peer-to-peer database architecture that uses an ant colony optimization algorithm and semantic support. The architecture was developed to optimize routing queries. Experimental results showed that the approach reduced network traffic without loss of answers received, improving system performance even with increased time to live for messages. The architecture contributes a new search strategy for peer-to-peer databases that is not found in existing literature.