What Is the Reading Level of the Neo-4

Neo4j vs GRAKN Part I: Basics

An exhaustive comparison between two most pop knowledge bases

Duygu ALTINOK

How Grakn Works

Grakn: focused on noesis representation, non much giving away existence a graph
          When writing Graql queries, we merely draw            what            data we would like to recollect, rather than            how            should it be obtained. In one case nosotros specify the target information to retrieve, the Graql query  processor volition take care of finding an optimal way to call up it.                  
          Grakn is a database in the grade of a cognition graph, that uses an  intuitive ontology to model extremely complex datasets. It stores data  in a way that allows machines to understand the meaning of data in the consummate context of their relationships. Consequently, Grakn allows computers to procedure complex data more intelligently with less homo intervention          Graql is a declarative, cognition-oriented graph query linguistic communication that uses machine reasoning for retrieving explicitly stored and implicitly derived knowledge from  Grakn.        

How Neo4j Works

How Grakn Wins over OWL

What Neo4j Brings

Getting Started

Development Surroundings and Visualization

Queries with Grakn workbase, photograph taken from their Github

Querying inside the Neo4j browser, taken from their documentation

Neo4j visualization for maps data, taken from their Medium programmer weblog

Underlying Data Structure

Data Modeling

Modeling knowledge with graph notions, paradigm taken from Neo4j documentation

Query Language

          //Nix          MATCH (p:Person { proper noun: "Duygu" })
RETURN p
//Graql
match
$p isa person, has name "Duygu";
get $p;

Creating a Schema

          define

person sub entity,
has name,
plays employee;

company sub entity,
has name,
plays employer;

employment sub relation,
relates employee,
relates employer;

name sub attribute,
datatype cord;

          CREATE (d:Person { name:"Duygu"})
CREATE (thousand:Company {name: "German Autolabs"})
Lucifer (a:Person),(b:Company)
WHERE a.proper noun = 'Duygu' AND b.name = 'German Autolabs'
CREATE (a)-[r:Employed { since: '2018' }]->(b)
Render type(r), r.proper name

Querying

          match $p isa customer; get;          match $p isa customer, has start-name "Rebecca"; go;          lucifer $p isa customer, has total-name $fn; { $fn contains "Rebecca"; } or { $fn contains "Michell"; }; get;        
          friction match
$person isa client, has age < 25;
$bill of fare isa credit-card, has type "Mastercard";
(client: $person, credit-card: $menu) isa contract, has debt $debt;
go $debt; mean $debt;
          MATCH (client:Customer)
Return customer
Friction match (client:Customer)
WHERE customer.first_name = 'Rebecca'
RETURN customer
//or equivalently with a bit syntactic sugar Lucifer (customer:Customer {first_name: "Rebecca"})
RETURN customer
// Friction match (customer:Customer)
WHERE p.first_name STARTS WITH 'Steph'
Return p
          Match (car:Car {brand: "Audi"})<-[:DRIVES]-(customers)
Return customers.first_name
          Lucifer (customer:Client)-[:OWNS]->(carte:CreditCard {type: "Mastercard"})
WHERE customer.age < 25
RETURN AVG(carte.debt)
          MATCH (n)
Return labels(n), keys(n), size(keys(n)), count(*)
Guild BY size(keys(n)) DESC
          MATCH (:Person { proper noun: "Oliver Stone" })-[r]->(movie)
Return blazon(r) //DIRECTED
          //Proper name of the movies that Charlee Sheen acted and their directors          MATCH (charlie { name: 'Charlie Sheen' })-[:ACTED_IN]->(movie)<-[:DIRECTED]-(manager)
RETURN movie.title, managing director.name
          MATCH (p1:Person)-[:FOLLOWS*1..2]-(p2:Person)
WHERE p1.name = "Alicia"
Render p1, p2
          Friction match p = shortestPath((p1:Person)-[*]-(p2:Person))
WHERE p1.proper name = "Alicia" AND p2.name = 'Amerie'
RETURN p

Inference

          Grakn is capable of reasoning over information via pre-defined rules. Graql  rules look for a given design in the dataset and when plant, create the given queryable relation.          Graql reasoning is performed at query time and is guaranteed to be complete.        

Sibling inference rule, taken from Grakn documentation

Logical Integrity

          Neo4j helps enforce data integrity with the use of constraints.  Constraints can be practical to either nodes or relationships. Unique node  belongings constraints can be created, too as node and relationship  property beingness constraints.        

Scalability

Graph Algorithms

Grakn World vs Neo4j World

oldhamarld1937.blogspot.com

Source: https://towardsdatascience.com/neo4j-vs-grakn-part-i-basics-f2fe3511ce88

0 Response to "What Is the Reading Level of the Neo-4"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel