Tip

Graph database vs. relational database

The graph database and the NoSQL movement are picking up steam by providing alternatives to the traditional relational databases that so many developers are used to. At this point some developers will

    Requires Free Membership to View

probably being saying "And it's about time!" while others will wonder "What's wrong with my old relational database?" There's a reason why some developers think that relational databases are great while others consider them limiting. And both sides are right.

Relational databases are great at what they're good at. In fact, there was a popularity contest between relational databases, graph databases, and a couple other contenders in the eighties. Relational won the contest hands down.

Relational databases are great at what they're good at ... but there are limiting factors



But there are limiting factors to relational databases. One of the limiting factors with relational databases is that they are rigid and difficult to chunk for distributed computing systems. Another is that relational databases are sometimes ill equipped to represent the actual associations between pieces of information.

The resurgence of the graph database is an effort to overcome these limitations. The relational database is based on a somewhat hierarchical system of tables, columns, and rows. Graph databases are based on graph theory. Graph databases employ nodes, properties, and edges.

Nodes are very similar in nature to the objects that object-oriented programmers will be familiar with. Nodes represent entities such as people, businesses, accounts, or any other item you might want to keep track of.

Properties are pertinent information that relate to nodes. For instance, if "SearchSOA" were one of our nodes, we might have it tied to properties such as "website", "SOA related", or "word that starts with the letter 'S'", depending on which aspects of "SearchSOA" are pertinent to our particular database.

Edges are the lines that connect nodes to nodes or nodes to properties and they represent the relationship between the two. Most of the important information is really stored in the edges. Meaningful patterns emerge when you examine the connections and interconnections of nodes properties and edges. 

The resurgence of the graph database is an effort to overcome these limitations.

Graph databases are constantly in flux. New nodes, properties and edges are constantly added and removed as situations change – which is why one of the most prominent uses of graph databases is in social networking. This flexibility also helps out a lot when it comes to distributed computing. The malleable nature of the graph database meshes well with the cloud.


More information about graph databases:

Wikipedia entry for "Graph database"

How to use Facebook's Open Graph API to program the Web

Youtube video:  Need a graph database like Twitter is built on?

Databases: relational vs object vs graph vs document

Graph Databases, NOSQL and Neo4j
 

This was first published in November 2010

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.