Database Model

Hello everyone! I'm new to GDB and need help to clarify a few things. I want to create a really simple database of a website domain and its subdomains (example.com, sub1.example.com, sub2.example.com) with IP as a property value. In JSON it would be looked like this:

{"Domains": [
    {
      "Name": "sub1.example.com",      "IP": "10.0.0.0"
    },
    {
      "Name": "sub2.example.com",      "IP": "10.0.0.1"
    }]}

What I want to do next is to create a relationship between those domains that share the same IP. What is the proper way to create such neo4j nodes?
I've already tried with the following cypher query:

CREATE (a:Domain {name:"sub1.example.com", ip:"10.0.0.1"})

But then I don't see how to apply the MATCH query.

For what you want, maybe you domain model should consist of ‘Domain’ nodes and ‘Host’ nodes. A Domain node for each web domain and a ‘Hist’ node for each ip address. You can then relate each domain to its host with a relationship like ‘HOSTED_BY’, or whatever you want.

Good point! For some reason I thought that I can escape adding additional type of a node. Thank you :slightly_smiling_face: