Exceptions in Java are divided into two groups; checked and unchecked (or runtime) exceptions.
Checked exceptions will extend java.lang.Exception and must be declared in the method signature if thrown.
Runtime exceptions do not need to be declared by throwing methods and either extend java.lang.RuntimeException or java.lang.Error.
Checked exceptions tend to be exceptions you can reasonably be expected to do something about and recover whereas runtime exceptions should be those which cannot be recovered from.
If you’re writing an application dependent upon a database and the database connection can’t be established then that’s likely to be terminal. This should be a runtime exception – it’s ok to blow up over this.
If a single transaction fails then you might expect a checked exception to be thrown, to rollback the transaction and allow program execution to continue.