You can use SQL connectivity in your scripts. This way you actually have limitless options on how to link mySCADA with your database. You can, for example, read data from PLCs, process them, and send processed data to the SQL database.
To work with SQL in Server Side Scripts, please use the corresponding mySCADA functions in the section SQL. You can also look at the provided examples.