View-based access control enables content-based and context-based security, as opposed to container-based security provided in operating systems. However, view-based access control in multilevel secure (MLS) databases su ers from two problems: safety and assurance. We investigate view-based access control in MLS relational databases for a large class of views expressible as project-select-join queries. We develop a polynomial-time label compilation algorithm that transforms view-level labeling to tuple-level labeling in such a way that guarantees safety and high assurance. We identify two problems related to optimal label compilation, and show that they are both NP-complete even for totally ordered security lattices of size two.