Relational databases use a data model with strict pre-defined relationships between datapoints in the form of tables, whereas non-relational databases allow more flexibility in the model. Where relational databases are relatively narrow in their form (due to their restrictive definition), non-relational databases come in a wide variety of structures.
Some of the most popular types include: graph databases that string together data nodes, allowing complex interconnecting relationships to be expressed as a network of information; document stores that group together relevant information in documents (often JSON objects), linking those with one another at a level once removed from the data; and key-value databases that use uniquely assigned ‘keys’ to identify and retrieve datapoints.
Generally, non-relational databases are used when a rigid data structure is not sufficient to express the data in hand, as is commonly the case with non-trivial real-world use cases. An obvious example of this is if you have rich text that needs storing, a doccument-based model will be most suitable. Graph databases provide the most dynamic representation among them and offer the deepest interconnectivity of data. They can also utilise semantic reasoning and advanced analytics that can provide greater insights into data than it is otherwise possible to attain.
How to build a knowledge graph?