Hi Dan,

In answer to your questions:

- connecting one "object" to one another is not that complex - that's what properties of type "Page" (or what used to be known as "relations") are for. If you create a new property, "Has car" or "Owns car", and make it of type Page, you can then add in such properties in the page for Dave, for each car he owns. If you then want to get complex data like the valves in a car owned by someone, you need sub-queries - see the email exchange from yesterday.

- yes, templates are the way to define a "class structure". The benefits of using templates are numerous - they define the kind of data that belongs in each page of a certain type, they separate the data from the display, and if you wanted to, you could even set up forms adding and editing such data - see http://www.mediawiki.org/wiki/Extension:Semantic_Forms, for instance. :)

- the help pages should definitely be updated to reflect SMW 1.0 . Feel free to take the initiative to do that - be bold, as they say. I would think, ideally, each help page should have information on both SMW 0.7 and 1.0, since many existing sites will still be using 0.7 for the foreseeable future.

-Yaron


On 10/25/07, Dan Bolser < dan.bolser@gmail.com> wrote:
Hi,

I have read up on the SMW 1.0 annotation syntax, but I have a question
about data modelling that I can't seem to answer off the top of my
head. Below I will give an example of the kind of entity-relationship
that I would like to capture, and I would be grateful if you could a)
let me know if such a data-model is possible, b) where are the
documents I need to read to understand this, or c) how do I do it
exactly :-)

Lets say I have a wiki about cars, each 'CarPage' having various
valued attributes associated, such as (I think) [[valves::6]], [[horse
power::100]], [[color::red]], etc. Each of those properties has the
appropriate data type assigned on the appropriate Property: pages.
i.e . the Property:Valves [[has type:number]] and the Property:Color
[[has type:color]].

Now, along comes 'Collector' Dave, who has a collection of cars. How
can I edit Dave's page to specify that he *has* several CarPage
'objects' of type car?

i.e. how do I induce and use complex objects and complex datatypes?

I would like to do this mainly because it fits my concepts over the
data (my data model) and so that I can answer obtuse questions like -
Which collector has the car with the most valves?

I noticed that I can add the attribute [[has type:car]] to a page, but
can I define (or do I need to define) the kinds of attributes that
pages of type car are expected to have? Would this be done through a
template for all 'objects of type car'?

I guess you can see that I am a little bit confused!


Thanks for your help, and sorry for my ignorance!

Dan.



P.S. this page; http://ontoworld.org/wiki/Help:Annotation seems to
sometimes use the terms 'relation' and 'attribute' 'when I think
'property' would be better. Is there any reason I shouldn't fix that,
or is 'relation' / 'attribute' used on that page to mean something
distinct from 'property'? I guess that mostly this is a legacy issue.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-user