Friend,
What database are you trying to use, even though SQL is a multi-database type that uses the SQL language?
HeidiSQL is a program that will allow you to connect in a DBMS, that is, it will only allow you to access a relational database.
I suggest you choose a programming language and look for some lessons on basic programming on youtube to have a north, because your question makes me seem like you're kind of lost on the subject. If you are learning java I think you can start with this video: link