Databases are continuously evolving environments, where design constructs are added, removed or updated quite often. Research has extensively dealt with the problem of database evolution. Nevertheless, problems arise with existing queries, mainly due to the fact that in most cases, their role as integral parts of the environment is not given the proper attention. Furthermore, the queries are not designed to handle database evolution. In this paper, we first introduce a graph-based model that uniformly captures relations, views, constraints and queries. For several cases of database evolution we present rules so that both syntactical and semantic correctness of queries are retained. To this end, we also extend the query formulation capabilities by annotating SQL queries with information concerning the semantically aware adaptation of a query in the presence of changes in the underlying database.