O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Neo4j Essentials

Book Description

Leverage the power of Neo4j to design, implement, and deliver top-notch projects

In Detail

With a rise in the popularity of NoSQL databases, Neo4j provides a viable alternative for storage, processing, and querying highly connected data natively in the form of graphs. It saves you the trouble of tabular data formats and join operations while providing a fast querying language called Cypher, which is declarative and works on the principle of pattern matching. It is an open source database and has been tailored to be integrated into a wide variety of scenarios, platforms, and tools.

This book will guide you from the phase where you have to choose the appropriate license towards the deployment phase, instilling good design practices along the way. It will cover every required phase needed by a successful project. Using a fictitious project as a case study, you will learn the various implementation details and concepts of Neo4j that will help you develop your use cases quickly.

What You Will Learn

  • Install Neo4j as an embedded database or a server in minutes
  • Import data into Neo4j from various data sources such as CSV and Excel using efficient batch import processes
  • Model complex interactions and query Neo4j with its top-notch query language, Cypher
  • Integrate Neo4j in your Java applications, using Neo4j APIs
  • Leverage the mapping power of Spring Data Neo4j in your Java applications
  • Write your own Neo4j extensions
  • Deploy Neo4j within your infrastructure in minutes

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Neo4j Essentials
    1. Table of Contents
    2. Neo4j Essentials
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Installation and the First Query
      1. Licensing options
        1. Community Edition
        2. Enterprise Edition
          1. A common feature set
          2. Personal license
          3. The start up program
          4. Enterprise subscriptions
        3. Applicability
      2. System hardware requirements
      3. Deployment options
      4. Installing Neo4j Community Edition on Windows
        1. Installing as a Windows service
        2. Installing as a Windows archive / standalone application
      5. Installing Neo4j Community Edition on Linux/Unix
        1. Installing as a Linux tar / standalone application
        2. Installing Neo4j as a Linux service
      6. Installing the Neo4j Enterprise Edition
        1. Configuring a Neo4j cluster on Windows
        2. Configuring a Neo4j cluster on Linux/Unix
      7. Tools and utilities for administrators/developers
      8. Running your first Cypher query
        1. Interactive console – Neo4j shell
        2. Working with REST APIs
        3. Java code API and embedding the Neo4j database
        4. The Neo4j browser
      9. Summary
    9. 2. Ready for Take Off
      1. Integration of the BI tool – QlikView
      2. Creating a ready-to-use database – batch imports
        1. The CSV importer
          1. LOAD CSV with CREATE
          2. LOAD CSV with MERGE
        2. The spreadsheet way – Excel
        3. HTTP batch imports – REST API
        4. Java API – batch insertion
          1. BatchInserter
          2. Batch indexing
      3. Understanding performance tuning and optimizations
        1. Tuning JVM
        2. LOAD CSV
        3. Batch inserter / indexer
      4. Summary
    10. 3. Pattern Matching in Neo4j
      1. Agile data modeling with Neo4j
      2. Patterns and pattern matching
        1. Pattern for nodes
        2. Pattern for more than one node
        3. Pattern for paths
        4. Pattern for labels
        5. Pattern for relationships
        6. Pattern for properties
        7. Expressions
        8. Usage of pattern
      3. Read-only Cypher queries
        1. Creating a sample dataset – movie dataset
        2. Working with the MATCH clause
          1. Working with nodes
          2. Working with relationships
        3. Working with the OPTIONAL MATCH clause
        4. Working with the START clause
        5. Working with the WHERE clause
        6. Working with the RETURN clause
      4. Schema and legacy indexing
        1. Using legacy indexes
        2. Using schema-level indexing
        3. Creating schema with Cypher
      5. Movie Demo with GraphGists
      6. Summary
    11. 4. Querying and Structuring Data
      1. Cypher write queries
        1. Working with nodes and relationships
        2. Working with MERGE
      2. Writing data in legacy indexing
      3. Writing data in a schema
        1. Managing schema with Java API
        2. Managing schema with REST
      4. Unicity and other schema constraints
        1. Applying unicity constraints with REST
        2. Applying unicity constraints with Java
      5. Cypher optimizations
      6. Summary
    12. 5. Neo4j from Java
      1. Embedded versus REST
        1. Embedding Neo4j in Java applications
        2. Neo4j as a REST-based application
        3. Which is best?
      2. Unit testing in Neo4j
        1. Testing frameworks for Neo4j
      3. Java APIs
      4. Graph traversals
      5. Summary
    13. 6. Spring Data and Neo4j
      1. Spring Data philosophy
        1. First step – Neo4jTemplate
      2. Spring Data repositories and entities
      3. Advanced mapping mode – AspectJ
      4. Summary
    14. 7. Neo4j Deployment
      1. Neo4j architecture and advanced settings
        1. High Availability and linear scalability
        2. Fault tolerance
        3. Data replication and data locality
        4. Backup and recovery
        5. Advanced settings
      2. Neo4j cluster – principles and recommended setup
        1. Scaling write throughputs
          1. Introducing queues for write operations
          2. Batch writes
          3. Vertical scaling
          4. Tuning Neo4j caches
        2. Scaling read throughputs
          1. Load balancer
          2. Cache-based sharding
      3. Monitoring
        1. JConsole in local mode
        2. JConsole in remote mode
      4. Summary
    15. 8. Neo4j Security and Extension
      1. Neo4j security
        1. Securing access to Neo4j deployment
        2. Restricting access to Neo4j server / cluster with the proxy server
        3. Feature deactivation
        4. Fine-grained authorization
      2. API extensions – server plugins and unmanaged extensions
        1. Server plugins
        2. Unmanaged extensions
      3. Summary
    16. Index