theirdatainacommondatabase.Thisimprovescommunicationbecausealltheapplicationsare
operatingonaconsistentsetofpersistentdata.
Therearedownsidestoshareddatabaseintegration.Astructurethat’sdesignedtointegratemany
applicationsendsupbeingmorecomplex—indeed,oftendramaticallymorecomplex—thanany
singleapplicationneeds.Furthermore,shouldanapplicationwanttomakechangestoitsdatastorage,
itneedstocoordinatewithalltheotherapplicationsusingthedatabase.Differentapplicationshave
differentstructuralandperformanceneeds,soanindexrequiredbyoneapplicationmaycausea
problematichitoninsertsforanother.Thefactthateachapplicationisusuallyaseparateteamalso
meansthatthedatabaseusuallycannottrustapplicationstoupdatethedatainawaythatpreserves
databaseintegrityandthusneedstotakeresponsibilityforthatwithinthedatabaseitself.
Adifferentapproachistotreatyourdatabaseasanapplicationdatabase—whichisonlydirectly
accessedbyasingleapplicationcodebasethat’slookedafterbyasingleteam.Withanapplication
database,onlytheteamusingtheapplicationneedstoknowaboutthedatabasestructure,whichmakes
itmucheasiertomaintainandevolvetheschema.Sincetheapplicationteamcontrolsboththe
databaseandtheapplicationcode,theresponsibilityfordatabaseintegritycanbeputinthe
applicationcode.
Interoperabilityconcernscannowshifttotheinterfacesoftheapplication,allowingforbetter
interactionprotocolsandprovidingsupportforchangingthem.Duringthe2000swesawadistinct
shifttowebservices[Daigneau],whereapplicationswouldcommunicateoverHTTP.Webservices
enabledanewformofawidelyusedcommunicationmechanism—achallengertousingtheSQLwith
shareddatabases.(Muchofthisworkwasdoneunderthebannerof“Service-Oriented
Architecture”—atermmostnotableforitslackofaconsistentmeaning.)
Aninterestingaspectofthisshifttowebservicesasanintegrationmechanismwasthatitresultedin
moreflexibilityforthestructureofthedatathatwasbeingexchanged.IfyoucommunicatewithSQL,
thedatamustbestructuredasrelations.However,withaservice,youareabletousericherdata
structureswithnestedrecordsandlists.TheseareusuallyrepresentedasdocumentsinXMLor,more
recently,JSON.Ingeneral,withremotecommunicationyouwanttoreducethenumberofroundtrips
involvedintheinteraction,soit’susefultobeabletoputarichstructureofinformationintoasingle
requestorresponse.
Ifyouaregoingtouseservicesforintegration,mostofthetimewebservices—usingtextover
HTTP—isthewaytogo.However,ifyouaredealingwithhighlyperformance-sensitiveinteractions,
youmayneedabinaryprotocol.Onlydothisifyouaresureyouhavetheneed,astextprotocolsare
easiertoworkwith—considertheexampleoftheInternet.
Onceyouhavemadethedecisiontouseanapplicationdatabase,yougetmorefreedomof
choosingadatabase.Sincethereisadecouplingbetweenyourinternaldatabaseandtheserviceswith
whichyoutalktotheoutsideworld,theoutsideworlddoesn’thavetocarehowyoustoreyourdata,
allowingyoutoconsidernonrelationaloptions.Furthermore,therearemanyfeaturesofrelational
databases,suchassecurity,thatarelessusefultoanapplicationdatabasebecausetheycanbedoneby
theenclosingapplicationinstead.
Despitethisfreedom,however,itwasn’tapparentthatapplicationdatabasesledtoabigrushto
alternativedatastores.Mostteamsthatembracedtheapplicationdatabaseapproachstuckwith
relationaldatabases.Afterall,usinganapplicationdatabaseyieldsmanyadvantagesevenignoring
thedatabaseflexibility(whichiswhywegenerallyrecommendit).Relationaldatabasesarefamiliar
andusuallyworkverywellor,atleast,wellenough.Perhaps,giventime,wemighthaveseentheshift
toapplicationdatabasestoopenarealcrackintherelationalhegemony—butsuchcrackscamefrom