JDBC (Java Database Connectivity) is a Java platform library that provides API to connect to a database and operate with…