Re: [Semediawiki-user] Guidelines for "knowledge modelling" in SMW?

Rob Challen wrote:
> The need
> for a human readable primary key as the page name is a bit of an issue,
You could always use something like Table_Name/Primary_Key_ID as the
page name. But SMW makes statements about pages, and your pages would
be saying "Author/59666 has name William Gibson, and has nationality
Canada". It works, but not very wiki like ;-)
It's as if the less normalized the database structure is, the better it
fits. Wikis have the enormous advantage that they assume a human being
is following the links that loosely couple pages, so the object of a
relation can be a disambiguation page or can say "For other persons
named William Gibson, see _William Gibson (disambiguation)_" and ad hoc
create "William Gibson (martyr)", "William Gibson (NAACP)", etc.
--
=S Page

We've done a loader for BiomedGT and the ICD-11 editor that transforms
XML into wiki template pages. We'd be glad to demo it in the FTF if
anyone will be there...
Harold Solbrig | Division of Biomedical Statistics and Informatics |
507-293-3774 | solbrig.harold@...
________________________________
From: semediawiki-user-bounces@...
[mailto:semediawiki-user-bounces@...] On Behalf Of Rob
Challen
Sent: Friday, November 21, 2008 5:15 AM
To: semediawiki-user@...
Subject: Re: [Semediawiki-user] Guidelines for "knowledge modelling" in
SMW?
Related to this I developed some very simple XSLT for translating a set
of spreadsheet tabs into wiki pages with the content in templates - one
row per page, with the first row being the template name, and the page
title being the spreadsheet tab name + first column. This creates a
mediawiki import/export XML file that you can import through a special
page import.
I only hacked it together to work with open office flat XML spreadsheet
files (.fods) but the same principle could be applied to any tabular
structure represented in XML (and maybe more - I have vague plans for a
freemind / tiddlywiki / mediawiki special page interoperability at a
template level - not available anytime soon I'm afraid :-) ).
A word of warning. This will overwrite current content without warning
if there is a naming collision.... - you can roll it back at a
individual page level of course but that might be a bit of a pain if you
import a lot.
Theoretically you could export a database to a collection of wiki pages
via a spreadsheet and then edit the templates to assign some semantics
properties. I'm not sure how well it would work in practice. The need
for a human readable primary key as the page name is a bit of an issue,
and I can't see how key constraints would work in SMW.
Date: Fri, 21 Nov 2008 00:16:05 -0500
From: "Yaron Koren" <yaron57@...>
Subject: Re: [Semediawiki-user] Guidelines for "knowledge
modelling"
in SMW?
To: "Tempich, Christoph, Dr." <Christoph.Tempich@...>
Cc: semediawiki-user@...
Message-ID:
<55dbda5c0811202116i5db258d1v7bc070e3fec57fa7@...>
Content-Type: text/plain; charset="iso-8859-1"
This is a very interesting discussion. If there already is code
for turning
XML into wiki pages with template calls, I'd like to see it;
I've actually
been planning to add such functionality into the Data Transfer
extension (
http://www.mediawiki.org/wiki/Extension:Data_Transfer).
Currently that
extension only does the conversion in the other direction -
template calls
into XML.
-Yaron
On Thu, Nov 20, 2008 at 5:22 PM, Tempich, Christoph, Dr. <
Christoph.Tempich@...> wrote:
> Hi Dan,
>
> I hope I can answer some of your questions.
>
>
> : "By analogy to database terminology, a Property is a column
and a Type is
> the column's datatype. To extend the analogy, a page in the
wiki, containing
> various pieces of data (Property/Value instances), is like a
row of an
> ad-hock table or query. The page name is therefore the row id
in the
> 'table'."
>
> You are basically right.
> A property is a column in a database, or an association in UML
(if it links
> to another class) or an attribute in UML if it links to a
Basic Type.
>
> A page is an instance of a class, or a row in data base table.
Be careful
> with the Ids. Links between pages are based on page names. In
contrast to
> IDs in a data base page names should be meaningful. So,
instead of linking
> to IDs, you should link to proper names.
>
> We have a further similarity to data bases.
> Class names in UML or Table names are Categories. As Semantic
MediaWiki
> supports subsumption reasoning you can build class
hierarchies, which would
> be more difficult in a data base.
>
> Following the above line of reasoning (based purely on my
attempt to
> understand SMW in terms that I am familiar with), I would
create one page
> for each unique instance of each tables primary key, and add
text describing
> the values of the properties (columns) of each relevant table
to that page.
>
> I did this ones, but I used the template feature and than
added the
> semantics in the template.
>
> Assuming you have three database tables
> 1. Books (BookId, Title, AuthorId, TopicId)
> 2. Author (AuthorId, Author name)
> 3. Topic (TopicId, Topic, SuperTopic)
>
> You should generate wiki pages for each row, which look like
>
> {{Book
> |Title=some Title
> |Author= some Author
> |Topic = some Topic
> }}
> resulting in semantics like
> PAGENAME = some Title
> [[title::some Title]] (Property:title hasType::String)
> [[Author::some Author]] (Property:Author hasType::PAGE)
> [[Category:Topic]]
> [[Category:Book]]
>
> {{Author
> |name=some Author}}
> semantics
> PAGENAME = some Author
> [[name::some Author]] (Property:name hasType::String)
> [[Category:Author]]
>
>
> {{Topic
> |name = some Topic
> |superTopic=some superTopic}}
> semantics
> PAGENAME = Category:some Topic
> [[Category:some superTopic]]
>
>
> For example, is it possible to import XML object models and
populate SMW
> with the underlying data?
>
> Yes, we used XML as source format. I can have a look if I can
get hold of
> the code.
>
> Christoph
>
>
> -----Urspr?ngliche Nachricht-----
> Von: Dan Bolser [mailto:dan.bolser@...]
> Gesendet: Donnerstag, 20. November 2008 18:48
> An: semediawiki-user@...
> Betreff: [Semediawiki-user] Guidelines for "knowledge
modelling" in SMW?
>
> Hi all,
>
> I have been reading through the user manual and the list
archives to try to
> get up to speed with SMW (hopefully I can soon spend some time
working on a
> SMW site for work). The manual seems to start off by assuming
that the
> purpose of SMW is to give structure to the data in existing WP
style
> articles (which is a nice way to start), but then starts to
deal with topics
> that go beyond this simple idea. In particular I'm thinking of
this page:
>
>
http://www.semantic-mediawiki.org/wiki/Help:Properties_and_types
>
>
> and the section beginning "Properties with multiple types".
This section
> starts to get into the details of data modelling (or knowledge
> modelling) within SMW.
>
> For me, the most interesting application of SMW is storing
existing sets of
> structured data. For example, I could easily imagine the
following
> (super)use-case: "Take a normalized MySQL database x and
'dump' it into SMW.
> Refine data types. Add additional ad-hock annotations.
Implement queries
> ...".
>
> The part I am interested in is the first part, i.e. how to
effectively
> 'dump' an existing relational database into SMW. My current
view of SMW
> (coming from a relational, not a semantic background), is
roughly
> : "By analogy to database terminology, a Property is a column
and a Type is
> the column's datatype. To extend the analogy, a page in the
wiki, containing
> various pieces of data (Property/Value instances), is like a
row of an
> ad-hock table or query. The page name is therefore the row id
in the
> 'table'."
>
> Following the above line of reasoning (based purely on my
attempt to
> understand SMW in terms that I am familiar with), I would
create one page
> for each unique instance of each tables primary key, and add
text describing
> the values of the properties (columns) of each relevant table
to that page.
>
> My question is this - is this a reasonable way to model data
in SMW? I
> suppose (clearly) there are other ways to 'model data' that
don't start from
> a relational database perspective. For example, is it possible
to import XML
> object models and populate SMW with the underlying data?
>
> Given a 'toy' situation to model, what guidelines could be
given about how
> to implement the model in SMW? Here I think an example would
be very
> informative. I.e. Design a 'SMW' database to describe a simple
software
> library system...
>
> Could such a worked 'knowledge modelling' or 'data modelling'
example be
> added to the user manual? I would try, but where do I get a
login from?
>
>
> Thanks for any comments on any of the above, I think a general
set of
> modelling guidelines could be really useful for beginners, and
a specific
> MySQL to SMW mapping would be invaluable for lots of people
wanting to
> explore the possibilities.
>
> Sorry if I missed the relevant manual pages or mailing list
posts.
>
> All the best,
> Dan.
>
>
> --
> http://network.nature.com/profile/dan
>
>
------------------------------------------------------------------------
-
> This SF.Net email is sponsored by the Moblin Your Move
Developer's
> challenge Build the coolest Linux based applications with
Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source
event anywhere
> in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Semediawiki-user mailing list
> Semediawiki-user@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
>
------------------------------------------------------------------------
-
> This SF.Net email is sponsored by the Moblin Your Move
Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK &
win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere
in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Semediawiki-user mailing list
> Semediawiki-user@...
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move
Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win
great prizes
Grand prize is a trip for two to an Open Source event anywhere
in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------
_______________________________________________
Semediawiki-user mailing list
Semediawiki-user@...
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
End of Semediawiki-user Digest, Vol 30, Issue 14
************************************************

Rob Challen wrote:
> The need
> for a human readable primary key as the page name is a bit of an issue,
You could always use something like Table_Name/Primary_Key_ID as the
page name. But SMW makes statements about pages, and your pages would
be saying "Author/59666 has name William Gibson, and has nationality
Canada". It works, but not very wiki like ;-)
It's as if the less normalized the database structure is, the better it
fits. Wikis have the enormous advantage that they assume a human being
is following the links that loosely couple pages, so the object of a
relation can be a disambiguation page or can say "For other persons
named William Gibson, see _William Gibson (disambiguation)_" and ad hoc
create "William Gibson (martyr)", "William Gibson (NAACP)", etc.
--
=S Page