The many-to-many relationship is easily handled by "edges" table here:

https://gist.github.com/vivainio/1493084

The "edges" approach would work for arbitrary graphs as well, but it can
fully represent the Leo DAG.

The only sensible (i.e. performant) way to use it in production code would
be to slurp in the whole "edges" table and create in-memory representation
out of it. Any lazy loading should happen with text bodies.




On Mon, Mar 25, 2013 at 9:15 PM, David McNab <[email protected]> wrote:

> There is a many-to-many related join between nodes and their parents. It
> would simply be parent as a foreign key, except that Leo supports cloned
> nodes.
>
>
> On Tue, Mar 26, 2013 at 7:26 AM, Ville M. Vainio <[email protected]>wrote:
>
>> SQLAlchemy is too big of a dependency for the trivial queries that are
>> needed to model leo documents in sql. There are no complex joins or
>> anything like that.
>>
>> There is also very little need to revisit the db accessing code once it's
>> been written.
>>
>>
>> On Mon, Mar 25, 2013 at 5:48 PM, Jacob Peck <[email protected]> wrote:
>>
>>> On 3/25/2013 11:42 AM, Don Dwiggins wrote:
>>>
>>>>  If you're going to use a DB, take a look at SQLAlchemy, particularly
>>>> the ORM layer.  You could achieve a level of independence from a particular
>>>> DBMS, and might find it useful to have an object model.
>>>>
>>>>  I second this recommendation.  Having recently worked on a project
>>> using SQLAlchemy, I have to say it's fairly simple to add SQLA's ORM to any
>>> old Python class.  Trivial in most cases, even.
>>> -->Jake
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "leo-editor" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to 
>>> leo-editor+unsubscribe@**googlegroups.com<leo-editor%[email protected]>
>>> .
>>> To post to this group, send email to [email protected].
>>> Visit this group at 
>>> http://groups.google.com/**group/leo-editor?hl=en<http://groups.google.com/group/leo-editor?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/leo-editor?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/leo-editor?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to