Click here to Skip to main content
15,894,262 members
Articles / Database Development / SQL Server

A Model to Represent Directed Acyclic Graphs (DAG) on SQL Databases

Rate me:
Please Sign up or sign in to vote.
4.97/5 (50 votes)
26 Jan 2021CPOL20 min read 301.8K   9   114  
Addressing the general problem of representing directed acyclic graphs (DAGs) in SQL databases
The use of the adjacency list method, augmented with addition of transitive closure rows, enables standard SQL to be used with a model of Directed Acyclic Graphs. However, some additional disk space and additional insertion time are required.

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AFCAS", "AFCAS\AFCAS.csproj", "{EFDBD4B5-F962-4391-903C-6EF541A803F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ADSync", "ADSync\ADSync.csproj", "{4B3F29D0-BF47-4C47-9B54-50BAF260EC0E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{04501170-F705-4985-A4FF-D0AC4C9ED7A8}"
	ProjectSection(SolutionItems) = preProject
		COPYING.LESSER.txt = COPYING.LESSER.txt
		COPYING.txt = COPYING.txt
		DB-Script.Sql-Server.sql = DB-Script.Sql-Server.sql
		Interop.ActiveDs.dll = Interop.ActiveDs.dll
		NUnit-license.txt = NUnit-license.txt
		nunit.core.dll = nunit.core.dll
		nunit.framework.dll = nunit.framework.dll
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{EFDBD4B5-F962-4391-903C-6EF541A803F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{EFDBD4B5-F962-4391-903C-6EF541A803F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{EFDBD4B5-F962-4391-903C-6EF541A803F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{EFDBD4B5-F962-4391-903C-6EF541A803F6}.Release|Any CPU.Build.0 = Release|Any CPU
		{4B3F29D0-BF47-4C47-9B54-50BAF260EC0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{4B3F29D0-BF47-4C47-9B54-50BAF260EC0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{4B3F29D0-BF47-4C47-9B54-50BAF260EC0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{4B3F29D0-BF47-4C47-9B54-50BAF260EC0E}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
France France
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions