[wp-hackers] alternative taxonomy to relate users to pages

Aram aram.bv at gmail.com
Wed Feb 10 13:29:04 UTC 2010


ok.. i see :)

On Wed, Feb 10, 2010 at 5:16 PM, scribu <scribu at gmail.com> wrote:

> On Wed, Feb 10, 2010 at 1:48 PM, <anybody at nobodyhere.com> wrote:
>
> > After reading Murray Woodman
> > (http://murraywoodman.com/355/wordpress-taxonomies) I'm considering the
> > following mysql table structure:
> >
> > RELATIONS
> > - id
> > - subject_id
> > - subject_type (user/page/post/comment)
> > - predicate_id
> > - object_id
> > - object_type
> >
> > PREDICATES
> > - id
> > - title (e.g. "is part of", "likes")
> > - slug (e.g. "part_of", "likes")
> >
> > Any suggestions?
> >
>
>
> I think having a separate predicates table is a bit overkill.  I would
> replace it with a single column in the RELATIONS table:
>
> RELATIONS
> - id
> - subject_id
> - subject_type
> - predicate (e.g. "is_part_of", "likes")
> - object_id
> - object_type
>
> You could also add an optional "date" column, to record when a relationship
> was formed.
>
>
> isn't it possible to do by custom fields?
>
>
> Not if you want many-to-many relationships.
>
>
> --
> http://scribu.net
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list