1

I was going through definition of Graph based database and found that it has entities having relationship with each other. Now, I am a bit confused that why Graph based database falls into category of Non-relational database whereas it has relation among entities.

Thanks in advance.

2

1 Answer 1

2

I think your confusion is probably because you think "relational" means "relationships." It seems most developers these days believe this.

In SQL, we commonly call entities "tables" but in the original computer science that described relational databases, they were called "relations" after the term from mathematics. In short, a table has a heading, which has a finite number of named columns, and it has a set of rows, where each row has the same columns as the heading. This is a relation, and its analogy is to a table, not a relationship between tables.

The relational model includes an algebra of operations you can do on relations, and each operation yields a new relation. These include selection, projection, rename, join, and set operations like union/intersect/difference.

It also defines a set of criteria for modeling data in a set of relations, such that you avoid update anomalies, i.e. you won't have data disagree with other data in the same database. These are rules of normalization.

Graph databases don't necessarily represent relations, and they don't necessarily support relational operations in the same way.

1
  • Terminology tip: the naming of columns (and their data types) is the 'heading' of a relation; it's conceptual. ('Header' is something that files in a file system or tape backup might have; it's physical.)
    – AntC
    Commented Nov 17, 2020 at 5:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.