Big Data & Tools with NoSQL
  • Big Data & Tools
  • ReadMe
  • Big Data Overview
    • Overview
    • Job Opportunities
    • What is Data?
    • How does it help?
    • Types of Data
    • The Big 4 V's
      • Variety
      • Volume
      • Velocity
      • Veracity
      • Other V's
    • Trending Technologies
    • Big Data Concerns
    • Big Data Challenges
    • Data Integration
    • Scaling
      • CAP Theorem
      • Optimistic concurrency
      • Eventual consistency
      • Concurrent vs. Parallel Programming
    • Big Data Tools
    • No SQL Databases
    • What does Big Data learning means?
  • Linux & Tools
    • Overview
    • Linux Commands - 01
    • Linux Commands - 02
    • AWK
    • CSVKIT
    • CSVSQL
    • CSVGREP
  • Data Format
    • Storage Formats
    • CSV/TSV/Parquet
    • Parquet Example
    • JSON
    • HTTP & REST API
      • Terms to Know
        • Statefulness
        • Statelessness
        • Monolithic Architecture
        • Microservices
        • Idempotency
    • REST API
    • Python
      • Setup
      • Decorator
      • Unit Testing
      • Flask Demo
      • Flask Demo - 01
      • Flask Demo - 02
      • Flask Demo - 03
      • Flask Demo - 04
      • Flask Demo - 06
    • API Testing
    • Flask Demo Testing
    • API Performance
    • API in Big Data World
  • NoSQL
    • Types of NoSQL Databases
    • Redis
      • Overview
      • Terms to know
      • Redis - (RDBMS) MySql
      • Redis Cache Demo
      • Use Cases
      • Data Structures
        • Strings
        • List
        • Set
        • Hash
        • Geospatial Index
        • Pub/Sub
        • Redis - Python
      • Redis JSON
      • Redis Search
      • Persistence
      • Databases
      • Timeseries
    • Neo4J
      • Introduction
      • Neo4J Terms
      • Software
      • Neo4J Components
      • Hello World
      • Examples
        • MySQL: Neo4J
        • Sample Transactions
        • Sample
        • Create Nodes
        • Update Nodes
        • Relation
        • Putting it all together
        • Commonly used Functions
        • Data Profiling
        • Queries
        • Python Scripts
      • More reading
    • MongoDB
      • Sample JSON
      • Introduction
      • Software
      • MongoDB Best Practices
      • MongoDB Commands
      • Insert Document
      • Querying MongoDB
      • Update & Remove
      • Import
      • Logical Operators
      • Data Types
      • Operators
      • Aggregation Pipeline
      • Further Reading
      • Fun Task
        • Sample
    • InfluxDB
      • Data Format
      • Scripts
  • Python
    • Python Classes
    • Serialization-Deserialization
  • Tools
    • JQ
    • DUCK DB
    • CICD Intro
    • CICD Tools
      • CI YAML
      • CD Yaml
    • Containers
      • VMs or Containers
      • What container does
      • Podman
      • Podman Examples
  • Cloud Everywhere
    • Overview
    • Types of Cloud Services
    • Challenges of Cloud Computing
    • High Availability
    • Azure Cloud
      • Services
      • Storages
      • Demo
    • Terraform
  • Data Engineering
    • Batch vs Streaming
    • Kafka
      • Introduction
      • Kafka Use Cases
      • Kafka Software
      • Python Scripts
      • Different types of Streaming
    • Quality & Governance
    • Medallion Architecture
    • Data Engineering Model
    • Data Mesh
  • Industry Trends
    • Roadmap - Data Engineer
    • Good Reads
      • IP & SUBNET
Powered by GitBook
On this page
  • Constraints
  • Create another student without an ID
  1. NoSQL
  2. Neo4J
  3. Examples

Create Nodes

// delete all existing nodes

match (n) detach delete n;

// create new nodes

create (n:Student{id:101,firstname:"Rachel",lastname:"Green",gender:"F",dob:"2000-01-01"});
create (n:Student{id:102,firstname:"Monica",lastname:"Geller",gender:"F",dob:"2000-02-01"});
create (n:Student{id:103,firstname:"Ross",lastname:"Green",gender:"M",dob:"1999-01-05"});
create (n:Student{id:104,firstname:"Chandler",lastname:"Bing",gender:"M",dob:"1999-02-07"});
create (n:Student{id:105,firstname:"Phoebe",lastname:"Buffay",gender:"F",dob:"1998-03-07"});
create (n:Student{id:106,firstname:"Joey",lastname:"Tribianni",gender:"M",dob:"1999-07-08"});
create (n:Student{id:107,firstname:"Janice",gender:"F",dob:"2000-07-08"});

match(y) return y

Constraints

CREATE CONSTRAINT cons_stuid_notnull IF NOT EXISTS FOR (n:Student) REQUIRE n.id IS NOT NULL

CREATE CONSTRAINT cons_stuid_unique IF NOT EXISTS FOR (n:Student) REQUIRE n.id IS UNIQUE

show constraints

drop constraint cons_stuid_unique

Create another student without an ID

create (n:Student{firstname:"Gunther",gender:"M",dob:"1995-07-08"});

Error??

create (n:Student{id:108,firstname:"Gunther",gender:"M",dob:"1995-07-08"});
// create with ID

create (n:Student{id:108,firstname:"Gunther",gender:"M",dob:"1995-07-08"});

// try again to test for Unique

create (n:Student{id:108,firstname:"Gunther",gender:"M",dob:"1995-07-08"});
create (t:Course{id:"C001",name:"Applied DB"});
create (t:Course{id:"C002",name:"Big Data"});
create (t:Course{id:"C003",name:"Data Warehousing"});
create (t:Course{id:"C004",name:"Web Programming"});
create (t:Course{id:"C005",name:"Rust Programming"});


create (z:Faculty{id:"F001",firstname:"Ganesh",lastname:"Chandra"});
create (z:Faculty{id:"F002",firstname:"Jack",lastname:"Myers"});
create (z:Faculty{id:"F003",firstname:"Tony",lastname:"Brietzman"});

View all nodes

match (t) return t

PreviousSampleNextUpdate Nodes

Last updated 1 year ago