Relationships in SQL Server 2017 are represented with edge tables. To create an edge table, use the extended CREATE TABLE statement. Unlike node tables, an edge table can be created without a single property. In this example, you will create the dbo.Follows edge table, which should represent who is followed by whom from the set of users created in the previous section. Assume that the users follow the other users according to the following table:
User |
Follows |
@MilosSQL |
@DejanSarka, @sql_williamd, @tomaz_tsql, @WienerSportklub |
@DejanSarka |
@MilosSQL, @sql_williamd, @tomaz_tsql, @nkolimpija |
@sql_williamd |
@DejanSarka, @tomaz_tsql |
@tomaz_tsql |
@MilosSQL, @DejanSarka, @sql_williamd |
@WienerSportklub |