Professional Documents
Culture Documents
Hands-On Database 2nd Edition Steve Conger Solutions Manual 1
Hands-On Database 2nd Edition Steve Conger Solutions Manual 1
Outcomes
A. Logical Design
B. Physical Design
A. Entity Layout
B. Relationships
B. Adding an Entity
V. Relationships
A. One to One
B. One to Many
C. Many to Many
VI. Cardinality
4-2
Copyright © 2014 Pearson Education, Inc.
VII. Types of Entities
A. Domain Entity
B. Linking Entity
C. Lookup Entity
D. Weak Entity
VIII. Documentation
Vocabulary
3. Crow’s Feet Notation e. Notation for relationships that uses lines and circles to denote
cardinality
4. Domain Entities l. An entity that captures a chief element of the business problem
5. Entity Relation Diagrams c. One common method of depicting entities and relations in a
diagram
one-to-many relationships
7.Logical Design a. The entity relation design without regard to what DBMS or
system it will be on
4-3
Copyright © 2014 Pearson Education, Inc.
8.Lookup Entity o. Are used to store a set of values that can be looked up, such as
11. Naming Conventions d. A set of rules or suggestions that promote consistency in the
12. Physical Design b. The design adapted to the RDMS and system constraints and
features
numbers
14. Triggers m. Executable scripts of SQL that are triggered by an event, such
15. Weak Entities h. An entity that depends on another entity for its meaning
Things to Look Up
1. Look up naming other database-naming conventions. Is there one that makes the most sense to you?
Explain why.
Here are a few good sources on database-naming conventions. These sites were available at the time
JustInsomnia: http://justinsomnia.org/2003/04/essential-database-naming-conventions-and-style/
4-4
Copyright © 2014 Pearson Education, Inc.
Binco: http://www.bin-co.com/database/db_naming_conventions.php
Tripod: http://vyaskn.tripod.com/object_naming.htm
2. Look up Entity Relation Diagrams. What other ways of diagramming entities and relations did you
find?
There are thousands of sites on this topic. Most of what they will find is alternate ways of depicting the
entity as a box, with attributes attached as circles and relationships as triangles. Below is one example
from Wikipedia.
Wikipedia: http://en.wikipedia.org/wiki/Entity-relationship_model
3. Look for online tutorials on relational database design. Make a list of the five best. Share with the
About.com http://databases.about.com/cs/specificproducts/a/designmenu.htm
http://www.tekstenuitleg.net/en/articles/software/database-design-tutorial/intro.html
Practices
1. Create an entity to describe the products in a sandwich shop. These can include sandwiches, of course,
4-5
Copyright © 2014 Pearson Education, Inc.
Another document from Scribd.com that is
random and unrelated content:
saying to each other, “Fooled again!” So we imperfect sighted
mortals may be fooled with what we think are roses.
But to my story. The young woman was really handsome, and
quite well educated, though to be truthful, her education was
somewhat artificial, as the most of her life had been spent in a
convent school. On her father’s side of French descent; she was
born of lawful wedlock, and in a happy, well-to-do, prosperous
family. Cupid shot me with one of his best arrows soon after we
became acquainted, and I think she was also hit with the same
kind of weapon from the quiver of the famous little sportsman.
There seemed to be a mutual sympathy for each other in our
wounded hearts. The result was, as it generally happens in such
cases, we concluded to cure each other’s wounds, by joining hands
and hearts. The wedding took place at the home of the bride, with
great ceremony, and a large gathering of friends, and then this
Adam and his Eve returned to their garden of Eden, and all went
merry as a marriage bell.
It seemed as if I had now reached the acme of my desires,
wealth enough, a beautiful home, a fine library, flowers in our
garden, and above all—a wife. I had forgotten the story, as
probably most of us have, that there was a serpent even in the
garden of Eden, and I never thought that one could enter mine.
I had fine horses and carriages, so we could enjoy our drives. As
I have said, I subscribed liberally to all games and entertainments,
so we had frequent invitations, and were well received. We also
gave our little parties, which were well enjoyed. My wife was an
excellent pianist, and entertained our guests with music, in which
some of them took part. One of the most frequent callers was an
Hon. a young officer of one of the regiments, very gentlemanly in
appearance, of a high society family, well read, and one who had
traveled and seen the world. He had a good ear for music, and
played well, so he and my wife had something in common to
interest them, with which I was well pleased. He not only often
dined with us alone and with others, but before our evening drives
he frequently took tea with us on our veranda, and we talked on
various subjects, for he was an excellent conversationalist, full of
anecdotes and incidents, which he related in a very fascinating
manner. He had style, a quick appreciation of things, and what
interested me was his remarks on moral and religious subjects,
not connected with churches or creeds, but in their widest
meaning, and frequently with me alone he spoke of the beauty of
virtue and honor. He seemed to be a devoted church-goer,
belonged to the High Church party, was a stickler for ecclesiastical
forms, and often talked of the beauty of the services, and the value
of the sacraments.
Both my wife and myself were greatly pleased to have such an
acquaintance to relieve the monotony that rules even in our best
India stations. We had other friends whom we often saw, each
excellent in his way. We were happy and time passed rapidly. One
of the largest gatherings in the station was at the Birthday Ball,
when guests came from outside places. We attended the ball,
though I could not dance, yet I was very fond of music, and the
social part. My wife excelled in dancing and took great delight in
it, so she had plenty of partners, one of whom was our Hon.
friend, and he was about the best dancer of them all.
I had frequently to be absent for several days, to visit my
villages, and to look after my investments. I regretted these
absences for my wife’s sake, as she was timid at night, and besides
she appeared fond of my company, as I know I was of hers. One
day, as I was about to leave, our Hon. friend called, and during our
conversation asked me if he could take my wife out driving during
my absence. I replied that I would be most pleased to have him do
so, and suggested that they should use the phaeton, as it would be
more comfortable than a cart, and the horses needed exercise.
During my absence I congratulated myself on our happiness and
prosperity, and thought with pride of the pleasant reception of my
wife in the station.
So the months passed with nothing to cloud my happiness. One
day when I was in the garden, looking over my trees and flowers,
pruning a limb here and there, my head man or durwan, an elderly
Hindu, whom I had kept in my service for years, followed me
around. I saw by his manner that he had something to say to me,
so I asked “What is it, Ram Kishn?” He replied, “I have been with
the Sahib for years and have eaten his salt, and I would shed my
blood for him.”
“I know that, Ram Kishn, but what do you wish to say?”
“Sahib!” he said with hesitation, “I have often thought of telling
you something, but I was afraid. I have seen something that even
we poor ignorant idol worshipers—Kam ackl, bhut parast log, as
the Sahibs call us, think is not right.”
I quickly asked, “Has somebody been stealing my fruit or
flowers, or the bearer been cheating with the grain?”
“No, Sahib! nothing of that kind, something worse than that.”
I began to be impatient and said, “Out with it then, what is it?”
“Sahib, you know I love you, and think much of your izzat,
honor. I would let you beat me, or you might put your feet upon
me,” and he threw himself upon the ground toward me. I began to
be alarmed, thinking there must be something serious, or he
would not act in that way, for he was a very reliable, sensible man.
I told him to get up, and urged him to tell me what he meant. He
said, “I would rather die than say it, but I tell you for the sake of
your honor, I must tell you.” ‘Well, then tell it,’ I urged.
Said he, “If the sahib will not kill me with the knife in his hand.”
I hurled the knife away, and said, “There goes the knife,” and
then I folded my arms and stood waiting. He went on:
“Now, if the Sahib will not call me a liar, or the son of a dog, or
curse me.”
I held up my right hand and said: “Ram Kishn! I will eat an oath
before God, that I will not touch you with my hands or feet,
neither will I harm you with my words, if you tell me what you
mean.”
After a few moments, he said, “Sahib, you know the young Sahib
who comes here often, and sings with the Mem Sahib, who goes
out with her in the phaeton when you are absent?” I nodded my
head in reply. “Well, when you are gone to your villages—how can
I tell it, Sahib? he comes late at night when the lights are all out,
and the Mem Sahib lets him in, and he does not go away till early
next morning.”
I staggered and fell. He rushed to me moaning, “Sahib, forgive
me, what have I done? I have killed you!” Then he helped me to a
seat in the arbor.
It seemed my heart had stopped, and I was choking. He stood
with the palms of his hands together, bending towards me, and the
tears running down his cheeks.
For some time we were silent. I could not think, it seemed that I
had fallen from some house or tree and was insensible. After
awhile I said. “Ram Kishn, I don’t doubt that you believe what you
say, but there must be some mistake. It is impossible, impossible.”
Then he said, “Sahib, do not say a word, not even to the Mem
Sahib. I am the only one of the servants who knows this, for don’t I
watch on the front veranda when the Sahib is absent?”
“But, what shall I do?” I asked, for I was in such a dazed stupor
that I could not think.
He replied, “The Sahib is going away to-night. Go, but do not go
far from the station, and return here to this arbor at twelve
o’clock. Do not come before that time, or the servants will be
about, and we do not want them to know anything of this, and
then we’ll see that which is to happen, will happen.” I told him I
would do as he said, and that he should order the sais to have the
cart ready at five o’clock, and to have the bearer put in my luggage.
He replied that it should be just as I ordered.
I sat for awhile, and then started for a walk, somewhere,
anywhere, I did not know, or care. I did not wish to see my wife, as
I could not trust myself to meet her just then. As I expected, when
I returned, she had gone out with her Hon. friend for a drive in the
phaeton, so I started in the direction of my villages. I halted at a
village several miles from the station, telling the sais that I was ill,
and very ill I was, too. How long the hours were! How slowly the
minutes crept! I held my watch in my hand, counted the tick, ticks,
as if every one was taunting me with my wretchedness. So I waited
and ate grief for my dinner. Eleven o’clock came, and I turned
towards home. Home! How suddenly it had changed to Hell! I
formed no plans. I doubted, I feared, I hoped. Nearing the station
I went by a back lane to the stables, and taking the luggage myself,
went through the garden to the arbor. There I found Ram Kishn.
To show his sympathy in the dark, he took both my hands in his
and pressed them without uttering a word. After some moments of
silence I whispered, “Ram Kishn, is it,” and interrupting me, he
said, “We’ll see, sahib, come with me.” I followed him to a side
door which we entered, for it seems that he had quietly unfastened
this door. He lit the night lantern, and drew the slide to hide the
light, and we silently groped our way to our bedroom, yes, our
bedroom. As we entered it, he drew the slide, and there upon my
bed, our bed, they were both asleep in each other’s arms!
If I had been dazed before, I was paralyzed now. It was well that
I had formed no plan and taken no weapon, but it would have
been useless, as I could not raise my arms. I could not think; my
power of speech was gone.
In an instant, at the glow of the light, they both awoke with a
scream of fright. I turned and left the room.
Often since that terrible moment I have thought of what I
might, could, would or should have done. That is always the way.
Most people can think afterward, when it is too late for thinking.
But it was well that my guardian angel or something kept me from
taking a pistol or even a stick in my hand. It has all passed, except
the sad remembrance, and I console myself with the thought that
when one has done his best, that whatever is, is best.
I went out into the darkness, wishing that it could engulf and
hide me forever. On and on for miles down the metaled road,
thinking, but all my thoughts ran into a delirium.
When the morning sun shone into my face, I found myself
seated on the sand by the roadside looking toward home. Home! I
had none. It had vanished in the darkness. Strange, is it not, that
after a lapse of years old scenes will suddenly flash upon one? It is
true that a thousand times I had thought of my mother, but at that
moment I saw the dear little mama, with those beautiful eyes wide
open, looking, looking while her heart was breaking, dying! I could
realize her bitter sorrow, for was not my heart breaking too?
These thoughts of her brought me to life again, to the
maddening reality of my own condition. I arose and went back to
my infamy and disgrace. I felt but little anger, as the
consciousness of my degradation overwhelmed me, and despair
paralyzed all my feelings.
As I entered the house, I saw my wife—how I hated that word
then—seated in the drawing room. She did not look at me, and I
passed on into my private room. When I came out again, she
sprang toward me, but I retreated, saying, “Don’t come to me,
never touch me again.” She threw herself upon the floor, wailing
and begging me to forgive her. My heart was stone, my whole body
dead to her. After a while she took a seat and I listened in silence,
while she told me all. How the Hon. had flattered her, deceived
and so seduced her, that at the Birthday Ball, after a waltz
together, he had taken her into the kala jagah—well is it named the
black place—and then had taken liberties with her, and then on
and on—why repeat the hateful story?
By the time she had finished I had formed my plan, and said
this to her, “Your Hon. seducer will probably not tell of this. The
only one else who knows it is Ram Kishn, and he will not tell, and
we need not say anything. We can live in hell here, and that is
enough, without telling others to have them add fuel to the flames.
You can have that side of the house entirely to yourself. One of the
rooms you can use as a dining room, and you can have the carriage
for your evening drives. I will keep this side of the house for
myself, and we’ll live as never seeing each other.”
The thought of the pleasant life we had passed, and of this
horrible life coming, made me exclaim, “What infamous crimes
were my ancestors guilty of, that I should be cursed like this? Why
should I be damned for the sins of that villainous father of mine?”
At this she asked, “Am I not to be your wife again?”
“My wife!” I exclaimed; “No, never, never again. Your purity is
gone. You are polluted for me. You have violated all your rights,
not by a sudden passion, but deliberately, time and again. You
took advantage of my absence. You have done your best to degrade
me, to ruin me, and to pollute yourself. You have not the slightest
claim on me for any rights or privileges. As for love, such as I had
for you yesterday, my heart is now dead to you. I forgive you, pity
you, and will provide every comfort for you, but you are not my
wife except in name, and never can be.”
She fell back in a swoon, and I called her ayah, waiting woman,
and left the room.
What else could I do? Since then I have often thought of what I
did, and my conscience has never condemned me. I acted toward
her as I would have had her act toward me if the circumstances
were changed. Had I broken my loyalty to her in but one instance,
she would have been right in dealing with me as I dealt with her. I
do not believe in two codes, one for erring men, and another for
erring women. If men demand virtue in their wives, and cast them
off when they fall, then let the men apply the same law to
themselves. The man who has commerce with more than one
woman, is as guilty as the woman who has had commerce with
more than one man. If immorality is wrong in a woman, why not
in a man? Why should the man have the right to transmit the
curse of sensualism or debased appetite to his children more than
the woman? Why should a woman in marriage take up a damaged
article of a man, any more than a man a disreputable woman for a
wife?
Asks a Danish novelist, “Is a woman who has had no
relationships with a man before marriage entitled to expect the
same in her husband? Is a man who has had relationships with
other women before marriage entitled to complain of his wife who
has had such relationships?” Another gives this paragraph—a
conversation of a father with his daughter. “There,” he says, “is
woman’s noblest calling.” “As what?” asks the daughter. “As what!
Have you not listened? As—as the ennobling influence in
marriage, as that which makes men pure, as—” “As soap?” she
suggests. “Soap?” asks he, “what makes you think of soap?” “You
make out that marriage is a great laundry for men. We girls are to
stand ready, each at her wash-tub with her piece of soap. Is that
how you mean it?”
Once conversing with a young man, a full-blooded European in
high position, from a remark of mine he was led to ask, “Do you
think that children will inherit the disease of their father?”
“Inevitably,” I replied, “and I do not believe that God himself can
or will avert this natural law.” He replied, with a tremor in his
voice, “I am very sorry to hear you say that, as I am going to be
married in a few days.” I changed the subject, and made another
remark, when he asked, “Don’t you believe in the blood of Jesus to
atone for our sins?” “No,” said I, “not at all.” “Well!” he exclaimed,
“if I did not believe in that, I do not know what I should do.”
His was a strange mixture of practice and belief, like vice and
virtue sleeping in each other’s arms in the same bed. Living in the
midst of sin, diseased, and about to commit the meanest of frauds
by marrying a pure, noble girl, and yet professing to believe in
Jesus, the purest of men, who denounced lust in the severest
terms, and taught that even lustful desire was as criminal as
adultery. Why should there not be pure-minded, physically clean
men, for fathers, as well as pure-minded and beautiful women for
mothers?
Why not, in the name of all that is just and holy, demand of men
the same chastity that they demand of women?
I know this is not the rule in “society”; that there are many men
who claim to be men of honor, gentlemen, and many of them
professing Christians, who glibly talk about the beauty of chastity
and virtue, and yet who feed in every pasture as if they had a right
there, but if their wives step aside, then the devil is to pay, and all
that.
I acted according to my sense of justice—one law for both sexes,
so how could I have done otherwise than I did?
What of the Hon. gentleman, an officer in her majesty’s service?
I might have shot him, and been hung for it, as that is justice
according to English law. I might have exposed him and created a
scandal, to be myself despised as a cuckold, and he be patted on
the back by his gentlemen comrades, or laughed at for being
caught. Such an escapade, by what I have read and heard, is
winked at by mothers in English “society,” and constituents would
not hesitate in making such a man a member of Parliament.
“Young men will sow their wild oats,” is their excuse. “It is only an
exuberance of gaiety—a youthful indiscretion,” say they.
An English writer, a member of Parliament, so the statement is
not to be doubted, said in a newspaper article that “An
Englishman is never so happy as when stealing his neighbor’s
wife,” so the Hon. may still be happy stealing other men’s wives, as
he stole mine. But then she was only an “Eurasian,” the wife of
that “damned Eurasian,” and so fit game for an Hon. or any other
gentleman.
I went to Ram Kishn, and he followed me into the arbor where
we could be alone. I told him what I had done. He replied, “Sahib,
I am a poor, ignorant, bhut parast, and have no more sense than if
I was brother to a donkey, yet I think you are doing right.” “Now,
Ram Kishn,” I inquired, “you will never tell a word of this?” He
thrust out his tongue, with his teeth upon it, as if to say, if it ever
utters a word may it be bitten off. And his tongue ever remained
true and unbitten.
We two lived in this way in a divided house, not a home. Talk
about hell fire! It could not be worse than what I endured and
suffered during the long and dreary months while we lived and
died a living death in every day. I provided everything I could for
her comfort, the best of servants, the choicest kinds of food, books,
magazines and illustrated papers. She had her drives, but alone,
the carriage was for her and no one else. We seldom met, and then
only for a word or two, when I asked if she needed anything. I
think, as she became conscious of her sin against me, she
respected me for the course I took.
She fell ill. I got the best medical attendance and nurses. The
end was approaching, and then she sent for me, and confessed
again that she had wronged me, and almost cursed that Hon.
gentleman who, by his pious talk and seductive flatteries, had led
her astray, and held her in his power, spellbound and powerless as
the serpent holds the poor, weak bird, and destroyed our love and
home. Why should she not curse him? “For cursed be the heart
that had the heart to do it.” She did not blame me for what I had
done. My kindness and consideration had made her love me more
than ever. She had repented with bitter tears, until her heart was
broken, and now, at the close of her life, ending so sadly, she
wanted my forgiveness, which I gave most freely. She begged a
parting farewell kiss, which I had no desire to refuse, and she
departed, once the life of my life, but now no more.
Did I not suffer, and for her? Did I not live down in the valley of
despair, and under the shadow of death, all those months and for
her sake? I would have given all I possessed, even life itself, to
have restored her to me as she once was—my wife.
I buried her body in a beautiful spot in the cemetery, in silence,
as not a prayer or funeral note was uttered, for I had been so
damnably wronged by my Christian father, and this Hon.
Christian gentleman who had murdered my love, whom I had
often seen, hail fellow, well met, with the chaplain, and had
noticed in church piously reciting the prayers, that I hated
everything associated with him, and wished to have neither priest
nor prayers.
My wish is, that if there be a devil, he may get this seducer and
give him his just dues, as I would wish to see a murderer caught
and hung. I believe in justice to sinners as well as to saints.
Some might say, “Why not have charity?” and my reply would
be,
“Urge neither charity nor shame to me,
Uncharitably with me have you dealt,
And shamefully by you my hopes are butchered,
My charity is outrage, life my shame
And in that shame still lives my sorrow’s rage.”
“The great mistake is, that salvation from sin is made so easy; is
considered so cheap a thing, that few pay any attention to it. Make
men understand that their eternal destiny is of their own making
—with the help of God always—that no mediation, intercession of
others can possibly change their evil nature, or do away with the
fearful consequences of the violation of God’s law. I would not
smooth over anything. I would show them that the most difficult
thing in life is to be good, and yet that every difficulty can be
overcome and the way become delightfully pleasant if the mind
and strength of the heart and soul are inclined to it. When a man
has wasted his life, sucked the sweets from every flower to gratify
his pampered appetite, and the fires of his passions have gone out,
he becomes devout, builds a church, endows a hospital, says his
prayers, and is cock sure of heaven, as if the eyes of justice were
blind and the record of his misspent life could be erased by a few
donations of money or the mumbling of a few prayers!
“Away with all such cant and hypocrisy! Money can do a great
deal on earth, for all on it, even immortal men are purchasable,
but it would be blasphemy to think that the justice of Heaven
could be thwarted by bribes, or the records of wrong-doing be
washed away by a few tardy tears.
‘Yet here’s a spot,
Out damned spot! Out I say,
What! will these hands never be clean!
Here’s the smell of blood still;
All the perfumes of Arabia will not sweeten this little hand.’
Said he, as he arose to go, “I hope I have not tired you. I have
talked enough, so I will practice a little by seeing my poor families,
for wishing the poor to be fed without giving them bread, would
not be satisfactory to them now, nor to me hereafter.”
Such was Mr. Jasper. I liked him for his honesty and sincerity. I
doubt if he ever uttered a word but what he believed, and what he
said he felt, as if it was a part of himself.
CHAPTER XVI.