Effects of creating Java Program using Oracle and SQL Database?

If you are going to create the Java Program using the Oracle and the SQL Database, is there a possibility that the speed execution of the program is affected? If yes, please explain why?
If so, is there another way or method in creating the Java Program that will not affect the performance of the program?
