NoSQL and SQL Data Modeling: Bringing Together Data, Semantics, and Software First Edition Hills download
NoSQL and SQL Data Modeling: Bringing Together Data, Semantics, and Software First Edition Hills download
https://ebookmeta.com/product/nosql-and-sql-data-modeling-
bringing-together-data-semantics-and-software-first-edition-
hills/
https://ebookmeta.com/product/sql-and-nosql-databases-modeling-
languages-security-and-architectures-for-big-data-management-
michael-kaufmann/
https://ebookmeta.com/product/sql-and-nosql-databases-modeling-
languages-security-and-architectures-for-big-data-management-2nd-
edition-michael-kaufmann/
https://ebookmeta.com/product/python-data-persistence-with-sql-
and-nosql-databases-1st-edition-lathkar/
https://ebookmeta.com/product/covid-19-and-sars-cov-2-the-
science-and-clinical-application-of-conventional-and-
complementary-treatments-1st-edition-srijan-goswami/
What If... Book of Alternative History 7th Edition Jack
Parsons
https://ebookmeta.com/product/what-if-book-of-alternative-
history-7th-edition-jack-parsons/
https://ebookmeta.com/product/art-and-culture-hawaiian-paniolo-
expressions-nicole-sipe/
https://ebookmeta.com/product/the-history-and-environmental-
impacts-of-hunting-deities-supernatural-gamekeepers-and-animal-
masters-1st-edition-richard-chacon/
https://ebookmeta.com/product/pedagogies-of-with-ness-students-
teachers-voice-and-agency-1st-edition-linda-hogg/
https://ebookmeta.com/product/fundamentals-of-machine-component-
design-7th-edition-robert-c-juvinall/
Moon Denver Boulder Colorado Springs Getaways Outdoor
Recreation Bites Brews 3rd Edition Mindy Sink
https://ebookmeta.com/product/moon-denver-boulder-colorado-
springs-getaways-outdoor-recreation-bites-brews-3rd-edition-
mindy-sink/
Bringing Together
Data, Semantics, and Software
first edition
Ted Hills
Published by:
2 Lindsley Road
Basking Ridge, NJ 07920 USA
https://www.TechnicsPub.com
Cover design by John Fiorentino
Technical reviews by Laurel Shifrin, Dave Wells, and Steve Hoberman
All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or
mechanical, including photocopying, recording or by any information storage and retrieval system, without written
permission from the publisher, except for the inclusion of brief quotations in a review.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of
any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential
damages in connection with or arising out of the use of the information or programs contained herein.
All trade and product names are trademarks, registered trademarks, or service marks of their respective companies, and
are the property of their respective holders and should be treated as such.
Copyright © 2016 by Theodore S. Hills, [email protected]
ISBN, print ed. 9781634621090
ISBN, Kindle ed. 9781634621106
ISBN, ePub ed. 9781634621113
ISBN, PDF ed. 9781634621120
First Printing 2016
Library of Congress Control Number: 2016930173
To my wife Daphne Woods, who
has always believed in me, and
gave me the space and support
I needed to write this book.
Contents at a Glance
Chapter Glossary
Part II The Tyranny of Confusion
Chapter 5 Entity-Relationship Modeling
Logical E-R Data Models
Multiple Levels of Abstraction
Limitations of E-R Modeling Notation
NoSQL Arrays and Nested Data Structures
Lack of Reusable Composite Types
Lack of Place
Modeling the Real World
Representing Individual Entities
Mapping Between Models
Data in Software
Terminology
Entity
Conceptual
E-R Terms Mapped to COMN Terms
References
Chapter 6 The Unified Modeling Language
Class Diagrams
Stereotyping
Terminology
Relationship, Composition and Aggregation
Type and Implementation Class
UML Terms Mapped to COMN Terms
References
Chapter 7 Fact-Based Modeling Notations
Facts and Relationships
Limitations of Fact-Based Modeling
Lack of Instances
Incompleteness
Difficulty
Terminology
Fact-Based Modeling Terms Mapped to COMN Terms
References
Chapter 8 Semantic Notations
Predicates and RDF Statements
Doubles and Quadruples
OWL
Graphical Notations for Semantics
Terminology
Chapter 9 Object-Oriented Programming Languages
Classes, Objects, Types, and Variables
Terminology
Part III Freedom in Meaning
Chapter 10 Objects and Classes
Material Objects
Objects with States
Meaning of States
Objects with More States
Methods
Material Objects in Computers
Summary
Summary
Chapter Glossary
Chapter 11 Types in Data and Software
Types in Programming and Databases
What Does a Type Tell Us?
Subclasses
Subtypes and Extensions: Perfect Together
Inheritance
Using Subtype Variables and Values
Using Extending Types and Classes
Data Object
Chapter Glossary
Chapter 15 Relationships and Roles
Arrivals and Departures
Labeling Relationship Lines
Cleaning Up the Model
Summary
References
Part IV Case Study
Chapter 18 The Common Coffee Shop
Analysis: Documenting Real-World Entities
Logical Data Modeling: Designing the Data
Physical Data Modeling: Designing the Implementation
APPENDIX COMN Quick Reference
Glossary
Photo and Illustration Credits
Index
Acknowledgements
I am very grateful to Tony Shaw of Dataversity for giving me the opportunity to present
this new modeling notation to a wider audience, first at the NoSQL Now! conference in
San Jose in 2015, and then at the Enterprise Data World conference in San Diego in 2016.
Daniel Upton attended my workshop at the NoSQL Now! conference, and introduced me
to Steve Hoberman, data modeling enthusiast, leading author, and publisher. I met with
Steve to talk about my ideas. Steve accepted my proposal for this book, and that is how it
came into being.
The fundamental ideas behind concept and object modeling notation arose from my work
on object-oriented programming language design, and from tackling the difficult problem
of integrating objects and data. In the latter effort, I was helped tremendously by the many
writings of C. J. Date, most especially Foundations for Future Database Systems: The
Third Manifesto, Second Edition (by C. J. Date and Hugh Darwen). I had the opportunity
to correspond with and speak to Mr. Date about this topic, and this finally enabled me to
perceive the difference between data and objects. Mr. Date is not aware of the debt I owe
him for the clarity of his thinking on all things relational. One should not read this
acknowledgement as his endorsement of my ideas.
I have had the opportunity to discuss the Concept and Object Modeling Notation
(COMN), and the ideas behind it, with colleagues at LexisNexis, most notably Roger
Cass, Matthew Johnson, Michael Khatib, and Paul Rogers. They gave me the opportunity
to test my ideas and my expression of them. Roger has the additional distinctions of
having introduced me to Object Role Modeling, and of having put the “N” in COMN so
that the acronym became pronounceable as “common”. My immediate manager and
longtime friend Greg Saxton and our chief architect Ian Koenig encouraged me to pursue
this work.
My wife Daphne Woods, a brilliant novelist, long ago trained this technologist in the
mysteries of English grammar and composition. She also trained our daughter Heather
through ten years of home schooling to near perfection in these fields. Consulting with
these two during the writing of this book helped me with clarity and structure.
It was wonderful to have my colleague Laurel Shifrin, respected educator Dave Wells, and
Steve Hoberman as technical reviewers. Laurel’s knowledge of unstructured data and
Dave’s knowledge of structured data helped keep some unsupported assumptions out of
the work. Dave’s early enthusiasm for COMN has been a tremendous boost. What a
pleasure to have Steve, a leading author of data modeling books and my publisher,
encouraging and promoting this work.
Here’s to all who have struggled to tame their data. I hope you find this makes the journey
more pleasurable and more successful.
Introduction
S am came barreling into the plant manager’s office, clutching a roll of blueprints in one
hand. He was so excited. “Joe, have I got great news!” he called out.
Joe looked up from his desk behind the office counter. He looked weary. Well, keeping
track of everything that goes on in a 150-acre refinery that processes 200,000 barrels of oil
a day could make anyone weary. He pushed back his chair, got up, and ambled over to the
counter.
“What’s the news?” Joe asked.
“The boys in engineering have figured out that, by just combining a few material flows
earlier in the process, the petrochemical plant could reduce emissions, produce more
product from the same input flows, and add $5,000 a day to the plant’s bottom line in
reduced expenses! So I’ve come down here to find out what it will take to implement
these changes.” Joe placed the rolled-up blueprints on the counter and spread them out.
Sam started studying the drawings, running his finger over the many lines and shapes that
represented the thousands of pipes visible out the office windows. He licked his finger and
pulled the top drawing back to look at the next blueprint, and then the next, all while Joe
watched excitedly but silently. Sam had a reputation. He knew his stuff. If Sam said it
could be done, it could be done, and if he said it couldn’t, well, you’d better do a ton of
research before you said Sam was wrong.
Finally Sam looked up from the counter. “I think I get it. This isn’t too bad. We’ll just
have to re-route a few pipes and this could be implemented pretty easily.”
Joe was happy and relieved. “So, how long do you think it will take?”
Sam kept his look level when he delivered the blow. “I think about six months.”
“Six months!” Joe nearly shouted. “I thought you said this was easy! Why, in six months
we will have lost”—Joe figured fast in his head—“nearly a million dollars in savings!”
Exploring the Variety of Random
Documents with Different Content
CHAPTER XV
GUARDING THE BLACKWATER
"General: Your letter of the 23d inst. has just been received.
I regret my inability to detach from this army the two regiments
to operate on the Blackwater. As far as I am able to judge,
troops are more wanted here than there, and it might be better
to bring the troops which it is contemplated to unite with those
in question to this army. I regretted at the time the breaking up
of your former brigade, but you are aware that the
circumstances which produced it were beyond my control. I
hope it will not be long before you will be again in the field, that
the country may derive the benefit of your zeal and activity."
A rule enforced for the common good often falls heavily upon
individuals. General Pryor grieved to lose his men, and they united in
many petitions to be allowed to remain with him. He undertook the
protection of the Blackwater region with an inadequate force, in the
certain expectation that reënforcements would be sent to him.
"Can you tell me, sir, where I can get lodging to-night? I am the
General's wife—Mrs. Pryor—and to-morrow he will take care of me. I
know he has no place for us in camp."
The little man considered, and looked us over—a lady, three little
boys, trunks, and a box.
"I can take thee in myself," he said. "I am just going home."
"Oh, thank you, thank you. I shall need only the smallest trunk
to-night."
"I knowed," said the girl, "you was some punkins soon's I sot
eyes on you." Before I was summoned to the supper of biscuit, fried
bacon, and coffee without cream, Charity had enlightened me about
her employer; she made haste to tell me he was not her master.
"I'se free, I is! Mo'n dat, he's a Quaker, an' ef you ever seen
Quakers, you knows dey don' like no slaves 'roun'. Yas'm, I'se free—
an' Dick, he's a po'-white boy. Me'n him does all de wuk cep'n in
hawg-killin' time, an' den de fokes comes fum de quarters to he'p."
"Dat I is. You see he los' his wife two mont' ago. Dese here
quilts is hern. She made 'em."
"Yas'm! I cert'nly is lonesum! She jes up an' die, an', an' de po'
little baby daid too."
"He's got painted cups an' saucers, but I dunno's he'll s'render
'em," said Charity.
"I dun try 'im once. I ax 'im dat time when his mother-in-law
cum to see 'im—an' he nuvver say nuthin! Den I let 'im rip!"
"Good Gawd!" said Charity. "I nuvver thought he'd s'render the
chany cups!"
"Not one is to be broken," I said, sternly. "If you break one, tell
me at once and bring me the pieces, so I can send to Richmond and
replace it."
A few months after I left his house for Petersburg I received the
following letter from him:—
"Thy friend,
"I. P."
And then, having vexed our souls all the week over mundane
"things," we are given, on Sunday, glimpses of another world quite
as full of them.
I knew that most of the tight little carts peddling fish, potatoes,
and eggs had double bottoms between which were all sorts of
delightful things, but I never dared approach the pedler on the
subject; and as I was the commanding officer's wife, he dared not
approach me.
"This prisoner," said the General, "has been arrested for bringing
in contraband goods in violation of express orders. He pleads that
the goods were ordered by the General's wife for the use of the
General's family. Have you anything to say to show cause why he
should not be punished?"
I was very sorry for the fright the poor man had suffered for my
sake. I took him home with me beside the driver on the ambulance.
Of course I paid him. I had one piece of family silver with me for
which I had no use on the Blackwater,—a butter knife—and I gave it
to him as a souvenir of his happy escape from danger.
"Dat ole creeter," said Charity, "what come home wid you las'
week, knock at de kitchen do' fo' day dis mornin'. He gimme dis, an'
say you bleeged to git it fo' de Gen'al wake up; an'—an'—he say—
but Lawd! 'tain' wuf while to tell you what he say! But he do say to
tell you to gimme sumpin out'n de bundle. Gawd knows I ain' no
cravin' po'-white-folks' nigger, but dat what he say."
"Your loving
"Agnes."
"Dearly,
"Agnes."
"Yes, sah, an' would a' run sooner ef I knowed it was a-comin'!"
"But you don't consider your life worth more than other people's,
do you?"
"Yas, sah, I does,—mo'n all dis wuld! Mo' dan a million o' dollars,
sah. What would dat be wuth to a man wid de bref out o' 'im? Self-
perserbashun is de fust law wid me, sah!"
"But why should you act upon a different rule from other men?"
"'Cause diffunt man set diffunt value 'pon his life. Mine ain't in de
market."
"Well, if all soldiers were like you, traitors might have broken up
the government without resistance."
"Dat's so! Dar wouldn't 'a' been no hep fer it. But I don' put my
life in de scale against no gubberment on dis yearth. No gubberment
gwine pay me ef I loss messef."
"Well, do you think you would have been much missed if you
had been killed?"
"Maybe not, sah! A daid white man ain' much use to dese yere
sogers, let alone a daid niggah, but I'd 'a' missed mysef powerful,
an' dat's de pint wid me."
After the men had marched away, I drove to the hospital tent
and put myself at the disposal of the surgeon. We inspected the
store of bandages and lint, and I was intrusted with the preparation
of more.
"I ain' got no use for dis stuff," said my one female friend and
companion, Charity, whom I pressed into service to help me pick
lint. "'Pears like 'tain't good for nuthin' but to line a bird's nes'."
"It will be soft for the wound of a soldier," I said, "after he has
fought the Yankees."
"I'll pick den; I'll tar up my onlies' apun ef he'll kill one."
"Oh, Charity!"
"Yas'm, I will dat! Huccome we all don' drive 'm out o' Suffolk?
Der's lodes an lodes o' shoes an' stockin's, an' sugar an' cawfy in
Suffolk! An' dese nasty Abolition Yankees got 'em all!"
"Those are not proper words for you to use," I said. "What have
you against the Northern people? They never did you harm."
"Dey ain't, ain't dey?" she replied, with feeling. "Huccome I'se
got to go barfooted? Hit's scan'lous for a free gal to go barfooted,
like she was so no 'count she couldn't git a par o' shoes fer herse'f."
Charity was not the only one of the Nation's Wards who held the
enemy in contempt. The special terms in which she designated them
were in common use at the time. She had often heard them from
the General's servant, John, who shared the opinions of the common
soldier. Some of the expressions of the great men I knew in
Washington were quite as offensive and not a bit less inelegant,
although framed in better English. I never approved of "calling
names," I had seen what comes of it; and I reproved John for
teaching them to my little boys.
"No'm," said John, "I won't say nothin'; I'll just say the Yankees
are mighty mean folks."
My first news from the General was cheering, but he would not
return for a day or two. He must fly about the frontier a little in
various directions to let the enemy know he was holding his own. His
official report was as follows:—
"Respectfully,
"Roger A. Pryor, Brigadier-General Commanding."
One of the "enemy's" papers declared that our force was "three
regiments of infantry, fourteen pieces of artillery, and about nine
hundred cavalry."
"'But, Agnes dear! that is good form, you know, and belongs
to the etiquette of polite life.'
"Of course I know it! Did I say that Mrs. Davis should admit
King Solomon? I wouldn't! I only tell you what other folks think
and say—but ajew, until I hear some more news and gossip.
"Dearly again,
"Agnes."
CHAPTER XVI
VICISSITUDES OF THE WAR
"My Dear: I hope you appreciate the fact that you are
herewith honored with a letter written in royal-red ink upon
sumptuous gilt-edged paper. There is not, at the present
writing, one inch of paper for sale in the capital of the
Confederacy, at all within the humble means of the wife of a
Confederate officer. Well is it for her—and I hope for you—that
her youthful admirers were few, and so her gorgeous cream-
and-gold album was only half filled with tender effusions. Out
come the blank leaves, to be divided between her friend and
her Colonel. Don't be alarmed at the color of the writing. I have
not yet dipped my goose-quill (there are no steel pens) in the
'ruddy drops that visit my sad heart,' nor yet into good orthodox
red ink. There are fine oaks in the country, and that noble tree
bears a gall-nut filled with crimson sap. One lies on my table,
and into its sanguinary heart I plunge my pen.
"'There is,' said the girl, solemnly; 'we celebrate our right to
live. We are starving. As soon as enough of us get together we
are going to the bakeries and each of us will take a loaf of
bread. That is little enough for the government to give us after
it has taken all our men.'
"I did not see the article in question, but I am glad it has led
to an expression so agreeable. The good opinion of one so
competent to judge of public affairs, and who has known me so
long and closely, is a great support in the midst of many and
arduous trials.
Among the letters sent to Mr. Davis in General Pryor's behalf was
one from General Lee and one from General Jackson, both of which
unhappily remained in the President's possession, no copies having
been kept by General Pryor.
The Divinity that "rules our ends, rough hew them as we may,"
was guiding him. I look back with gratitude to these circumstances,
—then so hard to bear,—circumstances to which, I am persuaded, I
owe my husband's life.
"Very respectfully,
"Fitz Lee."
Eighty-four years before this time there was a war in this same
country. It was a rebellion, too, and a nobleman led the troops of
Great Britain through the country to subdue the rebellion. The
people through whose land he marched were bitterly hostile. They
shot his foraging parties, sentinels, and stragglers; they fired upon
him from every wood.
On January 28, 1781, this order was issued from camp near
Beatty's Ford:—
Again:—
"Headquarters, Causler's Plantation,
"February 27, 1781.
Again:—
"Headquarters, Freelands, February 28, 1781.
Another:—
"Smith's Plantation, March 1, 1781.