read OWL 2 Axiom in plain english - owl

I am trying to understand the following axioms of OWL 2 but don't know what kind of axioms they are. here R is role and C is class
∃R ⊑ C
∃R ⊑ ∃R.C
C ⊑ ¬∃R
∃R ⊑ ¬C
As far i think 1 gives information about Range of R,but i am not sure. Thanks

The only way to make sense of these axioms is to understand the semantics of the Description Logic constructors used:
∃R is the short form of ∃R.T (where T refers to the top concept which represents the complete domain). Mathematically
(∃R.T)^I = {x ∈ δ^I | A y exists such that (x, y) ∈ R^I and y ∈ T^I}
This states that ∃R.T represents the set of individuals consisting of x such that x is associated via relation R to at least 1 individual y that is in top (the domain of discourse). If we had ∃R.C rather than T, y will be in C.
C ⊑ D states that all individuals of type C are also of type D. That is C is a subset of D.
∃R ⊑ C means all the individuals linked to at least 1 individual via relation R is a subset of C. That is why ∃R ⊑ C is also known as a domain axiom because it enforces that for all relations (x, y) in R, that x will be of type C.
¬C defines all the individuals that are not of type C in the domain of interpretation.
Going through the rest of these axioms in a similar way will help you to understand their meaning.

Related

How do deal with combined entity types when computing the closure of a set of attributes

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.

Reflexivity in functional dependencies

I'm taking a class on databases and I'm doing an assignment on functional dependencies. As an example of taking given dependencies and deriving other non-trivial dependencies using Armstrong's Axioms, the TA wrote this and I can't wrap my head around it.
Considering the relation R(c,p,h,s,e,n) and F the set of functional dependencies {1. c->p, 2. hs->c, 3. hp->s, 4. ce->n, 5. he->s}:
Iteration 1:
From F, we can build F1
6. hs->p (transitivity: 1+2)
7. hc->s (pseudo-transitive. 1+3)
8. hp->c
1. hp->hs (reflexivity 3)
2. hp->c (transitivity: 8.1+2)
9. he->c
1. he->hs (reflexivity: 4)
2. he->c (transitivity: 9.1+2)
I understand most of it fine except the cases where 'reflexivity' is used (using quotes because that's pretty far from the definition of reflexivity in my textbook). Can anyone tell me how that's reflexivity? Also, how do I know when an iteration is over? Couldn't you find an infinity of ways to rewrite functional dependencies?
These are the classical Armstrong’s Axioms (see for instance wikipedia):
Reflexivity: If Y ⊆ X then X → Y
Augmentation: If X → Y then XZ → YZ for any Z
Transitivity: If X → Y and Y → Z, then X → Z
So in your example, to derive hp → c you can procede in the following way:
1. hp → s (given)
2. hp → hs (by augmentation of 1 adding h)
3. hs → c (given)
4. hp → c (by transitivity of 2 + 3)
Note that to produce hp → hs from hp → s the axiom to use is Augmentation, in which the role of Z is taken by h, and not Reflexivity, and this is the axiom to use also to derive he → c (by Reflexivity you can only derive, for instance, hp → hp, hp → p, hp → h).
You are also asking:
How do I know when an iteration is over? Couldn't you find an infinity of ways to rewrite functional dependencies?
The Armstrong’s Axioms can be applied to a set of functional dependencies only a finite number of times to produce new functional dependencies. This is simple to show since the number of attributes is finite, and, given n attributes you can have at most 2n * 2n different functional dependencies (since you can have any subset of the attributes both on the left and the right part, of course including the trivial dependencies).
A name doesn't tell you anything except what somebody decided to call something.
Trivial FD X -> X holds in any relation with the attributes in X. Ie a set of attributes in a relation functionally determines itself. That's reasonably called reflexive. It happens that it functionally determines every subset of itself. It happens "reflexivity" was chosen as the name for the more general rule & the more general rule was chosen as one of a set of sufficient but non-redundant rules.
Armstrong's axioms have been shown to be sound & complete. Sound means they only generate implied FDs. Complete means that if you keep applying an axiom until you don't get any new FDs by applying any of them then you get all the FDs that can be derived from the original set, ie that also must hold when the original ones hold. Any textbook tells you that you can generate such a transitive closure of a set of FDs by doing just that.
There are also sound & complete axiom sets for FDs + MVDs. But there aren't for FDs + JDs.

When will it be in 3NF?

I am having a hard time understanding the 3 Normal form.
3 NF: 2 NF + No transitions
So, for eg: If I have,
A -> B
B -> C
Then the above is sort of a transition relation and hence won't be in 3 NF?
Am I understanding it correctly?
But in this answer What exactly does database normalization do? , by paxdiablo, it says,
Third normal form (3NF) - 2NF and every non-key column in a table depends on nothing but the key.According to this, it will be in 3 NF. Where am I going wrong?
A relation is in 3NF if it is in 2NF and:
either each attribute depends on a key,
or, if an attribute depends on a non-key, then it is prime.
(being prime means that it belongs to a key).
See for instance Wikipedia.
A relation is in Boyce-Codd normal form if only the first condition hold, that is:
each attribute depends on a key
So, in your example, if the relation has only three attributes A, B and C and the two dependencies, it is not in 3NF, since C is not prime, and depends on B, which is a not a key. On the other hand, if there are other attributes, and C is a key or part of a key, then it could be in 3NF (but this depends on the other functional dependencies, that should satisfy the above conditions).
The 2NF says that each non-prime attribute depends on each whole candidate key, and not by part of it. For instance, if a relation has attributes A, B and C, the only key is AB, and B -> C, then this relation is not in 2NF.
The 2-part 3nf definition you are trying for is:
2NF holds and every non-prime attribute of R is non-transitively dependent on every superkey. (X transitively determines Z when there's a Y where X → Y and Y → Z and not Y → X.)
The other definition of 3NF is:
For every non-trivial FD X → Y, either X is a superkey or the attributes in Y but not in X are prime. (X → Y is trivial when X contains Y.)
Then BCNF is:
For every non-trivial FD X → Y, X is a superkey
See this answer.
If your example's only columns are A, B and C and your two FDs form a minimal cover then the only candidate key is A and C is dependent on a non-superkey so it is not in 3NF (or BCNF).
You are (mis)using terms so sloppily that your sentences don't mean anything. Learn the terms and how they are used in their definitions to refer to various things and use them that way in reference to appropriate things. And get your definitions from a (reputable) textbook.

OWL-DL; determining if an expression is legal

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.

Is this Lossy Join and Dependency Preserving

I am reading this topic Functional dependency and Normalization in Database Management Subject. I came across this example.
Relation R(A,B,C,D) Which one is Lossy join but Dependency Preserving BCNF Decomposition?
a. A ->B, B -> CD
b. A -> B, B -> C, C->D
c. AB -> C, C -> AD
d. A -> BCD
Now answer given is option C.
How can option C. be a lossy decomposition. if you do ABC union CAD = ABCD This satisfies first condition.
if we do ABC intersection CAD = AC which is perfectly fine, since in AC, C is key for (CAD) C -> AD decomposition. which also satisfies the second condition. Am i making any mistake in understanding this concept.
Usually for a Normalisation/decomposition exercise, you are given:
The full relation and its attributes. [yes: R(A, B, C, D)]
The Functional dependencies. [yes? it looks like a., b., c., d. are possible sets of Fun Deps.]
The proposed decomposition. [Often named R1, R2, etc. I don't see those. I can't interpret option d. to be proposing a decomposition.]
Perhaps your post has missed out part of the exercise? Perhaps the exercise wants you to decide which decomp preserves the dependencies in BCNF? (But results in a lossy join.)
[editted in response to Nikhil's comment] Note that the list of FD's alone doesn't amount to a decomposition: the FD C -> AD is short-hand for C -> A, C -> D. Does that mean two decomposing relations? No, because A and C are already in the FD AB -> C. So we have R1= (A, B, C), R2 = (C, D). But I don't know if that is what the exercise is asking. Think about it. What does option d. mean in terms of decompositions?
Perhaps the exercise is asking (for example): given a proposed decomposition into R1 = (A, B) and R2 = (B, C, D), which of the sets of FD's would give a lossy decomposition?
There's a worked example here: http://en.wikipedia.org/wiki/Lossless-Join_Decomposition.
It points to a previous q Lossless Join Property.
And there's further references.
By the way, options a., b., include the same Fun Deps as option d., by the transitivity of dependencies (Armstrong's Axioms http://en.wikipedia.org/wiki/Armstrong%27s_axioms see also http://en.wikipedia.org/wiki/Heath%27s_theorem). This is a clue.

Resources