Discussion in 'OT Technology' started by Peyomp, Sep 3, 2008.
Really great series of articles.
Aside from PostgreSQL sucking balls. Just a really horrible SQL engine...
Who gives a shit what database system you like? You piece of shit, click the article it would work on anything! You think I like PHP? The language is not relevant.
Don't shit on my thread.
Nice read, not sure how much i like the nLeft / nRight having to be updated manually if you insert into the tree but for an established tree its pretty pimp
The idea being that you view the tree much more than you update it, so do the work as you update, then it is optimized for viewing.
Step away from the computer and get some fresh air. No one should be this upset over an indexing vs recursion method of retrieving data.
I'm not pissed about that. I'm pissed that you reduced this cool link post to a brand war, just like every other piece of shit thread in this forum.
But yes, I am going to surf hurricane swell now.
Actually, I didn't reduce it to that. I read it the first time, and it was an interesting method. But PostgreSQL IS a horrible piece of shit. And that's why I said, "ASIDE from PostgreSQL sucking balls"
And here we go again
Cool article linked, some people get sand in their pussies and now the thread is headed towards drivel
I like Postgres, and it does the job he's doing just fine. I usually use MySQL but have no problem working with postgres. It is much more feature rich.
Anyway, PHP is a piece of shit... but he's using OO PHP, so I can't even complain there.
The whole article struck me as wrong at first, but it really does make sense to do most of your display computation when you edit, since you probably edit less than you display.
The DBAdmin screams no, the web dev screams yay!
Maybe it is my limited experience with it, but I really don't like it considering there are better and just as free alternatives (MySQL and SQL Express to name a couple). From an enterprise point of view, it just sucks - besides anything that has a Vacuum function in it, has to be for women and the
Yeah... you haven't actually criticized it in any real way, so I'm gonna go with 'I wasn't familiar with it so it frustrated me' for $500, bob.
welcome to CSC-220 data structures and algorithms...
They cover implementing this in SQL?
Didn't think so, plz drive through n00b
I came here to say that.
Wouldn't be all that hard to put it into the database once you know your data structure. The most annoying part would be keeping it up to date and re-generated if you have a lot of content continuously added to the list.
I remember creating bi-directional circular linked lists in LISP. It was just as fun as writing frogger in ASM using ARROW ASM.
We've used a N-Level nested tree used for a sitemap, which works great if you only pull 2 or 3 tiers and slowly drill down, but try generating all the tiers for over 2 million unique pages of content... The job takes almost 2 hours to complete. I blame the DBA (and the developer), the DBA blames the developer. I just keep clear from that monstrosity.
No, how about the database ballooned to twice the size because it couldn't manage deleted records properly and I had to "Vacuum" it. Or how bout it's not supported by real backup software? But I'm sure it's fine for little dev projects.
I'll admit that I don't administer it, but my use of postgres is not a little dev project. Its a ginormous video site with 10s of thousands of users. They moved from MySQL.
<50's PSA narrator voice>
Ah, we see here that Billy has hurt Tommy's feelings with his harsh response. Surely there's a way for Billy to let Tommy know what he thinks without making him upset. Let's try that again.
"Yeah, that's a good idea Tommy, but I think it would be even better if you tried it in MySQL instead of PostgreSQL."
See, that's much better. All Billy had to do was think about how his words might sound to Tommy, and be careful to say what he thinks without making Tommy feel bad for thinking differently; he pointed out the good parts of Tommy's idea and suggested ways to fix the bad parts, instead of just pointing out the bad parts. We call this constructive criticism, and it's a great way to tell other people how they can do things better instead of making them feel bad for not being perfect the first time.
Everyone disagrees with other people from time to time, and it's important to know how to handle disagreements productively. As you can see, it wasn't very hard for Billy to practice constructive criticism while talking to Tommy, he just had to stop and think for a moment. I'm sure you can take this example and apply it to your own life. With a little care and a friendly smile, you too can make friends and influence people!
i took that. unfortunately my teacher was iranian and spoke poor english. unfortunately i have him again for advanced database theory, looks like i'll be reading the book a lot.
<Jolly>Go suck a dick</Jolly>
I wouldn't have taken the time to type all that shit out if it didn't apply. I guess most people here actually manage to hold down jobs, but unless they intentionally try to be assholes online, probably half the population of C&P have all the social grace of sharp pointy rocks.
I kinda like duex's post.
Aside from it being from deus, and the post itself, so do I.
I think this approach is fine but what I prefer is storing the parent / child data, and then just reading the hierarchy into memory. That way the database data is kept very simple, and any querying and manipulation can be done in memory with whatever optimized structure that suits. Persisting any changes to the database don't involve a rebuild of the data in the database.
e.g. database data is like:
NodeID, ParentNodeID, Name, SiblingOrder etc
All of the table data is fetched with a single SELECT and could be loaded into an object implementing something like the algorithm in the article.
The problem with that, whup, is what if you have a billion nodes in a million-level tree, each storing several megabytes of data? You're not gonna store that shit in memory, so you need to have a way to search it straight from primary storage. That's the whole point of even doing it in a database.
I think I'd rather choose a database that implements its own internal tree structure, though, instead of trying to make it work manually.