I have:
U-> PT….. 1
Q-> SU……2
etc...
in using the reflexivity axiom can I then say
Q-> S , Q-> U
Q-> PT
I trying to ask how this axiom works using the example above.
To derive
Q->S
Q->U
from
Q->SU
I'd use the decomposition rule, not the reflexivity axiom. Then I'd apply the transitivity axiom to Q->U, U->PT to derive Q->PT.
If you're asking what the reflexivity axiom means, it means
If Y is a subset of X, then X->Y.
In your example, it looks like you might be trying to say that
SU is a subset of Q, therefore Q->S and Q->U.
But it's not given that SU is a subset of Q. To make sure you get this point, Q->SU doesn't mean SU is a subset of Q.
For example, if you're in the military, your last name and blood type (among other things) are functionally dependent on your service number. Let's let the service number attribute be represented by "S", last name by "L", and blood type by "B". Then
S->LB
But neither "last name" nor "blood type" are subsets of "service number".
On the other hand, let's imagine that you're given this to start with.
U->PT
Q->SU
Q = {SUV} (New information!)
Since Q={SUV}, {S} is a subset of {SUV}, and {U} is a subset of {SUV}, then you can apply the reflexivity axiom to derive
Q->S (or SUV->S)
Q->U (or SUV->U)
But that axiom only applies in this example because you're given Q={SUV}.
Related
I'm revising for coming exams, and I am having trouble understanding an example question regarding the closure of attributes. Here is the problem:
AB→C
BE→I
E→C
CI→D
Find the closure of the set of attributes BE, explaining each step.
I've found many explanations of the method of closure when the given step is a single entity type, say 'C', using Armstrong axioms, but I don't understand how to answer for 'BE'.
First, you are confusing two very different things, attributes and entity types. Briefly, entity types are used to describe the real world entities that are modelled in a database schema. Attributes describe facts about such entities. For instance an entity type Person could have as attributes Family Name, Date of Birth, etc.
So the question is how to compute the closure of a set of attributes. You can apply the Armstrong’s axioms, trying at each step to apply one of them, until possible, but you can also simplify the computation by using the following, very simple, algorithm (and if you google "algorithm closure set attributes" you find a lot of descriptions of it):
We want to find X+, the closure of the set of attributes X.
To find it, first assign X to X+.
Then repeat the following while X+ changes:
If there is a functional dependency W → V such as W ⊆ X+ and V ⊈ X+,
unite V to X+.
So in your case, given:
AB → C
BE → I
E → C
CI → D
to compute BE+ we can procede in this way:
1. BE+ = BE
2. BE+ = BEI (because of BE → I)
3. BE+ = BEIC (because of E → C)
4. BE+ = BEICD (because of CI → D)
No other dependency can be used to modify BE+, so the algorithm terminates and the result is BCDEI. In terms of Armstrong’ axioms, the step 1 is due to Reflexivity, while the steps 2 to 4 are due to a combination of Transitivity and Augmentation.
Can Any one explain the difference between using "d" and "o" notations in Generalization & Specialization of ER diagrams. Whether the both notation gives the same meaning or different meanings.
An o is for overlapping, meaning an entity type can belong to more than one subtype. In your example, an Assignment can involve a Grade and/or a Lab_Session.
A d is for disjoint, meaning an entity type can't belong to more than one subtype. In your example, a Lecture can be only one of Enhancement, SpecialDegree or GeneralDegree lectures.
In SHOIN(D) that is equivalent to the DL family used by OWL-DL;
Is this expression legal:
F ⊑ (≤1 r. D) ⊓ (¬ (=0 r. D))
Where F, D are concepts, r is a role. I want to express that each instance of F is related to at most one instance of D through r, and not to zero instances.
In general, how to decide that some expression is legal w. r. t. a specific variation of DL? I thought that using BNF syntax of the variation may be what I'm targeting.
One easy way is to check whether you can write it in Protege. Most of the things that you can write in Protege will be legal OWL-DL. In Protege you can write:
F SubClassOf ((r max 1 D) and not(r exactly 0 D))
Of course, saying that something has at most 1 value, and not exactly one would be exactly the same as saying that it has exactly 1:
F SubClassOf r exactly 1 D
But there are a few things that you'll be able to do in Protege that won't be legal OWL-DL. The more direct way to find out what these are is the standard, specifically §11 Global Restrictions on Axioms in OWL 2 DL. Generally the only problems you might run into is trying to use composite properties where you're not allowed to.
If you don't want to check by hand, then you could try uploading your ontology into the OWL Validator and selecting the OWL2 DL profile.
I was learning database normalization and join dependencies and
5NF. I had a hard time. Can anyone give me some practical examples of the multivalue dependency rule:
MVD3: (transitivity) If X ↠ Y and Y ↠ Z, then X ↠ (Z − Y).
Functional dependency / Normalization theory and the normal forms up to and including BCNF, were developed on the hypothesis of all data attributes (columns/types/...) being "atomic" in a certain sense. That "certain sense" has long been deprecated by now, but essentially it boiled down to the notion that "a single cell value in a table could not itself hold a multiplicity of values". Think, a textual CSV list of ISBN numbers, a table appearing as a value in a cell in a table (truly nested tables), ...
Now imagine an example with courses, professors, and study books used as course material. Imagine all of that modeled in a single 3-column table which says that "Professor (P) teaches course (C) and uses book (B) as course material." If there can be more than one book (B) used for any given course (Cn) and there can be more than one course (C) taught by any given professor (Pn) and there can be more than one professor (P) teaching any given course (Cn), then this table is clearly all-key (key is the full set of attributes {P,C,B} ).
This means that this table satisfies BCNF.
But now imagine that there is a rule to the effect that "the set of books used for any given course (Cn) must be the same, regardless of which professor teaches it.".
In the days when normalization was developed to the form in which it is now commonly known, it was not allowed to have table columns (relation attributes) that were themselves tables (relations). (Because such a design was considered a violation of 1NF, a notion which is now considered suspect.)
Imagine for a moment that we are indeed allowed to model relation attributes to be of type relation. Then we could model our 3-column table (/relation) as follows : "Professor (P) teaches course (C) and uses THE SET OF BOOKS (SB) as course material.". Attribute SB would no longer be an ISBN number, as in the previous and more obvious design, but it would be a (probably unary) RELATION holding the entire set of ISBN numbers. If we draw our design like that, and we then consider our rule that "all professors use the same set of books for the same course", then we see that this rule is now expressible as an FD from (C) to (SB) !!! And this means that we have a violation of a lower NF on our hand !!!
4 and 5 NF have arisen out of this kind of problems (where the appearance of a single attribute value -courseID (C)- causes a requirement for the appearance of A MULTITUDE of rows (multiple (B) ISBn numbers) being recognised quite early on, but without the solution that is currently regarded as the best (RVA's), being recognised as a valid one. So 4 and 5 NF were created "new and further normal forms", where the then-existing definitions of 2, 3 and BC NF were already sufficient for dealing with the situation at hand, provided RVA's had been recognised as a valid design approach.
To support that claim, let's look at what whould be done to eliminate the NF violation in our {P,C,SB} design with the FD C->SB :
We would split the table into two separate tables {P,C} and {C,SB} with keys {P,C} and {C}, repsectively. Both tables satisfy BCNF.
But we still have this SB attribute that holds a set of ISBN numbers. Dealing with this can be done by applying a technique like "UNGROUPING". Applying this to our {C,SB} table would get us a {C,B} table, where B are the ISBN book numbers (or whatever identifier you like to use in your database), and the key to the table is {C,B}. This is exactly the same design we would get if we eliminated the 4/5 NF violation !!!
You might also want to take a look at Multivalue Dependency violation?
I am half way reading the OWL2 primer and is having problem understanding the universal quantification
The example given is
EquivalentClasses(
:HappyPerson
ObjectAllValuesFrom( :hasChild :HappyPerson )
)
It says somebody is a happy person exactly if all their children are happy persons. But what if John Doe has no children can he be an instance of HappyPerson? What about his parent?
I also find this part very confusing, it says:
Hence, by our above statement, every childless person would be qualified as happy.
but wouldn't it violate the ObjectAllValuesFrom() constructor?
I think the primer actually does quite a good job at explaining this, particularly the following:
Natural
language indicators for the usage of
universal quantification are words
like “only,” “exclusively,” or
“nothing but.”
To simplify this a bit further, consider the expression you've given:
HappyPerson ≡ ∀ hasChild . HappyPerson
This says that a HappyPerson is someone who only has children who are also HappyPerson (are also happy). Logically, this actually says nothing about the existence of instances of happy children. It simply serves as a universal constraint on any children that may exist (note that this includes any instances of HappyPerson that don't have any children).
Compare this to the existential quantifier, exists (∃):
HappyPerson ≡ ∃ hasChild . HappyPerson
This says that a HappyPerson is someone who has at least one child that is also a HappyPerson. In constrast to (∀), this expression actually implies the existence of a happy child for every instance of a HappyPerson.
The answer, albeit initially unintuitive, lies in the interpretation/semantics of the ObjectAllValuesFrom OWL construct in first-order logic (actually, Description Logic). Fundamentally, the ObjectAllValuesFrom construct relates to the logical universal quantifier (∀), and the ObjectSomeValuesFrom construct relates to the logical existential quantifier (∃).
I am facing the same kind of issue while reading the "OWL 2 Web Ontology Language Primer (Second Edition - 2012)" and I am not convinced that the answer by Sharky clarifies the issue.
At page 15, when introducing the universal quantifier ∀, the book states:
"Another property restriction, called universal quantification is used to describe a class of individuals for which all related individuals must be instances of a given class. We can use the following statement to indicate that somebody is a happy person exactly if all their children are happy persons."
[I omit the OWL statements in the different sintaxes, they can be found in the book.]
I think that a more formal and may be less ambiguos representation of what the author states is
(1) HappyPerson = {x | ∀y (x HasChild y → y ∈ HappyPerson)}
I hope every reader understands this notation, because I find the notation used in the answer less clear (or may be I am just not accustomed to it).
The book proceeds:
"... There is one particular misconception concerning the universal role restriction. As an example, consider the above happiness axiom. The intuitive reading suggests that in order to be happy, a person must have at least one happy child [my note: actually the definition states that every children should be happy, not just at least one, in order for his/her parents to be happy. This appears to be a lapsus of the author]. Yet, this is not the case: any individual that is not a “starting point” of the property hasChild is a class member of any class defined by universal quantification over hasChild. Hence, by our above statement, every childless person would be qualified as happy . ..."
That is, the author states that (assume '~' for logical NOT), given
(2) ChildessPerson = { x | ~∃y( x HasChild y)}
then (1) and the meaning of ∀ imply
(3) ChildessPerson ⊂ HappyPerson
This does not seem true to me.
If it were true then every child, as far as s/he is a childless person, is happy and so only some parents can be unhappy persons.
Consider this model:
Persons = {a,b,c}, HasChild = {(a,b)}, HappyPerson={a,b}
and c is unhappy (independently from the close world or open world assumption). It is a possible model, which falsifies the thesis of the author.