The key step of data warehouse integration is the construction of mappings that link mutually compatible components of data warehouse schemas: dimensions, aggregation levels, attributes and facts. In order to perform the integration process in a semi-automated manner, we must define similarity functions that compare the names and substructures of those structure elements. During the last decade, many approaches to measuring semantic similarity between lexical terms have been introduced, most of them based either on the taxonomy of WordNet, a large lexical and thesaurus database of English language, or on the previously measured language statistic corpus. This paper presents a novel semantic similarity technique, based on edge counting, which combines WordNet and domain ontologies written in OWL and is implemented as a Java software. Ontologies are designed by domain experts and thus provide a better and more trustworthy source for calculating similarity, and the fact that the terms are related closer than in WordNet results in a higher similarity.