add MPTT as people never remember the full name
Source Link
icc97
  • 12.1k
  • 9
  • 77
  • 93
added 67 characters in body
Source Link
Rick James
  • 139.1k
  • 14
  • 132
  • 229

MySQL/MariaDB

MySQL/MariaDB

Grammatical stuff
Source Link
Anil Parshi
  • 873
  • 7
  • 23
  • Uses separate join table with: ancestor, descendant, depth (optional)
  • Cheap ancestry and descendants
  • Writes costs O(log n) (size of the subtree) for insert, updates, deletes
  • Normalized encoding: good for RDBMS statistics & query planner in joins
  • Requires multiple rows per node
  • Column: lineage (e.g. /parent/child/grandchild/etc...)
  • Cheap descendants via prefix query (e.g. LEFT(lineage, #) = '/enumerated/path')
  • Writes costs O(log n) (size of the subtree) for insert, updates, deletes
  • Non-relational: relies on Array datatype or serialized string format
  • Like nested set, but with real/float/decimal so that the encoding isn't volatile (inexpensive move/insert/delete)
  • Has real/float/decimal representation/precision issues
  • Matrix encoding variant adds ancestor encoding (materialized path) for "free", but with the added trickiness of linear algebra.
  • General summary
  • 2008 offers HierarchyId data type that appears to help with the Lineage Column approach and expand the depth that can be represented.
  • Uses separate join table with: ancestor, descendant, depth (optional)
  • Cheap ancestry and descendants
  • Writes costs O(log n) (size of subtree) for insert, updates, deletes
  • Normalized encoding: good for RDBMS statistics & query planner in joins
  • Requires multiple rows per node
  • Column: lineage (e.g. /parent/child/grandchild/etc...)
  • Cheap descendants via prefix query (e.g. LEFT(lineage, #) = '/enumerated/path')
  • Writes costs O(log n) (size of subtree) for insert, updates, deletes
  • Non-relational: relies on Array datatype or serialized string format
  • Like nested set, but with real/float/decimal so that the encoding isn't volatile (inexpensive move/insert/delete)
  • Has real/float/decimal representation/precision issues
  • Matrix encoding variant adds ancestor encoding (materialized path) for "free", but with added trickiness of linear algebra.
  • General summary
  • 2008 offers HierarchyId data type appears to help with Lineage Column approach and expand the depth that can be represented.
  • Uses separate join table with ancestor, descendant, depth (optional)
  • Cheap ancestry and descendants
  • Writes costs O(log n) (size of the subtree) for insert, updates, deletes
  • Normalized encoding: good for RDBMS statistics & query planner in joins
  • Requires multiple rows per node
  • Column: lineage (e.g. /parent/child/grandchild/etc...)
  • Cheap descendants via prefix query (e.g. LEFT(lineage, #) = '/enumerated/path')
  • Writes costs O(log n) (size of the subtree) for insert, updates, deletes
  • Non-relational: relies on Array datatype or serialized string format
  • Like nested set, but with real/float/decimal so that the encoding isn't volatile (inexpensive move/insert/delete)
  • Has real/float/decimal representation/precision issues
  • Matrix encoding variant adds ancestor encoding (materialized path) for "free", but with the added trickiness of linear algebra.
  • General summary
  • 2008 offers HierarchyId data type that appears to help with the Lineage Column approach and expand the depth that can be represented.
Post Reopened by redcalx, рüффп, The fourth bird
Post Closed as "Needs more focus" by Robert Columbia, Adriaan, Machavity
edited body
Source Link
laike9m
  • 18.9k
  • 20
  • 110
  • 146
Loading
Question Protected by eyllanesc
"Complex matrix" is a very specific thing in math, and this could throw math people for a slight loop.
Source Link
Loading
Post Reopened by orangepips, Andrei Sfat, Tanktalus, Vinay, georgeawg
update some broken links
Source Link
ruvim
  • 7.9k
  • 2
  • 30
  • 40
Loading
Cleaned up and normalized descriptions a bit
Source Link
Kache
  • 16.1k
  • 13
  • 56
  • 81
Loading
Post Closed as "Needs more focus" by Martijn Pieters
improved syntax
Source Link
Farzad Karimi
  • 770
  • 1
  • 13
  • 32
Loading
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot
Loading
added 59 characters in body
Source Link
Kache
  • 16.1k
  • 13
  • 56
  • 81
Loading
Add Nested Interval detail
Source Link
Kache
  • 16.1k
  • 13
  • 56
  • 81
Loading
Changed to sentence casing for the title.
Source Link
Peter Mortensen
  • 31.1k
  • 22
  • 109
  • 132
Loading
Fixed Broken Link
Source Link
Jonathan H
  • 7.8k
  • 5
  • 49
  • 83
Loading
I wonder why this simple design was not considered yet. We are using it for more than 10 years with a great success. Simple and efficient if you are satisfied with the limits.
Source Link
Tomas
  • 58.5k
  • 53
  • 244
  • 378
Loading
Update SQL Tables for Smarties link to latest edition
Source Link
Loading
Use the same terminology across the post
Source Link
Gili
  • 88.1k
  • 101
  • 400
  • 706
Loading
deleted 1 characters in body
Source Link
Tegiri Nenashi
  • 3.1k
  • 2
  • 19
  • 21
Loading
link-fix
Source Link
Paŭlo Ebermann
  • 74.1k
  • 20
  • 148
  • 212
Loading