thats how it works. And yes DF is a bit verbose (lol) at times

in other languages you might just write

sqlhandler.connection.statment.execute("select ... ")

or similar

you can of course create a simple function yourself that hides all that logic

also dont forget to clean up afterwards

close the statement, disconnect the connection and destroy the objects