Ontology-based data access (OBDA) generalizes query answering in relational databases. It allows to query a database by using the language of an ontology, abstracting from the actual relations of the database. For ontologies formulated in Description Logics of the DL-Lite family, OBDA can be realized by rewriting the query into a classical first-order query, e.g. an SQL query, by compiling the information of the ontology into the query. The query is then answered using classical database techniques. In this paper, we consider a temporal version of OBDA. We propose a temporal query language that combines a linear temporal logic with queries over DL-Litecore-ontologies. This language is well-suited to express temporal properties of dynamical systems and is useful in contextaware applications that need to detect specific situations. Using a firstorder rewriting approach, we transform our temporal queries into queries over a temporal database. We then present three approaches to answering the resulting queries, all having different advantages and drawbacks.