6. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a 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.
6. A computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a 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. 10. The computer-readable storage medium of claim 6 , wherein the programming language code is annotated with a second pragma that defines an additional database object, and wherein processing the programming language code further comprises adding the additional database object defined by the second pragma to the sandbox.