You should adjust SQL_* variables and probably fields too if you want to use a different format of a database. I recommend to use the standard format because it contains many fields which you will need in the future.
Suitable database can be created using this kind of SQL statement:
Your three scripts are not very handy, because you have to change the configuration and restart smsd before each run. Of course, you are just testing your system currently, but you can also call the required script from the "master" eventhandler if you want to. In this case, insert the following to the end of a given sample eventhandler:
These codes are not exactly what you have asked, but they will show how things can be done. Hopefully these examples will help you to move forward.