Automatic Secure Partitioning For Database Applications