Re: recursive search

From: J.O. Aho <user_at_example.net>
Date: Mon, 12 Sep 2016 07:07:32 +0200
Message-ID: <e3mrgkFglj1U1_at_mid.individual.net>


[Quoted] On 09/12/2016 05:27 AM, mireero wrote:
> On 09/11/2016 04:38 AM, Thomas 'PointedEars' Lahn wrote:

>> mireero wrote:
>> ^^^^^^^
>> Your real name belongs there.

>
> Why ?

[Quoted] Don't bother, he is like that.

> I had a look at MariaDB's oqgraph, well kind of fascinating, very
> different from my way of thinking databases. Any good tutorial ?

[Quoted] you find the official documentation and example at https://openquery.com.au/graph/doc

look at the 'Walking the Tree of Life in simple SQL' as it will have more similarity to your query.

Keep in mind, I don't use oqgraph myself, I tend to use neo4j when I need a graph database, this one has a different language to query.

> Other major differences between MySQL and MariaDB (you don't really have
> to answer that, I'll google it...) ?

At this point there ain't any major differences, but with time there will be.

> Non standard MySQL stuff like "insert ignore" supported in MariaDB ?

MariaDB is a fork of mySQL and they do backport new features that appears in mySQL.

> - I don't yet see how I could use oqgraph (I haven't read enough about
> if though), but if I understand the different answers, it's not really
> suited for my situation.

The thing the "different" answers come to a conclusion was that oqgraph is not a replacement for recursive procedures (and no one did claim that either), it's an alternative and graph databases are just faster for this kind of queries.

> - If I do manage to do it the procedural way, what about performance ? I
> mean compared to adding a PHP layer ?

As a nested for-loop. Depends a bit on which layer has most processing power, but in the end it may be faster in the application layer, unless you use a database engine which is more suited for the task.

PS. These summary replies are quite bad, you may have people that don't read the reply as it's looks to be a reply to a person which they may have on their kill list. It's difficult to see what you are replying to.

-- 

 //Aho
Received on Mon Sep 12 2016 - 07:07:32 CEST

Original text of this message