Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You might gain some efficiency but lose maintainability. I have worked on codebases were SP are coded, tuned and inserted by and, but this is painful for testing and so on. Instead, use FlywayDB https://flywaydb.org/ or Liquibase https://www.liquibase.org/ for configuration management of the DB, to handle the DB migrations including inserting the SPs. In Spring use the SimpleJdbcCallOperations interface to call the SPs (with the concrete implementation class being SimpleJdbc), that way it is easy to mock or stub the database calls for unit testing. Use the unit testing framework that works best with your database to test your SPs, e.g. for Oracle see https://docs.oracle.com/cd/E15846_01/doc.21/e15222/unit_testing.htm#RPTUG45064
You might gain some efficiency but lose maintainability. I have worked on codebases were SP are coded, tuned and inserted by and, but this is painful for testing and so on. Instead, use FlywayDB https://flywaydb.org/ or Liquibase https://www.liquibase.org/ for configuration management of the DB, to handle the DB migrations including inserting the SPs. In Spring use the SimpleJdbcCallOperations interface to call the SPs (with the concrete implementation class being SimpleJdbc), that way it is easy to mock or stub the database calls for unit testing. Use the unit testing framework that works best with your database to test your SPs, e.g. for Oracle see https://docs.oracle.com/cd/E15846_01/doc.21/e15222/unit_testing.htm#RPTUG45064