Store the program given as argument in the database. In case the program does not exist yet, it is created together with all rules and namespace definitions. In case the program already exists, it is updated according to the new program specification (i.e. rules and namespaces).
We assume that the program has been newly parsed, so it does not have a database ID yet. To find the existing program in the database, we therefore need to use the program name instead.
@param program the program to update
@throws SQLException