Advanced MATCH queries

In this section, you will see the power of the MATCH clause in more detail. Queries will be issued in a SQL Server 2017 instance of the Internet Movie Database (IMDb). The entirety of IMDb's datasets are available in TSV format at https://datasets.imdbws.com. Here is a sample data model of this graph database:

Simplified data model of the IMDb graph database

For the purpose of this example, I have created three node and two edge tables. Here is the code to create tables and indexes:

CREATE SCHEMA graphGO--node table MovieCREATE TABLE graph.Movie(Id INT NOT NULL,Name NVARCHAR(300) NOT NULL,ReleaseYear INT NULL,CONSTRAINT ...

Get SQL Server 2017 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.