sqlsunday.com

T-SQL programming, useful tips and tutorials for the MS SQL Server developer.

Skip to content
  • Newsletter
  • About sqlsunday.com
  • Structured Concepts
    • Master data tool
    • File parser API
  • Slack app
  • Presentations
  • Downloads
  • Checklists
    • Installing SQL Server 2014
    • Installing SQL Server 2016
    • Installing SQL Server 2017
    • Installing SQL Server 2019
    • Links and utilities
Search

parent

Directed acyclic graphs vs parent-child hierarchies

2014-05-252014-04-09 / Daniel Hutmacher / 1 Comment

We’ve recently looked at ways to work with parent-child hierarchies, particularly in reporting scenarios. Regular parent-child hierarchies are great when working with dimensions that are ragged, but they have a critical limitation – any given node in the tree can only have a single parent node. A great solution to this problem is a DAG – directed acyclic graph.

Continue reading →

Accumulating values in a parent-child hierarchy

2014-04-062017-02-15 / Daniel Hutmacher / 6 Comments

Last week, we looked at how to construct a visual representation of a hierarchy stored as a parent-child table. The obvious next step is to accumulate values stored on those nodes using this hierarchy.

Continue reading →

An indented representation of a parent-child hierarchy

2014-03-302018-07-15 / Daniel Hutmacher / 1 Comment

When you’re designing reports, they can often be based on hiearchies represented by “nodes” in a parent-child setup. To the end-user, the parent-child representation doesn’t provide very much readability, so you need to output this information in a human-readable form, for instance in a table where the names/titles are indented.

Continue reading →

Categories

  • By difficulty (175)
    • Advanced (38)
    • Basics (50)
    • Intermediate (89)
  • CLR (1)
  • Off-topic (13)
  • Rant (5)
  • Scripts (19)
  • Series (29)
    • Efficient data (8)
    • Introduction to T-SQL (1)
    • Slowly changing dimensions (5)
    • SQL Server security (15)
  • SQL Server concepts (74)
  • T-SQL (126)
  • Tips (50)
  • Uncategorized (1)
  • Videos (2)

Search for articles

Create a website or blog at WordPress.com