How to restrict edge nodes in SQL Server 2017 RRS feed

  • Question

  • Hi,

    I'm doing some experinces with graph objects in SQL Server 2017 and I'm thinking about the possibility to restrict the content of edge nodes.

    For example: In a web forum model, ForumPosts is an Edge and ForumReplies is a node that links the posts with their replies. However, how can I include some restriction, for example, one message can be a reply for another single message, the same message can't be inserted as a reply to several different messages.

    I think I could create a check constraint or a trigger, is this the only way or is there some built in way using the graph new t-sql syntax ?

    Thank you !

    Dennes [http://bufaloinfo.cloudapp.net] Inscreva-se em meu treinamento on-line de T-SQL - [http://bufaloinfo.cloudapp.net/Cursos/linguagemsql.aspx]

    Wednesday, June 14, 2017 8:52 PM


All replies