Archive | November, 2011

Hierarchical Data: Rendering with Razor

I’ve walked through persisting hierarchical data via closure tables and then through abstracting the closure table in the application layer.  Now, we’ll look at rendering our hierarchy in an ASP.NET MVC 3 sample application using Razor. For the styling of the hierarchy I use jquery treeview which I quite like for its simplicity.  The typical approach […]

Continue reading

Hierarchical Data: Applying Data Structures

In my previous post I walked through persisting hierarchical data using closure tables.  While closure tables are a great technique for persistence we need a more approachable way to deal with the hierarchy in the application layer.  Since we are dealing with a hierarchy it stands to reason that we could benefit from a tree-like […]

Continue reading

Hierarchical Data: Persistence via Closure Table

Recently, I’ve been working with hierarchical data using closure tables.  The problem this technique solves for me is persisting hierarchical relationships of specific entities without any restriction on the size of the hierarchy and while providing a simple way to query the hierarchy.  Closure tables, above other solutions like path enumeration, maintain referential integrity.

Continue reading