Database Reference
In-Depth Information
In-the-clickstream queries on live data
We all know that you can implement different database queries—such as the
preceding example—in different kinds of database management systems.
However, in most alternative systems, these types of queries would yield terrible
performance on the live database management systems, and potentially endanger
the responsiveness of an entire application. The reaction of the relational database
management industry, therefore, has been to make sure that these kinds of queries
wouldbedoneonprecalculated,preformatteddatathatwouldbespeciically
structured for this purpose. This means duplicating data, denormalizing data, and
using techniques such as Extract, Transform, and Load ( ETL ) that are often used in
BusinessIntelligencesystemstocreatequery-speciicrepresentations(sometimes
also referred to as cubes) for the data at hand. Obviously, these are valuable
techniques—the business intelligence industry would not be the billion-dollar
industry that it is otherwise—but they are best suited for working with data that can
be allowed to be more stale, less than up-to-date. Graph databases will allow you to
answer a wider variety of these complex queries, between a web request and a web
response, on data that will not have to be replicated as much, and that therefore will
be updated in near real time.
Path inding queries
Another type of query that is extremely well suited for graph databases are queries
whereyouwouldbelookingtoindouthowdifferentdataelementsarerelatedto
eachother.Inotherwords,indingthepathsbetweendifferentnodesonyourgraph.
The problem with such queries in other database management systems is that you
would actually have to understand the structure of the potential paths extremely well.
You would have to be able to tell the database how to "jump" from table to table, so to
speak. In a graph database, you can still do that, but typically you won't. You just tell
the database to apply a graph algorithm to a starting point and an endpoint and be
donewithit.It'suptothedatabasetoigureoutifandhowthesedataelementswould
be connected to each other and return the result as a path expression for you to use
in your system. The fact that you are able to delegate this to the database is extremely
useful, and often leads to unexpected and valuable insights.
Obviously, the query categories mentioned above are just that: categories. You
wouldhavetoapplyittoanyoftheieldsofresearchthatwediscussedin Chapter
1 , Graphs and Graph Theory - an Introduction ,toreallyreapthebeneits.Wewillcome
back to this in later chapters.
 
Search WWH ::




Custom Search