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.