Your database should act as a container that holds data that needs to be persisted for your application. You need to make the decision depending on the type of data that you are dealing with:
For application configurations (menu items, title bar names, button names, etc) - consider using some sort of properties file. If your application has many users and the configuration will be different for each or an excessive amount of properties, consider using a database to persist.
For model data (Person, Address etc.) - consider using a database as this is important information for your application. Also, you'd benefit from a database here so that you can do reporting and analysis outside of your application.
In general, you should be doing all your computations on the data in the java code. This is the concept of using your application layer for business logic and database layer simply for persistence.
There is one exception to using java to perform all actions on your data - most databases are very efficient at sorting data and should be used in your queries to sort your result set if you require it. Depending on the data set and table implementation, sorting your data on the DB side and putting it into a List in your java application may more efficient than getting your data and then sorting in java.
Lastly, if your require frequent use of data, then consider caching it in java rather than querying from database. As some of the other posts mentioned, creating a db connection, executing a query, parsing results is more expensive than simply accessing in your heap.