Many biomedical research databases contain time oriented data originating from longitudinal and time-series studies, but the temporal knowledge associated with these data is not explicitly represented or managed. As a result, investigators often face difficulties in instantiating temporal patterns among research data; maintaining those patterns for iterative data analysis; and comparing discovered patterns with other sources of scientific knowledge. In our work on biomedical data management, we have developed methods for temporal querying, temporal abstraction, and knowledge management, which we are incorporating into a mediator system, called Konark. A central challenge in this research is the need to integrate temporal representations of data in relational databases with the domain specific semantics of temporal patterns used in querying and abstracting such data. In this paper, we present a formal temporal knowledge model using the Semantic Web ontology and rule languages (OWL and SWRL, respectively) that informs the mediator of the temporal semantics involved in biomedical data analysis. This Semantic Web model allows users to formulate high-level temporal queries at the knowledge level rather than the database level. We illustrate our approach with examples from the domain of HIV drug resistance research, which focuses on discovery of relevant temporal relationships among HIV gene mutations, drug regimens, and therapy outcomes. Our knowledge-based approach to data analysis provides a foundation for much needed software facilities to make sense of complex temporal patterns found in research databases.