how to connet db

Is there a way to connect to a db table like mysql?

I know how to communicate in vc using socket.
However, it is inconvenient to link db through socker. I would like to know if there is a more convenient way to connect to the db.