Code Monkey home page Code Monkey logo

Comments (3)

SiCoUK avatar SiCoUK commented on July 23, 2024

Nested Sets are generally for hierarchical data like categories. If you don't need your tags to be hierarchical, then Nested Sets are probably over kill.

If you do need to get the data in it's hierarchical fashion (as a tree for categories for example) then nested sets (in my opinion) are the best way to go. Especially if the hard work is done as it is with this project.

There are easier ways to manage tags owned by different organisations as long as you don't need them to have parents or children. Look up Many to Many relationships (http://laravel.com/docs/eloquent#many-to-many) using a pivot table.

from baum.

etrepat avatar etrepat commented on July 23, 2024

@SiCoUK answered your question pretty well here.

A nested set implementation is usually pretty fast when querying hierarchy chains (ascendants, descendants), and slow when performing inserts/updates because of the index bounds re-computation. So, NestedSet structures are good when your use-case requires hierarchical structures which are queried far more often than modified (inserted/updated).

Also as @SiCoUK said, if your tag data implementation does not need to be hierarchical there's no need to use a nested set structure for that.

from baum.

etrepat avatar etrepat commented on July 23, 2024

I think your question has been answered so I'm closing this issue for now. Please, feel free to reopen or open a new issue if you've got more questions.

from baum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.