Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Cypher
  • Table Of Contents Toc
Learning Cypher

Learning Cypher

By : Onofrio Panzarino
3.7 (12)
close
close
Learning Cypher

Learning Cypher

3.7 (12)
By: Onofrio Panzarino

Overview of this book

Table of Contents (13 chapters)
close
close

Migrating the data


To migrate the data, you have to convert SQL data to graph data. This is a long-lasting activity of the process and probably awkward as well. Because you have to migrate data from SQL, you must read data using ad hoc SQL queries and write data using Cypher queries.

Note that another strategy would be importing data from a CSV file, with the LOAD CSV FROM statement, which is available from Cypher 2.1 at http://docs.neo4j.org/chunked/milestone/import-importing-data-from-a-single-csv-file.html.

Entities

Because we have to create a node with its attributes, we have to read data using a SQL statement that returns all the data we need to create a node. Of course, you can migrate an entity in more steps, but we would usually prefer to perform only one CREATE query for performance reasons because otherwise we would have to migrate a huge database.

  1. For example, let's start by migrating the Authors entity. This entity is easy to deal with; in fact, all attributes are only in one table...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Cypher
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon