# |
May 25th 2016, 12:11 |
ionas |
enjoy your lunch |
# |
May 25th 2016, 12:11 |
ionas |
hehe |
# |
May 25th 2016, 12:09 |
hmic |
exactly like that |
# |
May 25th 2016, 12:09 |
hmic |
composite keys are a thing on its own |
# |
May 25th 2016, 12:09 |
hmic |
you dont need composite keys for storing multiple trees in a table |
# |
May 25th 2016, 12:09 |
ionas |
I should have just created one root node per â??foreign keyâ? |
# |
May 25th 2016, 12:09 |
ionas |
well basically composite primary key and storing multiple trees in one table |
# |
May 25th 2016, 12:09 |
hmic |
you might have had, if not/misunderstandings happened or you screwed your data beause of manual interactions, sure |
# |
May 25th 2016, 12:08 |
hmic |
tell about them |
# |
May 25th 2016, 12:08 |
ionas |
I had bad xp with nested sets - you did not? |
# |
May 25th 2016, 12:08 |
ionas |
hehe |
# |
May 25th 2016, 12:08 |
ionas |
(stroke reading) |
# |
May 25th 2016, 12:08 |
hmic |
i can help you on insert performance on large trees, if you need to |
# |
May 25th 2016, 12:08 |
ionas |
hmic huh when I move parts of the table only those parts are affected in terms of reading and writing |
# |
May 25th 2016, 12:07 |
hmic |
if you have a show stopper with it, lets talk about it! |
# |
May 25th 2016, 12:07 |
hmic |
my 5ct on the topic: if you can go with a nested set and use tree behavior, by all menas do so! |
# |
May 25th 2016, 12:07 |
hmic |
ionas, your materialized path is nothing but a written down nodelist, that is a nested set still! |
# |
May 25th 2016, 12:06 |
ionas |
I ll take a harder look at https://www.postgresql.org/docs/current/static/ltree.html hmic and in case it takes too long just opt for build in treebehavior |
# |
May 25th 2016, 12:05 |
lampsBR |
bernat1: It works! Thanks dude |
# |
May 25th 2016, 12:04 |
jippi |
ionas: sorry, you are welcome to come to Denmark and visit :p |
# |
May 25th 2016, 12:04 |
ionas |
hmic: its implemeted fast because tree behavior ships OOB |
# |
May 25th 2016, 12:04 |
ionas |
jippi thats great too doesnt make it any better that you are not there :p |
# |
May 25th 2016, 12:04 |
hmic |
ionas, yes, it is. it works quite well, its not write-optimized but could probably be implemented fast |
# |
May 25th 2016, 12:04 |
lampsBR |
bernat1, I'll try right now ;] |
# |
May 25th 2016, 12:04 |
hmic |
no no no. you are talking about sql, so using the database to get your things done, dont know of materialized path, but the others are not cutting it |
# |
May 25th 2016, 12:03 |
bernat1 |
lampsBR: try with $lol->modify('last monday'); |
# |
May 25th 2016, 12:03 |
ionas |
the tree behavior is nested set |
# |
May 25th 2016, 12:03 |
hmic |
there exist solutions to speed that up too, quite a bit acutally |
# |
May 25th 2016, 12:02 |
ionas |
hmic there are adjacency lists, nested sets, closure table, fertile forest, nested interval (donâ??t know), materialized path on ids, materialized path on real labels etc |
# |
May 25th 2016, 12:02 |
hmic |
the only thing that speaks against it is updating (inserting specifically) into a big tree all the time, which is seldomly the case |
# |
May 25th 2016, 12:02 |
lampsBR |
Hi guys! How can I set a cake.i18n.date to past monday? I'm using cakephp 3.2. I'm trying $lol = new Date(); $lol->modify('past monday'); but this way I get an error message |
# |
May 25th 2016, 12:02 |
jippi |
ionas: haha, no, not quite :p but josé will still be there :D |
# |
May 25th 2016, 12:01 |
hmic |
ionas, that specific question and given sql, i'd go nested set, *ever* |
# |
May 25th 2016, 12:01 |
ionas |
jippi what the fuck!! got pregnant? |
# |
May 25th 2016, 12:01 |
ionas |
hmic: nested sets? I only had bad experiences |
# |
May 25th 2016, 12:01 |
hmic |
but if neccessary there are 2 solutions: adjacent lists and nested sets. if you are going more than a handfull levels deep, nested set only. |
# |
May 25th 2016, 12:01 |
jippi |
ionas: i had to cancel last minute :\ |
# |
May 25th 2016, 12:01 |
ionas |
â?¦ for your commercial projects ;) when required to save tree structures (cakephp3) what do you do? |
# |
May 25th 2016, 12:01 |
hmic |
ionas, i dont like them really, there are other means than sql databases to store trees. |
# |
May 25th 2016, 12:01 |
ionas |
jippi looking forward to meet you too :) |
# |
May 25th 2016, 12:00 |
jippi |
@neothermic: feel free to do so :) |