On 22/02/12 19:01, Marcel Ferrante wrote:

We acctually created a oblivous triple table to store the statments like
this:

+----+---wp_posts---+-----------------------+
+-id-+---post_title---+---post_author---+
| 11  |   car             |   12                 |
| 14  |   fusca          |   32                 |
| 23  |   my fusca    |   43                 |


+----+---wp_images----+-----------------+
+-id-+---------title--------+-----url---------+
| 9   |  fusca photo1  | ../fusca1.jpg  |


+----+-wp_nodes-+-------------------------------------------------+-literal-+
+-id-+---wp_id-----+-----value-------------------------------------+---------+
| 1  |    11    | posts                                                | 0 |
| 2  |    14    | posts                       | 0 |
| 3  |    23    | posts                       | 0 |
| 4  |    9      | images               | 0 |
| 5  |            | http://purl.org/dc/terms/creator            | 0 |
| 6  |            | http://www.w3.org/2000/01/rdf-schema#subClassOf   | 0 |
| 7  |            | http://www.w3.org/1999/02/22-rdf-syntax-ns#type      |
0 |
| 8  |            | has_photo         | 0 |
| 9  |   | mileage             | 0 |
| 10 |           | 1981     | 1 |
| 11 |    43    | users     | 0 |

when wp_id not null, then value is a wordpress resource (table or
table-field)
when literal equal 1, then value is literal

+----+--wp_spo---+-----+
+-id-+--s--+--p---+--o--+
| 1   |  2   |  6    | 1    |
| 1   |  3   |  7    | 2    |
| 1   |  3   |  5    | 11  |
| 1   |  3   |  8    | 4    |
| 1   |  3   |  9    | 10  |

I don't think I understand this -

2 6 1 seems to be   posts subclassof  posts

but shouldn't it be the same S and O id?

3 7 2 seems to be   posts rdf:type  posts
3 9 10 seems to be   posts mileage 19811

so I guess I haven't guessed the foreign key relationships correctly.

(it got rather damaged by email as well)

        Andy

Reply via email to