Get Introdução A Sistemas de Bancos de Dados C. J. Date Free All Chapters
Get Introdução A Sistemas de Bancos de Dados C. J. Date Free All Chapters
Get Introdução A Sistemas de Bancos de Dados C. J. Date Free All Chapters
com
http://ebookstep.com/product/introducao-a-sistemas-de-
bancos-de-dados-c-j-date/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookstep.com/product/sistemas-de-banco-de-dados-7th-
edition-ramez-elmasri-shamkant-b-navathe/
https://ebookstep.com/product/verbinding-verbroken-1st-edition-j-
c-a-de-meij/
https://ebookstep.com/product/sistemas-de-controle-modernos-11th-
edition-richard-c-dorf-robert-h-bishop/
https://ebookstep.com/product/manual-de-analisis-de-frecuencias-
en-hidrologia-first-edition-aparicio-j-gomez-j-patino-c/
O Homem de Giz 1st Edition C. J. Tudor
https://ebookstep.com/product/o-homem-de-giz-1st-edition-c-j-
tudor/
https://ebookstep.com/product/a-morte-de-sarai-j-a-redmerski/
https://ebookstep.com/product/introduccion-a-la-ingenieria-de-
sistemas-1st-edition-jose-ignacio-quevedo-gomez/
https://ebookstep.com/product/a-acao-no-direito-processual-civil-
brasileiro-colecao-obras-de-j-j-calmon-de-passos-1st-edition-j-j-
calmon-de-passos/
https://ebookstep.com/product/o-retorno-de-izabel-j-a-redmerski/
C. J. Date
Introdução a Sistemas de
BANCOS DE DADOS
Tradução da 8ª Edição Americana
Tradução
Daniel Vieira
Revisão Técnica
Sergio Lifschitz
Professor do Departamento de Informática da PUC-Rio
25a tiragem
Do original:
An Introduction to Database Systems.
Tradução autorizada do idioma inglês da edição publicada por Addison-Wesley.
Copyright © 2004 by Pearson Education, Inc.
Todos os direitos reservados.
Todos os direitos reservados e protegidos pela Lei 9.610 de 19/02/1998. Nenhuma parte
deste livro, sem autorização prévia por escrito da editora, poderá ser reproduzida ou
transmitida sejam quais forem os meios empregados: eletrônicos, mecânicos,
fotográficos, gravação ou quaisquer outros.
Editoração Eletrônica
Estúdio Castellani
Capa
Olga Loureiro
Desenvolvimento de eBook
Loope – design e publicações digitais | www.loope.com.br
Projeto Gráfico
Elsevier Editora Ltda.
Conhecimento sem Fronteiras
Rua Sete de Setembro, 111 – 16º andar
20050-006 – Centro – Rio de Janeiro – RJ – Brasil
ISBN 978-85-352-8445-4
Edição original: ISBN 0-321-19784-4
Nota: Muito zelo e técnica foram empregados na edição desta obra. No entanto, podem
ocorrer erros de digitação, impressão ou dúvida conceitual. Em qualquer das hipóteses,
solicitamos a comunicação ao nosso Serviço de Atendimento ao Cliente, para que
possamos esclarecer ou encaminhar a questão.
Nem a editora nem o autor assumem qualquer responsabilidade por eventuais danos ou
perdas a pessoas ou bens, originados do uso desta publicação.
Capa
Folha de rosto
Copyright
Comentários sobre o livro
Dedicatórias
Epígrafe
O Autor
Sumário
Prefácio à oitava edição
__________________________
CAPÍTULO 5 Tipos
5.1 Introdução
5.2 Valores versus variáveis
5.3 Tipos versus representações
5.4 Definição de tipo
5.5 Operadores
5.6 Geradores de tipos
5.7 Recursos de SQL
5.8 Resumo
Exercícios
Referência e bibliografia
CAPÍTULO 6 Relações
6.1 Introdução
6.2 Tuplas
6.3 Tipos de relações
6.4 Valores de relações
6.5 Variáveis de relação
6.6 Recursos de SQL
6.7 Resumo
Exercícios
Referências e bibliografia
CAPÍTULO 7 Álgebra relacional
7.1 Introdução
7.2 Revendo o fechamento
7.3 A álgebra original: sintaxe
7.4 A álgebra original: semântica
7.5 Exemplos
7.6 Para que serve a álgebra?
7.7 Pontos avançados
7.8 Operadores adicionais
7.9 Agrupamento e desagrupamento
7.10 Resumo
Exercícios
Referências e bibliografia
We may quote a parable from the Quran. “And set forth to them a
parable of two men. For one of them we made two gardens of grape
vines, and we surrounded them both with palms, and in the midst of
them we made corn-fields. Both these gardens yielded their fruits
and failed nothing. We caused a river to gush forth in their midst.
The man possessed much wealth and he said to his companion while
he disputed with him: I have greater wealth than you and am
mightier in followers. While he entered his garden he was unjust to
himself. He said: I do not think that this will ever perish. I do not
think the hour will come, yet even if I return to my Lord I shall most
certainly find a place better than this. His companion said to him,
while disputing with him: Do you disbelieve in Him who created you
from dust, then from a small germ life, then he made you a perfect
man? But as for me, Allah is my Lord and I do not associate any one
with my Lord. When you entered your garden, why did you not say:
It is as Allah has pleased. There is no power save Allah. If you
consider me to be inferior to you in wealth and children, perhaps my
Lord will give me something better than your garden, and send on it
a reckoning from heaven, so that it shall become even ground with
no living plant. Or the waters may sink into the ground so that you
are unable to find them. His wealth was indeed destroyed, and he
began to wring his hands for what he had spent on it. While it lay
there (for it had fallen down from the roofs) he said: Ah me! would
that I had not associated anyone with my Lord. He had none to help
him besides Allah nor could he defend himself. In Allah, alone is
protection, the True One. In the bestowal of reward and in requital
he is best.
Set forth to them also the parable of the life in this world. It is like
the water which we send down from the clouds on account of which
the herbs become luxuriant. Then these become dry, break into
pieces and the winds scatter them. Allah holds power over all things.
Wealth and children are an adornment of the life of this world. The
good works, the ever-abiding, are with your Lord better in reward
than in expectation”.[48]
How fleeting are our worldly gains, and how foolish are we in
feeling proud of them! Let us then, live as meek and humble
servants of God on earth.
FRIENDSHIP AND SINCERITY[49]
Friendship is one of God’s favours, says the Quran. And hold fast
by the covenant of Allah all together and be not disunited, and
remember the favour of Allah on you when you were enemies, then
He united your marts so by His favour you became brethren[50]. The
Prophet says: Those amongst you are my close companions who
have good dispositions, are affectionate and tenderly love each
other. And again: “God when He shows His kindness towards any
person gives him a Good friend.”[51] “Verily God will say on the day
of resurrection where are those who loved each other for my sake;
today they shall rest under my shelter when there is no other
shelter.”[52]
“Seven kinds of men will, on the Day of Judgment, rest under His
shelter when there will be no other shelter:—(1) A just Imam, (2) An
adult who is devoted to God, (3) A man who after coming out from
the mosque finds his heart attached to it till he enters again, (4) Two
friends who lived and died in their friendship for God’s sake, (5) He
who for fear of the Lord wept in secret, (6) He whom a beautiful
woman of good birth allures but he replies: I have fear of my Lord,
(7) He who gives alms in a manner that his left hand does not know
what is given by his right hand.”[53]
Friendship, then, is God’s favour and should be cultivated for His
sake. But if we shun the company of our fellowmen let it also be for
God’s sake. “The strongest rope of Faith”, says the Prophet, “is love
and hate both for God’s sake.”
Christ says, “Love God by avoiding the wicked; seek His nearness
by shunning their company and please Him by courting their
displeasure.” “With whom should we keep company, O Word of God”,
asked the people. And Christ replied, “Sit with those whose
appearance reminds you of God, whose words add to the stock of
your knowledge and whose actions serve as an incentive for
acquiring the kingdom of Heaven.”
God spoke to Moses saying, “Son of Amran be up and find out a
friend for thee and he who would not be with thee for my good will
is thy enemy.”
Choose a friend who has five qualities viz: wisdom, good
disposition, abstinence from sin, heresy and greed.
A fool’s company gives no good, it ends in gloom. Good disposition
is necessary in as much as a man may be wise but be subservient to
his inordinate passion and hence unfit for company. And a sinner
and a heretic are to be avoided for the simple reason that they who
have no fear of the Lord and are regardless of committing forbidden
actions are not to be relied on. Besides contagion will secretly
spread and he too will think of sin lightly and gradually lose power of
resisting it. And a greedy worldling is to be avoided because his
company will deaden the heart in the quest of the kingdom of
Heaven.
Alkama on his death bed gave a fine description of a friend. “My
son”, said he, “If you wish to keep company try to find out such a
friend who, when you live with him defends you, adds to your
prestige, bears the load of your hardships, helps you in your doings,
counts your virtues, dissuades you from vices, readily responds to
your requests, inquires himself for your needs when you keep quiet,
shows his deep sympathy in your sufferings, bears witness to your
sayings, gives good advice when you intend to do some work and
prefers you to his own self when difference arises between you and
him.” This piece of advice gives the qualities of a friend in a nutshell.
When Caliph Mamun the Abbaside heard of it, he said, “Where
should we find such a friend”. And Yahya replied, “Alkama’s
description means that we should live in retirement.”
Imam Jafar ‘Assadiq’ (the veracious) gives a negative description
of a friend. “Do not keep company with five sorts of men viz: a false
man who deceives you like a mirage; a fool who cannot benefit you,
(even if he tries to do so he would do harm through his foolishness;)
a miser who when you need his help the most, severs himself from
you; a coward who will leave you when you are in danger; a wicked
sinner who will sell you for a piece of bread.”
Sahl of Taster says, “Avoid the company of 3 kinds of men, (1)
tyrants who forget God, (2) Ulamas who practise dissimulation, (3)
Sufis who are ignorant.”
It must be remembered here that the above passages serve as an
ideal but for purposes we should look to the present practical
conditions and try to get as much good as may be had from them.
For man’s life seems dreary when he has no friends. And men are
like trees. Some are fruit-bearing and shady, some are shady only
and some are mere thorns and thistles. Similarly some friends are a
blessing both here and hereafter; some are for worldly gain for the
world is a shadow, and some are of no good in this world and the
next as if they are scorpions in human form.
“And they were not enjoined anything except that they should
serve Allah, being sincere to Him in obedience, upright, and keep up
prayer and pay the poor rate (zakat) and that is the right religion”.
[54] “Then serve God, being sincere in religion unto Him, Aye, God’s
is the sincere religion”. Musab says that his father Saad was
considering himself superior to other poor and destitute companions
of the Prophet. “God”, said the Prophet, “has helped my people with
my poor and humble followers’ prayer and sincerity.”[55] “Sincere
action,” says the Prophet “even if it be little will suffice for thee.”[56]
The following saying of the Prophet is reported by Abu Huraira:
“Three persons shall be questioned first on the day of resurrection.
One will be the learned man who would be asked as to what he had
done with his learning”. “Day and night,” the learned man will reply
“I tried my best to propagate it, O Lord”. “Thou speakest falsely”,
God will answer and the angels will also join with him. “Thy sole aim
was to be called a learned man by the people, and the title was
thine”. The second will be the rich man who would be asked about
his riches. “Day and night”, the rich man will reply, “I gave it in
charity.” “Thou speaker of untruth”, God and his angels will say.
“Thou wishest to be labelled a generous man, and it was done”. The
third will be the martyr who too will be asked about his deed. “O
Lord”, the martyr will reply, “Thou didst command us to wage Holy
war (Jehad), I obeyed thee and fell fighting”. “Thou liest,” God and
His angels will answer. “Thy aim was to be trumpeted as a hero and
it was done”. “Then,” says Abu Huraira, “the Prophet after finishing
the sermon pressed me and said: These three would be the first to
be thrown into the flames of hell”.
In the narratives of the Israelites, a story is told of a certain
devotee who had served God for many years. Once he was informed
of the apostacy of a tribe, which, forsaking the true worship of
Yahweh had taken to tree worship. The hermit filled with the spirit of
the “jealous” God took an axe and set out to level the tree to the
earth. But the devil in the shape of an old man met him on the way
and inquired of his intention. The hermit told him of his
determination, whereupon Satan addressed him thus: “Why on earth
are you leaving aside your prayers and vigils and devoting yourself
to other work!” “But this too is a sacred cause” replied hermit. “No,
nor will I allow you to do so” exclaimed the devil. Whereupon the
hermit in the white heat of his pious rage caught hold of the devil
and forcibly held him down. “Spare me Sir”, begged the devil, “I
have something to say to you.” The hermit let him go. Then spoke
Satan; “I think God has not commanded you to do this thing. You do
not worship the tree, you are not responsible for the sins of others.
If God wills it he will send some prophet, and they are so many, who
would carry out his order. So I think it is not your duty, why then
trouble yourself?” “But I belong to the chosen people of Yahweh,
and I am in duty bound to do so”, replied the hermit. Whereupon
they again began to wrestle and eventually Satan was thrown down.
“O! I see” cried Satan. “An idea has just come into my mind; let me
go please, and I will tell you.” Thus obtaining his release, the Evil
One addressed him as follows: “Is it not the case that you are poor
and have to live on the alms of those who are devoted to you? But
in your heart of hearts you would like to shower your bounties on
your brethren and neighbours so generous and compassionate is
your nature. What a pity that such a noble soul lives on alms”. “You
have read my mind aright,” quietly responded the hermit. “May I
hope,” said the Evil One entreatingly, “that you will be pleased to
accept two golden dinars which you will find at your bed side every
morning from tomorrow. You will then be relieved of depending on
others and be in a position to do charity to your poor relations and
brethren. As for that wretched tree, what if that be cut down. Surely
your poor needy brethren would get nothing and you would lose the
opportunity of helping them while the tree would grow again”. The
hermit pondered over these words and said to himself “This old man
speaks quite reasonably, but let me think over the pros and cons of
the case. Am I a prophet? No, I am not; therefore I am not bound to
cut it down. Am I commanded to do so? No. Then if I do not do it I
shall not be guilty of the iniquity. Should I accept his proposal? No
doubt from the religious point of view it is more useful. No doubt. I
think I should accept it: yes, I must.” Thus the two pledged their
words and the hermit returned. Next morning he found the two
dinars at his bed side and was highly pleased. Another morning the
glittering gold was there, but on the third morning the hermit
searched for them in vain. His fury knew no bounds. He rushed for
his axe, and hurried with it towards the place of idolatry. Satan again
met him in the way as before. “Thou wretch, thou arch-devil”, cried
out the hermit “wilt thou prevent me from my sacred duty?” “You
cannot do it, you dare not do it”, retorted the Evil one. “Hast thou
forgotten the test of my powers”, sharply replied the infuriated
hermit and rushed at him. But to his great discomfort and
humiliation the hermit instantly fell flat on the ground like a dry leaf
from a tree. The devil planted his foot on his chest, holding him by
the throat, dictating the following terms: “Either swear not to touch
that tree or be prepared to die”. The hermit finding himself quite
helpless said, “I swear, but tell me why I am so discomfitured”.
“Listen”, answered Satan. “At first thy wrath was for God’s sake, and
zealous vindication of his commandments. Hence I was defeated,
but now thou art furious for thyself, and worldly gain”. The story
illustrates the saying “I will certainly cause them all to deviate from
the way except thy servants from among those who are sincere”. A
devotee cannot be immune from Satan’s temptation except by
sincerity and therefore saint Maaruf of Karkh used to upbraid
himself, saying: “If thou wishest salvation, be sincere”.
Yacub, the Sufi, says: “He who conceals his virtues like vices, is
sincere.” In a dream a man saw a Sufi who was dead and inquired
about the actions of his previous life. “All those actions” said the
Sufi, “which were for God’s sake I was rewarded for, even the least
of them. For example, I had thrown aside a pomegranate’s peel from
the thoroughfare. I found my dead cat but lost my ass worth one
hundred dinars, and a silken thread on my cap was found on the
side of iniquities. Once, I gave something in charity, and was pleased
to see people looking at me,—this action has neither reward nor
punishment for me”. “How is it that you got your cat and lost your
ass?” said the man to the Sufi. “Because”, responded the latter,
“When I heard of the death of my ass I said: ‘Damn it’. I ought to
have thought of God’s will”. Saint Sufyan Saori, when he heard of
this dream, said, “The Sufi was fortunate as no punishment was
meted out to him for that charity which pleased him when people
watched him”.
There is a report that a man, putting on a woman’s dress used to
frequent purdah parties in marriage and funeral processions. Once a
lady’s pearl was lost in a party. Everybody was being closely
searched, and the man was very much afraid of the disclosure of his
identity, as it would mean the loss of his life. He sincerely repented
in his heart, never to do the same thing again, and asked God’s
forgiveness and help. Then he found that it was now the turn of
himself and his companion to be searched. His prayer was heard,
the pearl being found in his companion’s clothes and he was saved.
[57]