Click here to Skip to main content
15,880,905 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 299.6K   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.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="ADSync.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
          <section name="Afcas.Properties.Settings"
                   type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                   requirePermission="false" />
        </sectionGroup>
    </configSections>
    <applicationSettings>
      <Afcas.Properties.Settings>
        <setting name="ConnectionString"
                 serializeAs="String">
          <value>server=SQ1;integrated security= true;database=ESRS_Insp_1</value>
        </setting>
      </Afcas.Properties.Settings>
      <ADSync.Properties.Settings>
        <setting name="LdapPathList" serializeAs="Xml">
          <value>
            <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              <string>LDAP://DC=TEST,DC=ORG</string>
            </ArrayOfString>
          </value>
        </setting>
        <setting name="PrincipalSourceName" serializeAs="String">
          <value>ActiveDirectory</value>
        </setting>
      </ADSync.Properties.Settings>
    </applicationSettings>
</configuration>

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