If you need to delete a database, you do not delete any files themselves - you simply connect to the database using a graphical tool (i.e. SQuirreL, or the PostgreSQL specific PGAdmin III) or command line interface, and perform a DROP operation on the database. It is best to see the documentation for the specific database for details - Alfresco does not duplicate such information when it already exists.
Are you upgrading a local dev system, or have you been forced by your employer to upgrade an existing production system with valuable content? (Which I would find to be sort of "not nice" given your self-described status as a rookie.)
Thank you. The context is upgrading an existing system with data collected over two years. Imho I have to substitute the empty database of the new installation with the exiting one. That is my problem.
Then you would need to perform an export on the old database and import it into the new one, before starting Alfresco for the first time. This is something that usually is done best with the admin tool specific to the database being used, e.g. PGAdmin III for PostgreSQL. There you should find explicit export actions in the context menu for a particular database.
If you are upgrading from an existing version of Alfresco, make sure you backup your current database and the contentStores found in Alf_data.
If you are doing a new install as well, you will have to back up you /shared folder if you have any customizations in there.
If it is a fresh install run it first with a new connection string to the DB just to make sure everything is fine with your install. Once that is done, substitute the DB connection string with the current app's and start the application; it will do all the necessary DB schema upgrade for you and you are ready to go.
I will try your recommendations later. For now I helped myself with exporting the content and rebuilding the workspace. So I lost the version history, but in this case it wasn't very important to save the history. Thank you very much for your help.