Hi Mike, On Apr 5, 2012, at 1:54 PM, Starch, Michael D (388L) wrote: [...snip..] > > The issue I am trying to solve is that in our operational environment we > are starting to run into trouble because of some subtleties of SQL when > hit with very large databases. Thus we need our DBA to have the ability > to iterate on the queries in order to see that they are optimal. As our > delivery process is long it would be nice to have the sql editable without > incurring a month or more to get the code into operations again (where we > might potentially see a new unforeseen error in the way our sql is laid > out).
Understood. > > Here is my next proposal, keep the sql in "java" but have the actual data > access (sql) be in a separate class from the catalog implementation. This > sql class can be chosen by a property. That way our project could > implement a new sql class in our "adaptation" layer which is easier for us > to deliver than core code but we would still be using the column-based > organization. > > It may also make it easier to adapt to other (non-oracle) databases as the > sql is separated from the code that depends simply on java.sql.* (and a > JDBC driver) from the code that is oracle specific. > > Chris is this similar to what you were suggesting? Yep it's precisely what I was suggesting. 1. Create a OracleColumnOrientedQueries.java file that is a java interface that implements the SQL queries and associated met keys (fields) in the DB. 2. dynamically select which interface .java file selected via config. An alternative to the Java interface approach is to look at the SqlScript.java class to implement #1 above. > > Thanks for your input! NP, let me know if that helps! Cheers, Chris ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: [email protected] WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
