On Thursday, 10 June 2021 at 19:25:02 UTC+10, Derek Ignatius Asirvadem wrote:1. Lost formatting, retry in a variable-width font, arrgh:
On Thursday, 10 June 2021 at 02:43:14 UTC+10, Nicola wrote:
On Thursday, 10 June 2021 at 19:25:02 UTC+10, Derek Ignatius Asirvadem wrote:Clarification.
Thus any Binary Predicate can be read rCLtwo waysrCY, and only the *Verb*, not the full text, is required on the relation line, because each of the binaries is diagrammatically connected. Usually only the parent->child *Verb* is shown, and the converse is simple enough to determine [by reversal of the elements] by the reader.Thus any Binary Predicate can be read rCLtwo waysrCY, and only the *Verb*, not the full text, is required on the relation line, because each of the Variables in the Binary Predicate is diagrammatically connected, and thus obvious.
3. In general, I would stop using OO/OOP/ORM terms when dealing with data and databases, and specifically use Relational terms when the database is Relational. Use of their terms implies their meaning, which is crippled, because OO is crippled (ambiguous; not a Standard; 420 notations; nothing clearly defined; etc). I deal with OO/OOP/ORM people all the time, and they appreciate that I do NOT use their terms, that I use Relational terms, which are rock solid. Just think about how stupid /Aggregation/ is, vs say /Composition/. Just like TTM, they have been arguing about what it is for THIRTY YEARS, and it is still not resolved. The freaks live in the Excluded Middle, that the sane reject.I trust you understand and appreciate that the science of data and the science of process are distinct, not one science, not blurred. Thus it is a failure to take either one as primary (viewing the other as subordinate), or single (viewing the other as redundant because ours is oh so complete). The OO/OOP/ORM imbeciles do precisely that, more standing on the quicksand of Redundant, than the clever ones who have identified that the rCLmappingrCY is an undefined cloud and thus less, standing on the swamp of Primary.
Read /Unskilled and Unaware/ by Kr|+ger and Dunning 1999.
Now that you have declared that the previous thread. is resolved, I do not understand why /Incomplete/ is still hanging around. Recall, there are two meanings: the original IDEF1X; and the common promoted by ERwin. The former being illegal.Thus the former is not usable.
On Thursday, 10 June 2021 at 19:25:02 UTC+10, Derek Ignatius Asirvadem wrote: 2.Actually no. The Predicate Lexicon is Normalised, only non-key elements are Descriptors.
This is an error:
__Person is described by ( SexCode, Title )
__Person is described by ( NameLast, NameFirst, Initial, BirthDate, BirthCountryCode, BirthPlace, Sex, Title )Updated.
HunterLicenceThe great thing about modelling rather than discussing. Particularly, the great thing about modelling visually, using IDEF1X, rather than hieroglyphics like /R={A, B, C}/, is that mistakes are exposed immediately. Likewise obvious improvements. When I added HunterLicence:
Certainly, I would not say that a Hunting License has a NameLast or
a BirthDate or that NameLast and BirthDate are descriptors of Hunting
License.
Why not ?
(I am assuming you are not being silly about the wording, but chasing meaning; declarative meaning.)
A Hunting licence is not a piece of paper gambolling around in the Tyrolian Alps (Fragment).
__If it were a Fragment, sure, you should not say that
__But a HuntingLicence is not a Fragment
A Hunting licence is a /Power to Act/, that is given to a Person (not animal, not thing), it does not exist
independently, it exists only in the context of Person.
Predicates, as modelled:
__HuntingLicence is dependent
__HuntingLicence is dependent on 1 Person
__HuntingLicence is identified by 1 Person
__HuntingLicence is 1 Person
Strictly, the entity is not HuntingLicence but Person-HuntingLicence.
Which is the real world, HuntingLicence is not a piece of paper (the Physical), but an option of Person (the Logical,
the Real). (Or /a/ progression of Person in the fullness of definition of Person).
So, you are saying that a 0-to-1 relationship is essentially always
"is".
Whoa. You are responding to the first item that perturbed you.
Please read again, there is a bigger item coming up, or stated
otherwise, the item is bigger than you think.
3. The Verb on the relation line is specific, read in both directions.
The generic Verb for any child-to-parent relation is /is/.
Think CoddrCOs 3NF & FFD only.
<FK in Child> <Verb> 1 <Parent(PK)>
The proper <Verb> is specific.
The generic <Verb> is /is/.
The key in the parent and the key in the child is the same, so theparent and the child must describe the same "molecule", as you call it.
Am I understanding right?
Not quite.
Two separate concepts. DonrCOt conflate them.
In an Identifying hierarchy, the child has all the keys for its
lineage; in a Non-Identifying hierarchy, the child has just the one
key for its single-level parent.
That Bridge problem is from my days of hard labour at TTM gulag.
3. The Verb on the relation line is specific, read in both directions.Finally I understand the sense in which you use those verbs.
The generic Verb for any child-to-parent relation is /is/.
Think CoddrCOs 3NF & FFD only.
<FK in Child> <Verb> 1 <Parent(PK)>
The proper <Verb> is specific.
The generic <Verb> is /is/.
But is it not normal English ?
I will give you one more increment.
- All tables/facts are Atoms
- Only a root Atom can be the start of a Molecule that is relevant (perceiving a Molecule in the middle of a tree is hopeless).
--- that means a Hierarch (independent, square corners)
--------
In an Identifying hierarchy, the child has all the keys for its
lineage; in a Non-Identifying hierarchy, the child has just the one
key for its single-level parent.
That's a prominent remark, as simple as it is. When you learn that, you
(a) understand why IDEF1X distinguishes between identifying and
non-identifying, and (b) you look at the diagrams in a novel way,
immediately perceiving the (join) relationships between entities that
are far apart. At least, this is what I felt when I first understood
that.
That is what I meant when I said /the item is bigger than you think/.
I knew a big AHA was coming. But I was shocked that you did not know
that, and surprised again, when several increments of explanation were required.
By the way, I have developed a tighter Standard, IDEF1R. Therein
I have eliminated this problem of not comprehending this issue.
(Modelling instructions)Done.
(Modelling instructions)
Done.
Doc updated:
____ https://www.softwaregems.com.au/Documents/Article/Normalisation/Bridge%202.pdf
I have used the IDEF1R symbol for ExclusiveSubtype, with the IDEF1X in
the left margin for comparison. Please choose.
(Modelling instructions)
Done.
Doc updated:
____ https://www.softwaregems.com.au/Documents/Article/Normalisation/Bridge%202.pdf
On Sunday, 13 June 2021 at 11:48:12 UTC+10, Derek Ignatius Asirvadem wrote:
In the next iteration, I will give ComposerType. (This is modelling, yes, we have many iterations). You tell me what you want.
[etc]
On Saturday, 12 June 2021 at 23:12:07 UTC+10, Nicola wrote:
On 2021-06-12, Derek Ignatius Asirvadem wrote:
What issues do you see with a discriminator assigning more than one
value to a subtype?
I think you mean /What issues do you see with a discriminator being overloaded (more than the range of subtype Discriminators) ?/
The issue here is nothing to do with Discriminators or Subtypes. It
has to do with overloading.
So in the previous model 12.2 Jun 21, I as DBA policeman re what goes
into the db, allowed your Role, but insisted on the required
Discriminator Staketype. In the next iteration, I will give
ComposerType. (This is modelling, yes, we have many iterations). You
tell me what you want.
Also, I don't understand this sentence:
The cumbersome <Role.PK> is replaced with <Role>.
I haven't put Role in the primary key.
Not the column name Role, but the /RM/ concept of Role.
On Saturday, 12 June 2021 at 18:22:59 UTC+10, Nicola wrote:
Then, Solver_Not_Composer, Solver_Not_JointComposer, and
JointComposer_Not_Composer all reduce to a single check in
StakeHolder.
Implementation standards again.
Mine require each CHECK constraint to do just one logical thing,
generally that means one <LogicalCondition> per constraint.
While I am here,let me point out something about naming. For meaning
and brevity, the constraint name is:
__ Secondary_Max_1
The table prefix is excluded in the model at the table entry, but
demanded in the physical (otherwise you will never find the constraint
in the list of constraints), and is so listed at the expansion at the
bottom:
__ Composer_Secondary_Max_1
Along with the full CHECK condition given in pseudo-sql (my notation,
which you have seen before):
__ CHECK Composer[ @Primary ] EXISTS
__ AND
__ CHECK Composer[ @Secondary ] NOT EXISTS
See, even typing that exposes that it is incorrect. Ah, the wonder of
the iterations in data modelling.
__ CHECK Composer.IsPrimary[ @ProblemName ] EXISTS
__ AND
__ CHECK ( Composer.IsPrimary[ @ProblemName ] = 0 ) NOT EXISTS
For a bit of a write-up on naming, see this post. SO actively
suppresses the truth, same as the /RM/ saboteurs:
__ https://stackoverflow.com/a/4703155/484814
On Saturday, 12 June 2021 at 23:45:52 UTC+10, Nicola wrote:
On 2021-06-12, Derek Ignatius Asirvadem wrote:One more thing. Your constraints are implemented as CONSTRAINT.. CHECK
clauses. Those are checked before every insert or update. A constraint
such Solver_Max_4 would correctly prevent you from inserting a fifth
solver. But it would also prevent you to update an existing solver when
there are already four of them.
Triggers would provide a trivial solution for that, but AFAIK you don't
use them (and I agree with you on avoiding them as much as possible).
Absolutely.
I have never written a trigger in my life.
I have examined and replaced over 2,000 triggers in customer databases
with proper DDL and Transactions.
So, how do you deal with that? Delete plus insert, instead of update?
That is a question that should be answered fully. Considerations.
4. Not on my platform.
The CHECK constraint is fired for UPDATE only if a column named in the constraint is affected. __ In this case, no columns are named, meaning
it is not CHECKed on UPDATE __ And I can force the constraint to be
CHECKed by naming a column (There is a huge value in commercial SQL platforms, that the freeware crowd cannot even dream of.)
Example from MS/SQL, which is the same as mine in this issue: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cdb87a2e-41ce-4a97-8a14-3f218eb00721/function-check-constraint-ignored?forum=transactsql
5. For others.
In general, yes, DELETE+INSERT.
Note that one should be used to that because UPDATE any Key component
is not permitted, it must be DELETE+INSERT, in a Transaction of
course, that moves the entire hierarchy belonging to the Key.
I forgot to mention, of course the documents is updated.
Example from MS/SQL, which is the same as mine in this issue:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cdb87a2e-41ce-4a97-8a14-3f218eb00721/function-check-constraint-ignored?forum=transactsql
Funny example. The OP's constraint wouldn't work even if the constraints
were triggered,
[...]
I do not see how you could prevent them with CONSTRAINT.. CHECK.
[...]
I do not see other ways.
I think that you still have a typo there. The second clause should read:[...]
[AND] CHECK ( Composer.~~~IsSecondary~~~[ @ProblemName ] = 0 ) NOT EXISTS
So this:
__ CHECK ( Composer.IsPrimary[ @ProblemName ] = 0 ) NOT EXISTS
checks that a Secondary does not exist.
Example from MS/SQL, which is the same as mine in this issue:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/cdb87a2e-41ce-4a97-8a14-3f218eb00721/function-check-constraint-ignored?forum=transactsql
Ironically (since you posted that), the first reply in that thread
recommends: "using scalar UDFs that read the database in a CHECK
constraint is not a good practice. Triggers are simpler and more
useful". Indeed, that example would be solved easily with triggers.
1. Triggers are simply stupid, maintenance is horrendous. Total
unnecessary in the real world of Open Architecture,
[...]
Using Functions that are called by CHECK Constraints is pedestrian,
the world has been doing it since 2007. CHECK can only check the
inserted row. CHECK+Function can check other rows in the table, or any
other table.
On Monday, 14 June 2021 at 17:03:04 UTC+10, Nicola wrote:So you canrCOt code that way in PusGres. DonrCOt contradict yourself. DonrCOt kid yourself, it is a single-user flatporn.
On 2021-06-14, Derek Ignatius Asirvadem wrote:
1. Triggers are simply stupid, maintenance is horrendous. Total unnecessary in the real world of Open Architecture,
[...]
Using Functions that are called by CHECK Constraints is pedestrian,
the world has been doing it since 2007. CHECK can only check the
inserted row. CHECK+Function can check other rows in the table, or any other table.
For platforms where that is true, I totally agree.
I can code that way in PostgreSQL, and it is an elegant approach. It
even appears to work in simple tests, which is nice because I can try
that approach. Unfortunately, it is not really supported (it fails
under concurrent loads
rCohave fun with this comment), so triggers are the onlyAs long as you donrCOt lie to yourself and say that that is SQL, fine with me. And is something doesnrCOt work, donrCOt lie to yourself and say that SQL is broken, say that your o.o.s pretend sql canrCOt do that.
alternative in most cases. But you get what you pay for, right?
On the other hand, a *disciplined* use of triggers, restricted to such constraints, is fine. It achieves the same results as declarative constraints, with some added flexibility and efficiency, because you can specify exactly which operations on which columns under which conditions should fire the trigger. Error reporting is just as expressive, or more (custom messages). The trigger shows up just as a constraint associatedJust donrCOt say that that is SQL.
to a table when you inspect the table metadata. Just slightly more
verbose to write.
Same as using prefixes because you have no schemas. Not ideal, but still workable.Having no schemas is like having no herpes. Tell me, give me one good reason why I should duplicate some subset of my 100% Normalised DDL, which achievement was not small. Think: Data Modeller and DBA of a financial database of 500 tables in four physical databases. Why should I add this additional layer of abstraction, that I did not need for twenty years before its introduction, to my fully Logical command and control of the database.
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 00:54:54 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,187 |