Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Neo4j Graph Data Modelling
  • Toc
  • feedback
Neo4j Graph Data Modelling

Neo4j Graph Data Modelling

By : Mahesh K Lal
3 (1)
close
Neo4j Graph Data Modelling

Neo4j Graph Data Modelling

3 (1)
By: Mahesh K Lal

Overview of this book

If you are a developer who wants to understand the fundamentals of modeling data in Neo4j and how it can be used to model full-fledged applications, then this book is for you. Some understanding of domain modeling may be advantageous but is not essential.
Table of Contents (11 chapters)
close
10
Index

Modeling bookings in an RDBMS

To model data shown in Figure 4.1 in an RDBMS, we will have to create tables for bookings, journeys, passengers, and users. In the previous model, we have intentionally added booking_id to Journeys and user_id to Bookings. In an RDBMS, these will be used as foreign keys.

We also need an additional table Bookings_Passengers_Relationships so that we can depict the many relationships between Bookings and Passengers. The multiple relationships between Bookings and Passengers help us to ensure that we capture passenger details for two purposes. The first is that a user can have a master list of travelers they have travelled with and the second use is to ensure that all the journeys taken by a person can be fetched when the passenger logs into their account or creates an account in the future.

Note

We are naming the foreign key references with a prefix fk_ in adherence to the popular convention.

Modeling bookings in an RDBMS

Figure 4.2: Modeling bookings in an RDBMS

In an RDBMS, every record is a...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete