Upgrading from 3.0.2.0 version to 3.1.0.1 version

Please how can one upgrade from OJS 3.0.2.0 version to OJS 3.1.0.1 version without messing up the database? I believe that if I install the new version it will override the existing version and mess up my database. Can someone help please.

please export current version of database and keep it as backup.,Also, please make copies of your data folder with pdfs and usually public folder in which OJS puts images and copy of config.inc.php file.
After that you can do upgrade and if necessary you can try again with backup copies as I mentioned above.