Re: Database schema advice

Hi Max,

   Here's my shot.

> 1.  Each subject can have a URI and might be an instance of one or
> more rdfs:Class's or subclasses.

Every subject, property, and many objects are resources. These can be  
anonymous or named by a URI. (The other objects are literals.  
Literals cannot be the subject of statements.)

Resources can be related to classes (which are also resources) by  
rdf:type relations. Classes operate like sets, not like mainstream OO  
classes.

rdfs:Class and owl:Class are the types of resources that play the  
roles of these classes; that is to say, in simple terms, rdf:type has  
range rdfs:Class and domain rdf:Resource.

Classes can be interrelated with rdfs:subClassOf properties, which  
allows you to infer additional class memberships:

x rdf:type classA .
classA rdfs:subClassOf classB .
=>
x rdf:type classB .

> 2.  Each property might be an instance of a single rdf:Property or  
> subproperty.

All properties are necessarily of type Property. Properties can be  
subPropertyOf other Properties.

> 3.  The domain and range of a property (which restrict the subject and
> object respectively)

"Restrict" is misleading terminology. If

   ex:age rdfs:domain foaf:Person .

and

   ex:john ex:age "25" .

then ex:john is inferred to be of type foaf:Person. If we previously  
assert that ex:john is of type ex:NotAPerson, and ex:NotAPerson is  
disjoint with foaf:Person, then saying that John is 25 produces an  
inconsistent set of statements. RDF does not prevent you from saying  
that John is 25.

RDFS and OWL support inference, they do not restrict assertion. (The  
inference may tell you which statements conflict and why, of course.)

> can specify a rdfs:Class or subclass one hopes
> the actual subject or object (or even object typed literal) actually
> is
>
> 4.  A subject and object don't need to specify their type.

Correct. Types may be missing, asserted, or inferred. They are not  
magic.

> 5.  The way to specify an object type is to make it the subject of
> another statement, or else use the rdf:Datatype when using an typed
> literal.

Datatypes are a little different to the usual meaning of "type" wrt  
RDF. "type" usually refers to the classes to which a resource belongs.

> 6.  Statements form a directed graph with no loops.

How do you mean "no loops"? The following are valid RDF statements:

ex:john foaf:knows ex:john .

ex:john foaf:knows ex:tim .
ex:tim foaf:knows ex:john .

They do form a directed graph, though.

HTH,

-R

Received on Monday, 14 August 2006 06:37:16 UTC