Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Learning Neo4j
Learning Neo4j

Learning Neo4j: Run blazingly fast queries on complex graph datasets with the power of the Neo4j graph database

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Learning Neo4j

Chapter 2. Graph Databases – Overview

In this chapter, we want to contextualize the concepts around graph databases and make our readers understand the historical and operational differences between older, different kinds of database management systems and our modern-day Neo4j installations.

To do this, we will cover the following:

  • Some background information on databases in general
  • A walk-through of the different approaches taken to manage and store data, from old-school navigational databases to No-SQL graph databases
  • A short discussion explaining the graph database category, its strengths, and its weaknesses

This chapter should then set our readers up for some more practical discussions later in this book.

Background

It's not always very clear when the first real database management system was formally conceived and implemented. Ever since Babbage invented the first complete Turing computing system (the Analytical Engine, which Babbage never really managed to get built), we have known that computers would always need to have some kind of memory. This will be responsible for dealing with the data upon which operations and calculations will be executed. But when did this memory evolve into a proper database? What do we mean by a database anyway?

Let's tackle the latter question first. A database can be described as any kind of organized collection of data. Not all databases require a management system—think of the many spreadsheets and other file-based storage approaches that really don't have any kind of real material oversight imposed on it, let alone a true management system. A database management system, then, can technically be referred to as a set of computer programs...

The Property Graph model of graph databases

The NOSQL category of graph databases, as we have seen previously, is in a class of its own. In many ways, this is because the underlying data model of graph databases—the Property Graph data model—is of a very specific nature, which we will explain a bit further.

First of all, let's define the Property Graph data model. Essentially, it means that we will be storing our data in the graph database.

A graph structure means that we will be using vertices and edges (or nodes and relationships, as we prefer to call these elements) to store data in a persistent manner. As a consequence, the graph structure enables us to:

  • Represent data in a much more natural way, without some of the distortions of the relational data model
  • Apply various types of graph algorithms on these structures

In short, it enables us to treat the graph nature of that data as an essential part of our capabilities. One of the key capabilities that we will find in the...

Why (or why not) graph databases

By now, you should have a good understanding of what graph databases are, and how they relate to other database management systems and models. Much of the remainder of this book will be drilling into quite a bit more detail on the specifics of Neo4j as an example implementation of such a database management system. Before that, however, it makes sense to explore why these kinds of databases are of such interest to modern-day software professionals – developers, architects, project and product managers, and IT directors alike.

The fact of the matter is that there are a number of typical data problems, and database system queries are an excellent match for a graph database, and that there are a number of other types of data questions that are not specifically designed to be answered by such systems. Let's explore these for a bit and determine the characteristics of your dataset and your query patterns that will determine whether graph databases...

Test questions

Q1. Which other category of databases bears the most resemblance to graph databases?

  1. Navigational databases.
  2. Relational Databases.
  3. Column-Family stores.
  4. None; graph databases are unique.

Q2. The data model of graph databases is often described as the proprietary graph data model, containing nodes, relationships, and proprietary elements.

  1. True.
  2. False.

Q3. Simple, aggregate-oriented queries yielding a list of things are a great application for a graph database.

  1. True.
  2. False.

Summary

In this chapter, we wanted to give you a bit of context before diving into the wonderful world of graph databases headfirst. It's a good idea, from an architect's point of view, to understand how graph database management systems like Neo4j came about, what problems they are trying to solve, what they are good at, and what they are perhaps less well suited for.

With that in mind, we are now ready to get our hands dirty, and start with actually playing around with Neo4j, the world's leading graph database.

Left arrow icon Right arrow icon

Description

Neo4j is the world's leading graph database and offers users a radical new way of dealing with connected data. This book has been created to help you get to grips with it, providing you with an accessible route through a tool built to contend with the complexity of modern data. Learn the fundamental concepts behind Neo4j, and put them into practice by following the featured examples and use cases that demonstrate how to apply your knowledge to real problems. Starting with a brief introduction to graph theory, this book will show you the advantages of using graph databases. Following on from that, you will be introduced to Neo4j and you will be shown how to install it on various operating systems. You will then be shown how you can model and import your data into Neo4j. This book has two use case examples that will show you how to model and implement a graph in Neo4j by analyzing a user case, and analyze the impact a change has on a process or a system. You will also gain an insight into graph visualization options and discover external sources where you can learn more about this exciting and popular graph database.

What you will learn

  • Background and specifications of graph databases
  • Install Neo4j on a variety of different platforms, locally and in the cloud
  • Model data for a graph database such as Neo4j
  • Import data into Neo4j
  • Learn about sample use cases for Neo4j
  • Discover the advantages of graph databases versus other database models
  • Find out where you can find additional information on Neo4j

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 25, 2014
Length: 222 pages
Edition : 1st
Language : English
ISBN-13 : 9781849517171
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Aug 25, 2014
Length: 222 pages
Edition : 1st
Language : English
ISBN-13 : 9781849517171
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 101.97
Neo4j Cookbook
€36.99
Learning Neo4j
€41.99
Learning Cypher
€22.99
Total 101.97 Stars icon
Banner background image

Table of Contents

12 Chapters
1. Graphs and Graph Theory – an Introduction Chevron down icon Chevron up icon
2. Graph Databases – Overview Chevron down icon Chevron up icon
3. Getting Started with Neo4j Chevron down icon Chevron up icon
4. Modeling Data for Neo4j Chevron down icon Chevron up icon
5. Importing Data into Neo4j Chevron down icon Chevron up icon
6. Use Case Example – Recommendations Chevron down icon Chevron up icon
7. Use Case Example – Impact Analysis and Simulation Chevron down icon Chevron up icon
8. Visualizations for Neo4j Chevron down icon Chevron up icon
9. Other Tools Related to Neo4j Chevron down icon Chevron up icon
A. Where to Find More Information Related to Neo4j Chevron down icon Chevron up icon
B. Getting Started with Cypher Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.1
(9 Ratings)
5 star 55.6%
4 star 22.2%
3 star 11.1%
2 star 0%
1 star 11.1%
Filter icon Filter
Top Reviews

Filter reviews by




Ken R. Adcock, Jr. Mar 31, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If one follows software development, it's almost impossible to miss the buzz about NoSQL databases. Graph databases get mentioned along with the more familiar document and column-family NoSQL solutions. However, they seem to be frequently relegated to the periphery of the discussion given they are thought to address very specific problem domains - namely recommendation engines and social network analysis. More people, myself included, are now realizing that many real-world entities can be modeled as networks of data and that valuable insights can be realized if they could be understood better. Historically, modeling such networks via traditional relational databases has always been difficult. With all that said, graph databases are now being given more attention.I think few would disagree that whenever graph databases are mentioned, Neo4j gets mentioned first as an actual example. Therefore, I read Learning Neo4j, by Rik Van Bruggen and published by Packt Publishing, with great interest. I can say this is the first complete book I have read about Neo4j so I have not been influenced by any prior resources.The About the Author section states that Rik Van Bruggen is a Regional Territory Manager for Neo Technology - the company behind Neo4j. I expected a fair amount of product-specific evangelism when I first started to read the book. I was pleased to see that Rik kept that to a minimum and did so in a very professional manner. The focus stays on conveying the basic concepts and I never felt feel like I was reading a sales pitch from a vendor whitepaper.Rather than just provide a very high-level review, interested readers may find the following chapter-level detail to be more informative.Chapter 1 - (Graphs and Graph Theory - An Introduction) - The author sets the foundation by explaining graph theory in an understandable way. I really don't see how this could have been done better. Also included was some history going back to the famous mathematician Euhler who is considered by most to be the father of graph theory. By graphs, we mean nodes and edges- not graphics. I thought the illustration from Euhler's original 1736 paper was a nice touch. The author goes on to discuss the basic definitions of graphs and how they apply to real-world problems. The final message of this chapter: "Graphs Are Everywhere."Chapter 2 (Graph Databases - Overview) - This chapter discussed how the traditional relational database systems suffer when attempting to model data organized as networks. The author discusses the family of NoSQL databases and how they work such as key-value, column-family, and document stores along with graph-oriented databases. The author goes on to describe a key concept called the Property Graph model along with a description of what graph databases are good at and not so good at. The amount of territory covered in this chapter and the way it was written was nicely done.Chapter 3 (Getting Started with Neo4j) - In this chapter, one gets into Neo4j. Probably the biggest surprise for me was reading that Neo4j is an ACID-compliant database. The author spends some time discussing the differences between OLTP and OLAP databases along with the declaration that Neo4j falls into the OLTP category. Also, the reader gets their first introduction to Cypher - the query language for performing DDL and DML operations on Neo4j databases. Finally, the author provides installation steps for Windows, Mac, and Linux operating systems. The author also makes a brief mention of Neo4j in a cloud environment. I was very happy to read about a cloud-based "graph as a service" solution called GrapheneDB. I plan on checking into that further.Chapter 4 (Modeling Data for Neo4j) - I regard this chapter as a core part of this book and also the most difficult to internalize. In this chapter, the author goes into detail on how to model real world entities into the graph database structure. I feel the author makes a good case explaining the limitations and complexities associated with modeling the real-world through the use of entity-relationship (ER) diagrams used for relational database design. This is contrasted against the flexibility of a graph database. Hence, the title of one section: "A graph model - a simple, high-fidelity model of reality". I would say the critical point made in this chapter is the questions you are trying to answer drive the design of the data model. In other words, the queries drive the design. This is a complex chapter with difficult to teach subject matter. You could write an entire book on this one chapter. I do feel the author made a good effort here.Chapter 5 (Importing Data into Neo4j) - Put simply, this chapter describes multiple approaches on how to get data into a Neo4j database. Several tools are illustrated along with some pros and cons. This chapter focuses on tools and techniques and the author mentions the contents of this chapter are not an exhaustive list. However, there is plenty here to get you started.Chapter 6 (Use Case Example - Recommendations) - If you have read this far, you will find the author has done an excellent job making you very eager to read this chapter and the one to follow. In this chapter, you dive into the most familiar use case when the subject of graph databases comes up - recommender systems. The author sets the stage with a simple data model and demonstrates how Neo4j can issue queries against this data model to address recommendations regarding product purchases, brand loyalty, and social ties. The author provides informative Cypher queries along the way. Also included is what I regard as nice bonus material involving the same principles behind recommender systems - use case descriptions involving fraud detection, access control, and social networks. The author doesn't go into a lot of detail with these three use cases, but it was interesting to read about them.Chapter 7 (Use Case Example - Impact Analysis and Simulation) - I believe the goal of the author when writing this chapter was to expand the reader's horizons beyond the much more obvious and more commonly discussed use cases described in the prior chapter. In this chapter, the author begins by describing how Neo4j can help with business process management. In other words, we can model business processes as an interconnected system of workflows, software applications, departments, and physical assets such as buildings. Continuing along the same theme, the author demonstrates the usefulness of Neo4j as an impact simulation tool. One can better understand how an exogenous shock such as a price increase of a component can ripple through a complex product hierarchy and the associated product cost structure. Perhaps due to my own ignorance, I found this chapter to be the most esoteric part of the book, but I still found a lot of value from it. The moral of this story is that if a system can be mapped into a graph data structure, then Neo4j may be able to help.Chapter 8 (Visualizations for Neo4j) -From this point forward, the tempo of the book slows down. That's ok. For me, the intensity of the information from the prior chapters left me pretty full. In this chapter, the author goes through several tools, which includes JavaScript visualization libraries such as D3.js where you have to write code to solutions that have a graphical user interface. Even prior to reading this, I found that although graphical displays of large dense networks were cool to look at, it was really difficult to derive anything particularly actionable or insightful. The author even makes mention of that. This chapter provided me with some good information on visualization tools, but I still don't have a good understanding about how to use visualizations as a way to derive insights from complex networks. However, I don't hold that against the author.Chapter 9 (Other Tools Related to Neo4j) - In this chapter, the author surveys some data integration and business intelligence tools that can work with Neo4j databases. Of particular interest to me was learning about the existence of a JDBC driver for Neo4j. Finally, the chapter concludes with a brief discussion of graph modeling tools.Appendix A and Appendix B - The author provides some brief information on Neo4j community resources. What got my attention was the mention of the GraphGists website where people can post their own models and use cases. I plan on spending some time on that site. Also included is a helpful mention of a Cypher reference card along with a more detailed treatment of the Cypher key words. There isn't enough there to be a comprehensive explanation of Cypher, but there is enough to prepare you for a deeper dive.The author writes in a very clear style that is easy to read and follow. In fact, it was a pleasure to read. To be clear, this is an introductory book. You will come away with a firm foundation on graph databases and Neo4j as an implementation. I can say I would very much appreciate an advanced-level Neo4j book from the same author. If he decides to write such a book, I will certainly buy it.Finally, if the author's goal was to teach the basic concepts about graph databases via Neo4j in manner that peaks the reader's curiosity to learn more, then he was successful. If you already have some expertise with Neo4j, then this book may be much less of a benefit to you than it was for me. I maintain you should probably still check it out. I bet you will still learn some neat things you didn't know. This was a very well written book. I really enjoyed it and I recommend it. This book earns 5 stars from me.
Amazon Verified review Amazon
A. Zubarev Feb 09, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
One of the fascinated technical books I have ever read, while not difficult to understand (hint: Neo4J is well put together), it is very informative, yet elegantly written that to an able to learn on its own reader can open a whole slew of possibilities and opportunities.I need to step back and tell that I approached this book initially with some scepticism, and while I was on the very first pages of it one of my co-workers pryingly glanced over my shoulder and asked, what are you reading? I replied: “it is a book on a Graph database called Neo4J”. His reaction was, “I did not even know there are such a database type!”. As a database professional though I felt obliged to make myself aware and somewhat educated on alternative or niche databases, this is what I thought then, but now… read on.Ric Van Bruggen is definitely in love with Neo4J, but he is also a talented teacher, this book could much less of a technical reference than it is without him. Ric tastefully expands from the history and basics of Graph databases up to very practical, yet advance usages and ends the book with the tools ecosystem and even a neat Cypher ref-card. Besides, I think Cypher is the cornerstone to the successful operation of Neo4J. For the impatient reader, Cypher to Neo4J is as SQL to RDBMS’.The book reads like a story, it gradually builds your level of knowledge and at the same time makes you “feel at home” with Neo4J, it is a very welcoming database.My interest grew with every page I flipped.The database gets easily installed on any platform, and for the record, its graphing (visual) abilities are stunning! It can also output data in the tabular form. Yet, based on what Ric stated it is VERY fast – he processed 2.1 mil nodes in under 50 sec on a laptop (disclaimer: I did not run any Cypher code, but I am planning to).This book, especially its chapters 6 and 7 (use case examples), were of immense interest to me, the Recommendation Engine, Impact Analysis I loved both a lot. I think my case using Neo4J will be on finding the best driving path (based on more than 2 factors) that I want to experiment with.I figured, Neo4J is supported by a vast number of enterprise grade tools comprising a serious ecosystem in which Neo4J strives to take on new heights.After reading this book I must say the Graph Databases are seriously overlooked.Well done, Ric, Packt and etc. A 5 out of 5 from me!Take Neo4J for spin!
Amazon Verified review Amazon
HockeyCanMan Jan 02, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a very good addition to the growing base of Neo4j documentation. Data import and use case examples are well written. Recommended.
Amazon Verified review Amazon
Biju Mathews May 15, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book
Amazon Verified review Amazon
Arda Mar 31, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a good introductory book for Neo4j for anyone considering a switch from RDBMS's. It gives a brief but very interesting history of Graph Theory and Databases, and how Graph Theory can solve some short comings of RDBMS's. The author presents solid use cases where a Graph Database could be preferred instead of a RDBMS, and vice versa. There is also some basic information about installation and setting up your environment, and basic Cypher usage. For advanced Cypher usage, you may want to look somewhere else.One of the short comings of the book is that there is no word about Operational perspective of Neo4j, scaling and maintenance, etc. Which are pretty important concerns when switching from an RDBMS. While I can understand that this is probably out of the scope of this introductory book, I would still expect at least some insight about scaling.Buy this book if you want to learn if a Graph Database is good for you or not, or if you need some help ideas about basic usage.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.