You do not have access to the server side code so you can not put in 3rd party databases etc. You do not have many AJAX calls to BC, you can submit a web form with JSON and a few things like that but your 3rd party access comes through the SOAP API.
Ok, so essentially if I have an application that relies on a third party database then I need to host it externally, correct?
Yep and API sync that information with BC.
I don't recommend this because you are re-inventing the wheel but if you wanted to call BC remotely and pull in content you would have to do it on an externally hosted solution server side and setup your BC (hosted) templates to only output the data you requested (rather than a full HTML page).
You could also use the API, but it is not build for real time events and it is slow and cumbersome, more build for syncing and queries that don't require a quick reply.