Skip to Main Content
  • Questions
  • "Is database schema decoupled from application?" An Architect asked

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, John.

Asked: February 14, 2022 - 10:55 pm UTC

Last updated: February 24, 2022 - 6:53 am UTC

Version: 19c

Viewed 1000+ times

You Asked

Good Morning,

A software architect asked me if the application was decoupled from the database. By "decoupled" he meant the following:

- no Oracle pl/sql since if the application needs to be moved to another RDBMS, there will have to be code updates.
- Doesn't use any Oracle specific functions and oracle specific indexes

It doesn't seem like this is a smart approach to application design. This would mean that a database would simply be used for table creation and basic CRUD operations. What are you thoughts regarding the question? How should we handle insane approaches that may be recommended by "ex-developers" being placed in the leadership position?

Thanks,

John

and Connor said...

This is basically madness

We've known this for decades, eg grom Effective Oracle By Design: http://www.amazon.co.uk/exec/obidos/ASIN/0072230657

"Here's something that you might find controversial : Database dependence (regardless of the database you are using, this does not apply just to Oracle) should be your goal, not something to avoid. You want to maximise the investment in your database. You want to develop the best software in the least amount of time against that database. The only way to do that is to fully exploit what the database has to offer. The truth is that, with the exception of trivial applications, achieving database independence is not only extremely hard, but is also extremely costly and consumes a huge amount of resources ... your application would not use SQL beyond simple "keyed reads" ... in short, you would end up writing your own database."

or if you prefer that sentiment from someone who does not work for Oracle, here is Jonathan Lewis, a long time performance expert

"An application that is database independent is automatically an application that will perform badly at high levels of concurrency or large data volumes. It may do the job adequately, but you may spend all your time and money struggling to push the software into meeting Service Level Agreements (SLAs) and the users' expectations ... Database developers put a lot of effort into making their technology efficient, and basically assume that if they design a good feature into their systems you will be prepared to pay a small performance penalty in one part of their code in order to win a big performance gain elsewhere. Database-independent code doesn't use features, it uses vanilla-flavored, lowest common denominator elements - so you pay every penalty, but never pick up the benefits."

More here

https://asktom.oracle.com/pls/apex/asktom.search?tag=database-independence-vs-database-dependence

But here's the hilarious thing... People justify database independence as:

1- "What it platform X ends up costing too much?"
2- "So we better make it independent of platform X"
3- Because of 2, they burn 10x the CPU to make their software work
4- "See? We were right! Platform X is too expensive"

Self-fulfilling prophecy.

And the other thing?

I hope those developers are not using Windows PCs... or a Mac... or Visual Studio... or Visual Studio code ... or etc etc etc.... because, you know, vendor lockin :-)

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Mirror idea

Chuck Jolley, February 15, 2022 - 12:47 pm UTC

We do practically the opposite. As much as possible in the database to make us as independent of the front end as possible.
Front end programming seems much more fad driven than databases are.
Connor McDonald
February 16, 2022 - 12:09 am UTC

+1

How on earth...

Narendra, February 15, 2022 - 3:40 pm UTC

How should we handle insane approaches that may be recommended by "ex-developers" being placed in the leadership position?

How on earth these "architects" become architects in first place?
John,
If you ever find an effective way to rebuke these people/questions, I am all ears.
I don't know who to blame....management/organizations that allow people with such narrow and crazy thinking to be architects and technology leaders or the people themselves.
If I had a penny for every "application (java/.net etc.) developer" that has become an "architect" then I would be a millionaire by now.
Connor McDonald
February 16, 2022 - 12:11 am UTC

its an all too common issue

John, February 17, 2022 - 4:00 am UTC

Thank you, Connor for your feedback.

His request just really caught me off-guard and didn't seem reasonable, but then I started to question myself regarding the software decoupled approach because he seemed knowledgable in software architecture when he threw around all sorts of new software architectural terms I hadn't dealt with before like data-driven design, domain driven design, microservices designs, etc.

John
Connor McDonald
February 24, 2022 - 6:53 am UTC

There is nothing wrong with loosely coupled, highly cohesive applications, ie, they have good modularity and can be changed/enhanced/etc without impacting other apps or other parts of the system. Microservices takes that to a whole another level.

But thats a far cry from exploiting whatever technology stack you're using to best advantage to get the best return on investment. If I had 1000 microservices, each talking to an oracle database, I want every one of those services using all the facilities that Oracle has to offer.

More to Explore

Design

New to good database design? Check out Chris Saxon's full fundamentals class.