Relational databases (RDBs) have been widely used as back end for information systems. Considering that RDBs have valuable knowledge interwoven in between stored data, how to access, represent and share this knowledge becomes an important challenge. Topic maps (TMs) emerge as a good solution for this problem. However, manual development of TMs is a difficult, time-consuming and subjective task if there is no common guideline. The existing TMs building approaches mainly consider the meta-information contained in a RDB, without considering the knowledge residing in the database content (its current state). Other approaches require a predefined configuration for applying a specific data transformation. This paper proposes an automatic method for TM construction based on learning rules. Our method considers the background knowledge of the RDBs during the building process and was implemented and applied on a representative set of 15 RDBs. The resulting TMs were validated syntactically using a standard tool and validated semantically through the inference of information using a formal query language. In addition, an analysis between the relational data (input) and its representation (output) was conducted. The results found in our experiments are encouraging and put in evidence the soundness of the proposed method.