SQL query modification algorithms

Algebra rules and a query modification algorithm that enable modifications of SQL queries considered hitherto as nonmodifiable are introduced. Cases where aggregates are involved are emphasized. Also introduced is a technique to translate a view with DISTINCT keyword into an equivalent grouped view without DISTINCT; as a result some queries that were not modifiable on the DISTINCT view become modifiable. A set of commutative and merging rules at the relational algebra level that are used to derive the query modification algorithm systematically is developed.<<ETX>>