Questions about Graph processing with SQL Server
sql-server-2017 introduces graph-databases into sql-server. See https://learn.microsoft.com/en-us/sql/relational-databases/graphs.
It allows creating Node
and Edge
tables. Edge
tables represent edges in a graph or relationships. Edge
tables are an alternative for the intermediate tables that relational databases require to store n-to-n relationships. Edge
tables connect to Node
tables. Nodes represent an entity.
The MATCH
keyword allows easy traversing the relationships; e.g.:
SELECT Person2.name AS FriendName
FROM Person Person1, friend, Person Person2
WHERE MATCH(Person1-(friend)->Person2)
AND Person1.name = 'Alice';