Securing database interactions and preventing SQL injection