How to Import Mysql Database using custom module

Please give some insights about importing MySQL database using custom module, without using any contributed module dependency.

More details : I have an SQL dump of a MySQL database, I need to import it to a specific database using custom module.