Re: Two same type object in the same table
On Fri, Aug 20, 2010 at 8:13 PM, toki <skyrocket100@gmail.com> wrote:
> Here is the context:
> I want to store theorems objects in my database.
> A theorem as many sons and many fathers.
> So it's a graph and not a simple tree.
>
> I can't create a table like (id, theorem_id, theorem_id) : this
> syntaxe is forbidden
>
> An ugly solution : (id, parentid, theorem_id), with added code in
> controllers
>
> Do you see a better way todo ? Can cakephp do such things ?
>
I think what you're dealing with is a "directed acyclic graph". Have a
look at this article: "A Model to Represent Directed Acyclic Graphs
(DAG) on SQL Databases":
http://www.codeproject.com/KB/database/Modeling_DAGs_on_SQL_DBs.aspx
It's been awhile for me since I thought about these, and I haven't
attempted to use this with Cake. But I think that article might help
you come up with a solution. If all works out, please consider posting
something at the Bakery.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home