  When specifying security policies for databases, it is often natural to
formulate disjunctive dependencies, where a piece of information may depend on
at most one of two dependencies P1 or P2, but not both. A formal semantic model
of such disjunctive dependencies, the Quantale of Information, was recently
introduced by Hunt and Sands as a generalization of the Lattice of Information.
In this paper, we seek to contribute to the understanding of disjunctive
dependencies in database-backed programs and introduce a practical framework to
statically enforce disjunctive security policies. To that end, we introduce the
Determinacy Quantale, a new query-based structure which captures the ordering
of disjunctive information in databases. This structure can be understood as a
query-based counterpart to the Quantale of Information. Based on this
structure, we design a sound enforcement mechanism to check disjunctive
policies for database-backed programs. This mechanism is based on a type-based
analysis for a simple imperative language with database queries, which is
precise enough to accommodate a variety of row- and column-level database
policies flexibly while keeping track of disjunctions due to control flow. We
validate our mechanism by implementing it in a tool, DiVerT, and demonstrate
its feasibility on a number of use cases.
