Dude, Where is my Application Logic?Posted: December 18, 2007
Being a DBA means you work with all kinds of applications.
Some applications do everything in Java. The application runs on huge application servers but connect to a DB they share with many other similar applications, and even then the load on the DB is not too high.
Other applications do everything in the DB. The application server is a tiny little vmware guest, sharing a physical host with many other similar applications. The DB is a multi-node RAC that is constantly using 100% CPU.
Which is better? Application developers are not interested in the debate. They know everything should be done in Java and the DB is just a random place where bits are kept.
you’d think that most DBAs would support putting most of the data processing logic in the DB. At the very least follow Steven Feuerstein’s advice and avoid putting queries in the code and wrap them in functions that represent the business logic of the queries. That is, forget about select sal from emp where ename=’Chen’ and use getEmpSalary(‘Chen’) instead.
You’d think that DBAs will know that Oracle is very very good at processing data. Much better than you can make your Java application.
I was very surprised to hear that some DBAs disagree with me. I’ve heard two reasons for it:
1. It is difficult to find skilled PL/SQL developers.
2. Business logic belongs in the application.
The second argument is a bit cyclic and is probably the result of a poor DBA who got brainwashed by the developers.
The first one is worth some thinking. I agree that there are more Java developers than PL/SQL developers. On the other hand, if they are indeed skilled and professional developers, they will quickly see the benefits of putting data processing in the DB and do the right thing. No?
I’ve added few excellent blogs to my reading list recently. Maybe you’ll like them too:
- Oracle at Work – Lots of good advice. And this guy seems to work on exactly the same stuff that I do , so his advice is extra useful. If he didn’t give his name on the blog, I’d probably suspect that the blog is written by the senior DBA in the next cube.
- Richard Foote – I loved his unconference sessions about index internals, and I find his blog a bit addictive. Excellent advice about indexes, with in depth explanations and proofs. What more can a girl want?
- OptimalDBA – This guy is obviously very experienced. The blog is a combination of things that are good to know and very depressing insights about our lovely industry.
- MosheZ – MosheZ is not a DBA. His blog is an interesting mix of technical articles, parkour training and social commentary. I like the geekiness of everything he writes.