RDBMS vs Graph Database
2 min readMay 30, 2019
Relationship between stored data
- Relational databases do not inherently contain the idea of fixed relationships between records. A relationship can be analyzed using complex queries performing many join operations over several tables. Also, foreign key constraints should be considered when retrieving relationships, causing additional overhead.
- In contrast, graph databases directly store the relationships between records. They can scale more naturally to large data sets as they do not typically need costly join operations
Multi-level searching
- Multi-level searching in relational databases requires several searches, look-ups and memory usages involved in holding all the temporary data. Total time needed would be multiple O(log(n)) look-ups, plus the time needed to join all of the data records.
- In graph databases this sort of look-up is completed in O(log(n)) time, that is time proportional to the logarithm to the size of data.
Properties of records
- Relational databases are very well suited to flat data layouts, where relationships between data are one or two levels deep.
- Properties in graph databases improve many common queries. It’s a label that can be applied to any records, or in some cases, edges as well. For example, one might label Amitabh Bachchan as “actor”, which would then allow the system to quickly find all the records that are actors, as opposed to a director or camera operator.