PUG is a database middleware system (offspring from GProM) for provenance support to multiple database backends such as Oracle and Postgres. Provenance explains produced data over database operations such that which tuple (row) in the data generated by a query is derived from which tuple in input data through which operation(s). Similarly, why-not provenance informs why and how tuples are missing in the produced data.
The system captures both why and why-not provenance for first-order (FO) Datalog queries, i.e., negation but no recursion is allowed, to explain user's interests (expressed in existing or missing tuples). Datalog is a declarative logic programming language used for deductive databases and provenance is often expressed as derivation of rules. PUG use query instrumetation technique which rewrites the Datalog queries into SQL query and execute the SQL on database backends. To visualize such derivations for users, provenance graphs can be generated based on the result of SQL queries.
More information about PUG as well as research behind it can be found at UCDBG webpage.