Protection of data in a database against unauthorized disclosure, alteration, or destruction is an important aspect of a multiuser database system. In a system which uses a celiular-logic device as a means for data management applications, protection can be achieved in part by associating security windows with queries. This paper describes a mechanism for dynamically creating these windows for cellular-logic devices. The mechanism mainly benefits from the associative techniques such as content and context searches, tagging and marking data, etc. These techniques allow the windows to be created physically by simultaneously activating related access control decision procedures, which implement access control decisions employed by the system, to mask out those data to which the user does not have the right of access. Furthermore, they enable the content-dependent security decisions to be efficiently implemented, eliminating the drawbacks found in conventional systems. Thus, a query accessing to a protected database system is identical to a query accessing to its companion window. An implementation of this mechanism on the cellular-logic device CASSM is also presented.