Relational databases and graphs compared


HEALTH DATA INSTITUTE

What is the difference?

Relational databases are spreadsheets optimised for search and data entry. Instead of worksheets, we have tables linked by a unique identifier - see Figure 1. We create a new table for every variable that is shared with other staff members i.e. every member of staff is in a care group (so there is a care group table). Every member of staff is in a directorate (so there is a directorate table) and every member of staff is in a department (so there is a department table).

When we search a relational database, there has to be a join of the relevant tables e.g. a search on '22987' would produce:
First name: Jim
Family name: Smith
Care group: Network
Directorate: Head & Neck

Figure 1. Relational databases are spreadsheets optimised for search and data entry



Relational databases are constrained - it is not an easy task to add new tables or columns. In contrast, graphs being more simple structures are ideally suited to complexity at scale because it is easy to keep adding data from a variety of sources - see Figure 2.

Figure 2. Graphs are ideally suited to complexity at scale