Site icon IT World Canada

Application characteristics where graph databases are superior

Shutterstock

Relational databases are so entrenched and ubiquitous that we reflexively use them for new application requirements. However, graph databases are better for applications with specific processing requirements and data structures.

When relational databases handle application processing and data structures poorly, the consequences include:

There are many differences between relational databases and graph databases. The most significant difference is that relational databases determine relationships through join processing based on primary and foreign key values. Graph databases take a much different approach to handling relationships. They store relationships as physical pointers in the database.

Data structures where graph databases are the better choice are as follows.

Complex data relationships

The following data structures express complex data relationships:

Applications that process complex data relationships include:

Data hierarchies

Data hierarchies include the following data structures:

Applications that process data hierarchies include:

Highly connected data

Highly connected data consists of data structures where entity values are connected to multiple related entity values via one or more intersection tables.

Applications that process highly connected data include:

Real-time insights

Some applications must produce real-time insights to encourage an action or prevent an outcome. Examples include:

In these applications, if the insights are not real-time, the business can not capture an opportunity, or adverse consequences can occur. Graph databases can achieve the fast response required. Solutions that involve relational databases and ETL are not quick enough.

Evolving data schemas

Our systems development and enhancement work routinely encounters continually evolving business requirements. These changes typically trigger changes to database schemas.

Relational databases expect a well-defined, preferably static, schema. Changes require well-planned schema and application migrations. Often, the implementation of changes requires an application outage. Applications that do not require the new data are still affected by it.

The opposite extreme is no schema. The data infers the schema. The enforcement of the schema is handled within the application. Implementing changes is achieved by simply loading the new data without planning or an application outage. However, other applications that depend on a defined schema can not access the database.

Graph databases operate between these two extremes. There is a prescribed schema. Constraints enforce it. Changes are implemented by changing the schema while the database and applications are active. Only applications coded to access the new data see it. Older applications do not see the new data and are unaffected by it.

How graph databases deliver fast performance

In all these data situations, applications interacting with relational databases process primary key values, foreign key values and multiple indices. However, applications interacting with graph databases only process the physical pointers. This difference creates a significant performance advantage in favour of using graph databases. This difference is often an order of magnitude and can be multiple orders of magnitude in particularly complex situations.

You may wonder if there’s a cost side associated with achieving this fast performance. There is. Graph databases are slower and more resource-consuming for insert performance than relational databases. However, in most applications, records are read many more times than they are inserted or updated. That reality offsets the higher cost for insert performance.

Impediments to implementing graph databases

If graph databases are this impressive, why isn’t everyone using them? Here are some reasons:

Despite these reasons, organizations implement graph databases when the data exhibits the characteristics described above, or the data volumes, regardless of data structure, are billions of rows.

 

What ideas can you contribute to help organizations recognize data structures that can lead to superior graph database applications? We’d love to hear your opinion. You can share that with us below. Select the checkmark for agreement or the X for disagreement. In either case, you’ll be asked if you also want to send your comments directly to our editorial team.

Exit mobile version