Connection to DB

Is there a way of execute a query in DB from Spark?

I’ve tried to search how it add’s users to the database in order to do that connection, but I was unable to solve this.