Not an EE developer, but trying to answer a question for a client.
They have a database (oracle) that they know they'll need to create a custom front end for, but they want it to somewhat integrate with their EE site. By integrate I just mean they'll create a page called "peoplesearch" and then on that page their custom PHP will execute within the template to connect to the database. I'd imagine that most of the app will change page content via ajax so that it at least won't need to worry much about multiple pages for the app, but it would also be nice if EE would allow for URL manipulation for deep linking into the app for a particular search etc.
ee_database <-> ee_page -> webapp <-> oracle_database
Is this possible? Does this question make sense?