Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Neo4j Graph Data Modelling

You're reading from   Neo4j Graph Data Modelling Design efficient and flexible databases by optimizing the power of Neo4j

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781784393441
Length 138 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Mahesh K Lal Mahesh K Lal
Author Profile Icon Mahesh K Lal
Mahesh K Lal
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Graphs Are Everywhere FREE CHAPTER 2. Modeling Flights and Cities 3. Formulating an Itinerary 4. Modeling Bookings and Users 5. Refactoring the Data Model 6. Modeling Communication Chains 7. Modeling Access Control 8. Recommendations and Analysis of Historical Data 9. Wrapping Up Index

Modeling airports and hotels

To be able to show only those hotels that are located at the airport through which the traveler is transiting, we need to model airports. Currently, airports are a part of the flight information, and this needs to change. We will extract airport information (that is, airport_code) into a separate node labeled :Airport, as shown in Figure 5.1. The property code will act as a unique identifier for an airport.

Modeling airports and hotels

Figure 5.1: Airports and hotels

Hotels will be modeled with their name and the price. Since prices should be comparable, storing them as a number would be beneficial. Considering hotel chains have similar or same names for each class of hotel that that they own, it would be good to have an ID on the hotels.

Note

The currency in which the price is expressed should be a application concern and should not be spread across data and application. Ideally, a standard currency (for example, USD or EUR) would be used to express the price, and the conversion to local currency...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image