ER diagrams: can two different notations be used in same diagram? - entity-relationship

Within the one ER diagram is it possible to use the 1...* etc type of notation as well as the arrow notations in order to show cardinality constraints or does it have to be either or.

Often CASE tools such as CA ERwin or IBM Data Architect allow to display both relationship type (in IE crow-feet symbols) and also description of cardinality type.
If relationship is potentially one - to - many, it can described as broken crow feet symbol and cardinality type describtion of zero, one or M.

Related

What does it mean for a fact used in Isabelle to have a number after the name?

Most of the proofs suggested by Sledgehammer use this notation of number inside of parentheses:
by (smt (z3) ApplyAllResult.distinct(1)
ApplyResult.case(1)
ApplyResult.case(2)
ApplyResult.exhaust
applyInput.simps(1))
What does it mean for the fact to have such number?
Isabelle permits the use of fact lists indexed by a natural number starting with 1. Given a fact list fs and an index i, you can access an individual fact from the list by using the syntax fs(i). You can also select multiple facts from the list using multiple indexes (e.g., fs(1,3)), ranges (e.g. fs(2-5), fs(3-)) or a combination of both (e.g., fs(2,4-6)).
Examples of predefined fact lists are assms (which contains the assumptions of a theorem) and f.simps (which contains the equations defining function f).

Is there a well-defined difference between "normalizing" and "canonicalizing" data?

I understand canonicalization and normalization to mean removing any non-meaningful or ambiguous parts of of a data's presentation, turning effectively identical data into actually identical data.
For example, if you want to get the hash of some input data and it's important that anyone else hashing the canonically same data gets the same hash, you don't want one file indenting with tabs and the other using spaces (and no other difference) to cause two very different hashes.
In the case of JSON:
object properties would be placed in a standard order (perhaps alphabetically)
unnecessary white spaces would be stripped
indenting either standardized or stripped
the data may even be re-modeled in an entirely new syntax, to enforce the above
Is my definition correct, and the terms are interchangeable? Or is there a well-defined and specific difference between canonicalization and normalization of input data?
"Canonicalize" & "normalize" (from "canonical (form)" & "normal form") are two related general mathematical terms that also have particular uses in particular contexts per some exact meaning given there. It is reasonable to label a particular process by one of those terms when the general meaning applies.
Your characterizations of those specific uses are fuzzy. The formal meanings for general & particular cases are more useful.
Sometimes given a bunch of things we partition them (all) into (disjoint) groups, aka equivalence classes, of ones that we consider to be in some particular sense similar or the same, aka equivalent. The members of a group/class are the same/equivalent according to some particular equivalence relation.
We pick a particular member as the representative thing from each group/class & call it the canonical form for that group & its members. Two things are equivalent exactly when they are in the same equivalence class. Two things are equivalent exactly when their canonical forms are equal.
A normal form might be a canonical form or just one of several distinguished members.
To canonicalize/normalize is to find or use a canonical/normal form of a thing.
Canonical form.
The distinction between "canonical" and "normal" forms varies by subfield. In most fields, a canonical form specifies a unique representation for every object, while a normal form simply specifies its form, without the requirement of uniqueness.
Applying the definition to your example: Have you a bunch of values that you are partitioning & are you picking some member(s) per each class instead of the other members of that class? Well you have JSON values and short of re-modeling them you are partitioning them per what same-class member they map to under a function. So you can reasonably call the result JSON values canonical forms of the inputs. If you characterize re-modeling as applicable to all inputs then you can also reasonably call the post-re-modeling form of those canonical values canonical forms of re-modeled input values. But if not then people probably won't complain that you call the re-modeled values canonical forms of the input values even though technically they wouldn't be.
Consider a set of objects, each of which can have multiple representations. From your example, that would be the set of JSON objects and the fact that each object has multiple valid representations, e.g., each with different permutations of its members, less white spaces, etc.
Canonicalization is the process of converting any representation of a given object to one and only one, unique per object, representation (a.k.a, canonical form). To test whether two representations are of the same object, it suffices to test equality on their canonical forms, see also wikipedia's definition.
Normalization is the process of converting any representation of a given object to a set of representations (a.k.a., "normal forms") that is unique per object. In such case, equality between two representations is achieved by "subtracting" their normal forms and comparing the result with a normal form of "zero" (typically a trivial comparison). Normalization may be a better option when canonical forms are difficult to implement consistently, e.g., because they depend on arbitrary choices (like ordering of variables).
Section 1.2 from the "A=B" book, has some really good examples for both concepts.

What is the Correct Way to Use Crow's Foot Notation for Relationships?

This has bothered me for some time. What assumptions are to be made, in regards to cardinality when a relationship does not use crow's foot notation- in my opinion- completely. For example, here is a one-to-many relationship from Wikipedia:
I would have thought that this in incorrect; that children must have a mother so I would put two lines on the left side (one mandatory and only one) and a 1 to many for the children (a line and a crow's foot) on the right to indicate that a mother must have at least one child, but could have many. I would have expected this:
My question is, what assumptions are to be made in a "shortcut" like this because I see it everywhere on cardinality examples? Is there a known assumption or rule of what leaving those blank mean?
Both are correct.
The difference between them is that Wikipedia's example isn't Crow's Foot, but a variation called Barker Notation. It looks so similar as Richard Barker modelled it on Crow's Foot and intended it as a refinement
(For some reason, they taught us Barker Notation at college as opposed to Crow's Foot)

Numeral in POS tag "whnp-1" mean?

I am trying to understand an already annotated the sentence When this happens, the two KIMs show a magnetism that causes the first KIM to move toward the second KIM.
What does number 1 in POS tag WHADVP-1 for When mean/signify?
Similarly what does number 1 in POS tag WHNP-1 for that mean/signify?
I think I understand well POS tags, after reading http://web.mit.edu/6.863/www/PennTreebankTags.html and
notes by Andrew McIntyre.
They are indices for coreference resolution. I think this guide from the University of Tübingen, Germany puts it quite nicely.
4.1.2 Indexing
Indices are used only when they can be used to indicate a relationship
that would otherwise not be unambiguously retrievable from the
bracketing. Indices are used to express such relationships as
coreference (as in the case of controlled PRO or pragmatic coreference
for arbitrary PRO), binding (as in the case of wh-movement), or close
association (as in the case of it-extraposition). These relationships
are shown only when some type of null element is involved, and only
when the relationship is intrasentential. One null element may be
associated with another, as in the case of the null wh-operator.
Coreference relations between overt pronouns and their antecedents are
not annotated.
I work quite a lot with POS taggers and I usually just ignore the numbers chained on, unless I am debugging a parse error and want to know why a sentence is tagged wrong. They can be very useful for training sequencing algorithms such as MMEM, CRFs, etc.

Forcing inconsitency by following qualified cardinality restriction

My question goes beyond one question which already has been asked here
I defined a qualified cardinality restriction like this one:
Pizza and hasTopping exactly 4 CheeseTopping and hasTopping only CheeseTopping
Now, how do I force inconsistency of the ontology when having an individual of asserted type 'FourCheesePizza' with less than four 'CheeseTopping' property assertions?
In other words: How do I state that the let us say two 'CheeseTopping' property assertions are definitely the only ones so that an inconsistency is forced?
Making a statement like that is not too difficult in OWL, but because of the open world assumption, it does mean that you have to make sure that a bit more knowledge is available. First, the two-cheese-pizza, let's call it p, that will be inconsistently labelled a four-cheese-pizza must somehow be declared to have exactly two cheese toppings. You can do this by giving p the type
hasTopping exactly 2 CheeseTopping .
This would be enough to get the inconsistency. If that seems a bit generic, and you want to specify the exact toppings that p can have, you could give p a type like
hasTopping only { Cheddar, Mozzarella }
which says that p can only have Cheddar and Mozzarella as toppings. At this point, we know that p can have at most two toppings (it could be just one, if Cheddar and Mozzarella haven't been declared to be different individuals), which is inconsistent with it being a FourCheesePizza and having four cheese toppings.

Resources