3. The method of claim 1 , wherein processing the programming language code involves compiling the programming language code into executable code, wherein the executable code can only access the set of database object defined by the pragma.
1. A computer-executed method for preventing unauthorized access to database resources, the method comprising: receiving, at a computer, a section of programming language code to execute on a computer system, wherein the programming language code is annotated with a pragma that defines a set of database objects that the programming language code has permission to access, wherein the pragma is run-time interpreted or compilation-directed; analyzing the pragma to determine the set of database objects; creating a sandbox which includes the set of database objects defined by the pragma; executing the programming language code within the boundaries of the sandbox; determining if the programming language code is attempting to access a table database object outside the boundaries of the sandbox; and if so, generating an exception.