On 23/02/12 11:59, Marcel Ferrante wrote:
Hi Andy,

It`s me again ;)

So it is :-)



  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?


You are right ! Excluse-me. I miss the g column.

It's not the g col I'm pointing out - you seem to have two "posts" with different ids. That's going to get confusing (i.e. wrong) in RDF.


+----+--wp_spo----------+-----+
+-id-+--g--+--s--+--p---+--o--+
| 1   |   1   |   2  |  6    | 1    |
| 2   |   1   | 13   |  7    | 2    |
| 3   |   1   | 13   |  5    | 11  |

And we could include hash and lang in wp_nodes table:

+----+-wp_nodes-+-------------------+----------+---------+--hash--+
+-id-+--wp_id--+----value-----------+-literal-+--lang--+--hash--+
| 1   |    11      | posts               | 0         |    1     |  23423 +
| 2   |    14      | posts        | 0          |    1     | 54523 +



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.

The second triple means:

<rdf:description about=" http://www.sellcars.com.br/wp#my-fusca";>
  <mileage>19811</mileage>
</rdf:description>

The wp_nodes is a bridge to wordpress resources: wp_id is the id of the
original table.
In wp_nodes we store all: wp resources, external resources and literals...

Doubt: is better (for performance) separate in two different tables (like
wp_resources and wp_literals) ?

Probably makes no difference. If you do split them, it is more complicated as you have to know which id refers to which tables. id=789 maybe a literal or a URI and to find it you may end up looking in both.

        Andy


Thanks
Marcel


Reply via email to