To use this feature please read ContentDatabase Creation first.
After that navigate to your portal page and choose the button "Site Settings" and then the "Database settings" in the "Collaboration Manager" Tab.
The prefixed name, which you set in the ContentDatabase Creation tab, will be inherited. The Collaboration Manager set automatically three numbers at the end of every workspace and increments.
With the hook you will reset the names of the databases to the webapplication settings.