Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

classic Classic list List threaded Threaded
8 messages Options
SG
Reply | Threaded
Open this post in threaded view
|

Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

SG
Hello,

Suppose we have two classes Customer and Complaint.
If the relation between Customer and Complaint is one to zero/many, what is
the correct way to do this in OWL/Protégé?
A Customer can have zero or more complaints.
A Complaint has to belong to one Customer.

Usually for one-to-many relationship I would use "some" (which means at
least one) in one direction and "exactly 1" in the other direction. (Unless
I'm doing it wrong)

In my original example where we say that a customer doesn't need to have a
complaint, my instinct says I need to use "min 0" like this:

Customer hasComplaint min 0 Complaint

and the inverse:
Complaint isComplaintOf exatcly 1 Customer

Is this correct? Or am I missing something fundamentally.

Thank you!

Cheers







--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Bohms, H.M. (Michel)
My idea...

0 to many is actually default in OWA (so 'unconstrained')
You can use allvaluesfrom Complaint to specify qualification to Complaint. (or equiv. via a qualified minCar 0)

Personally I use min 0 to indicate that the property is RELEVANT... so I constrain although formally not needed....
(this is sometimes a best practise, because tools can use the (unnecc.) constrained properties in their interface etc.)

When using shacl (CWA) this whole issue is gone.

Gr michel






 
Dr. ir. H.M. (Michel) Böhms
Senior Data Scientist

T +31888663107
M +31630381220
[hidden email]
Location

 

This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.







-----Oorspronkelijk bericht-----
Van: protege-user [mailto:[hidden email]] Namens SG
Verzonden: woensdag 13 december 2017 12:11
Aan: [hidden email]
Onderwerp: [protege-user] Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Hello,

Suppose we have two classes Customer and Complaint.
If the relation between Customer and Complaint is one to zero/many, what is the correct way to do this in OWL/Protégé?
A Customer can have zero or more complaints.
A Complaint has to belong to one Customer.

Usually for one-to-many relationship I would use "some" (which means at least one) in one direction and "exactly 1" in the other direction. (Unless I'm doing it wrong)

In my original example where we say that a customer doesn't need to have a complaint, my instinct says I need to use "min 0" like this:

Customer hasComplaint min 0 Complaint

and the inverse:
Complaint isComplaintOf exatcly 1 Customer

Is this correct? Or am I missing something fundamentally.

Thank you!

Cheers







--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
SG
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

SG
Thank you very much for taking time to answer.

Just so I understand correctly, there are 3 ways of defining the zero-many
relationship.

1) Don't add any Object Property
2)With the min cardinality:
Customer hasComplaint min 0 Complaint
3)With qualifiedCardinality
Customer hasComplaint AllValuesFrom Complaint

Are there any advantage for using AllValuesFrom over "min cardinality 0"?
I'm also leaning to the "min 0" but I'd like to know if I'm not missing some
extra info like the interesting thing you said about using tools.

Does it also help when using inference rules in SWRL or when using Sparql?
I also need to make a small application with Jena Feseki (but I still need
to  learn it)

So any advice is welcome if you think that it makes a difference for using
"min 0" over "AllValuesFrom"!

Greets!



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Lorenz Buehmann
The most crucial thing to understand is that OWL doesn't have the
concept of constraints compared to databases and it follows the Open
World Assumption. OWL axioms are used for inference only.



On 13.12.2017 18:00, SG wrote:
> Thank you very much for taking time to answer.
>
> Just so I understand correctly, there are 3 ways of defining the zero-many
> relationship.
>
> 1) Don't add any Object Property
Doesn't have any impact on standard OWL reasoning
> 2)With the min cardinality:
> Customer hasComplaint min 0 Complaint
Doesn't have any impact on standard OWL reasoning, but can at least be
used for "documentation" purposes maybe. Or some other kind of tool on
top of OWL might use this, .e.g a converter to a different language like
SHACL.
> 3)With qualifiedCardinality
> Customer hasComplaint AllValuesFrom Complaint
This at least ensures, that by inference, once there is such a a fact,
the object will be of type Complaint. Nothing more happens in OWL reasoning.
>
> Are there any advantage for using AllValuesFrom over "min cardinality 0"?
No, but there is a difference regarding OWL inference as explained
above. Anything else depends on how some other mechanism makes use of
those expressions.
> I'm also leaning to the "min 0" but I'd like to know if I'm not missing some
> extra info like the interesting thing you said about using tools.
>
> Does it also help when using inference rules in SWRL or when using Sparql?
Define "help" ... things are getting complicated when you're trying to
use complex OWL constructs in SPARQL.
SWRL is a rule engine that allows for variables which isn't the case in
OWLconstrjucts.
> I also need to make a small application with Jena Feseki (but I still need
> to  learn it)
>
> So any advice is welcome if you think that it makes a difference for using
> "min 0" over "AllValuesFrom"!
If you're using Jena, make sure that the underlying reasoner is able to
use whatever you add to the ontology.

>
> Greets!
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Bohms, H.M. (Michel)
In reply to this post by SG








-----Oorspronkelijk bericht-----
Van: protege-user [mailto:[hidden email]] Namens SG
Verzonden: woensdag 13 december 2017 18:00
Aan: [hidden email]
Onderwerp: Re: [protege-user] Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Thank you very much for taking time to answer.

Just so I understand correctly, there are 3 ways of defining the zero-many relationship.

1) Don't add any Object Property

>guess you always need the objectproperty!

2)With the min cardinality:
Customer hasComplaint min 0 Complaint

>go for 3 so qualified

3)With qualifiedCardinality
Customer hasComplaint AllValuesFrom Complaint

Al 2> allvaluesfrom restriction

>4) shacl

Are there any advantage for using AllValuesFrom over "min cardinality 0"?
I'm also leaning to the "min 0" but I'd like to know if I'm not missing some extra info like the interesting thing you said about using tools.

>allvaluesfrom corresp. To a QUALIFIED minCard 0 I think
>Think equivalent, but maybe other people think diff.



Does it also help when using inference rules in SWRL or when using Sparql?
I also need to make a small application with Jena Feseki (but I still need to  learn it)

>consider using shacl, great stuff...

So any advice is welcome if you think that it makes a difference for using "min 0" over "AllValuesFrom"!

Greets!



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. TNO accepts no liability for the content of this e-mail, for the manner in which you use it and for damage of any kind resulting from the risks inherent to the electronic transmission of messages.

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Igor Toujilov-2
In reply to this post by SG
My notations are in the Manchester syntax,
The following axiom has no impact on reasoning:
Class Customer: SubclassOf hasComplaint min 0 Complaint

The following axiom implies that if a customer has a complaint, then this complaint is an individual of Complaint:
Class Customer: SubclassOf hasComplaint only Complaint

Another possibility is defining a domain and range of the property:
ObjectProperty: hasComplaint
    Domain:  Customer
    Range: Complaint

In this case, any asserted or inferred triple “customer hasComplaint complaint” will imply:  customer is an instance of Customer, and  complaint is an instance of Complaint.

So, it is up to you what to prefer, based on requirements and features of your application.

Yes, those axioms will be working together with SWRL rules in Protégé 4/5. But if you use SPARQL, those axioms will be taken into consideration only when the SPARQL implementation supports entailments.

Cheers,
Igor


> Sent: Wednesday, December 13, 2017 at 5:00 PM
> From: SG <[hidden email]>
> To: [hidden email]
> Subject: Re: [protege-user] Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?
>
> Thank you very much for taking time to answer.
>
> Just so I understand correctly, there are 3 ways of defining the zero-many
> relationship.
>
> 1) Don't add any Object Property
> 2)With the min cardinality:
> Customer hasComplaint min 0 Complaint
> 3)With qualifiedCardinality
> Customer hasComplaint AllValuesFrom Complaint
>
> Are there any advantage for using AllValuesFrom over "min cardinality 0"?
> I'm also leaning to the "min 0" but I'd like to know if I'm not missing some
> extra info like the interesting thing you said about using tools.
>
> Does it also help when using inference rules in SWRL or when using Sparql?
> I also need to make a small application with Jena Feseki (but I still need
> to  learn it)
>
> So any advice is welcome if you think that it makes a difference for using
> "min 0" over "AllValuesFrom"!
>
> Greets!
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

Igor Toujilov-2
In reply to this post by SG
To make sure a complaint belongs to one customer, make hasComplaint property inverse functional.

Cheers,
Igor


> Sent: Wednesday, December 13, 2017 at 11:11 AM
> From: SG <[hidden email]>
> To: [hidden email]
> Subject: [protege-user] Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?
>
> Hello,
>
> Suppose we have two classes Customer and Complaint.
> If the relation between Customer and Complaint is one to zero/many, what is
> the correct way to do this in OWL/Protégé?
> A Customer can have zero or more complaints.
> A Complaint has to belong to one Customer.
>
> Usually for one-to-many relationship I would use "some" (which means at
> least one) in one direction and "exactly 1" in the other direction. (Unless
> I'm doing it wrong)
>
> In my original example where we say that a customer doesn't need to have a
> complaint, my instinct says I need to use "min 0" like this:
>
> Customer hasComplaint min 0 Complaint
>
> and the inverse:
> Complaint isComplaintOf exatcly 1 Customer
>
> Is this correct? Or am I missing something fundamentally.
>
> Thank you!
>
> Cheers
>
>
>
>
>
>
>
> --
> Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
> _______________________________________________
> protege-user mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-user
>
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
SG
Reply | Threaded
Open this post in threaded view
|

Re: Is "Customer hasComplaint min 0 Complaint" the same as "one to zero/many" for classes?

SG
Thanks everyone for the input!
I really appreciate it!



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user