Question

In: Computer Science

Answer these theory questions: a. Explain the referential integrity rule. Provide a suitable situation when the...

Answer these theory questions:

a. Explain the referential integrity rule. Provide a suitable situation when the referential integrity constraint is violated.

b. Consider a relation named STUDENT_ ACCOMMODATION (StudentID, Buidling, AccommodationFee) as shown in the figure below. Explain why this relation is in 2NF but not in 3NF.             

StudentID

Building

AccommadtionFee

101

Alpha

$320

102

Betta

$250

103

Alpha

$320

104

Betta

$250

105

Gemma

$400

c. Explain the purpose of transaction logs and checkpoints.

d. Compare and contrast Data Warehousing against Database.

Solutions

Expert Solution

(a)REFERENTIAL INTEGRITY RULES:

(1)RESTRICT: It does not allow the updation or deletion of the referenced data.

(2)SET TO NULL: When the referenced data is deleted or updated then the dependent values is set to NULL.

(3)SET TO DEFAULT: When the referenced data is deleted or updated then the dependent values is set to a default value.

(4)CASCADE: When the referenced data is deleted or updated then the all the dependent values are deleted.

Example for referential integrity violation:

(1)Consider two tables A(a1(primary key),a2,a3) and B(b1(primary key),b2(foreign key),b3).

(2)Consider the deletion takes place in the table A.Now the foreign key b2 in the table B refers to the primary key of a1.

(3)The value that is being referenced in the table B is not present in the table A.This leads to the violation of referential integrity constraint.

(b)

(1)The functional dependencies that holds on the table is StudentId -> Building and Building->AccommodationFee.

(2)Now the table is in 2NF because there is there is no partial dependency.(part of the key-> Non key attribute).

(3)Now the table is not in 3NF because of the functional dependency Building->AccommodationFee.

(4)For the table to be in 3NF then there shouldn't be any transitiove dependencies(A->B , B->C => A->C).

(c)

TRANSACTION LOGS:

(1)Transaction logs are the separate files where the updation that is made into the database are stored for a temporary period of time.

(2)After the commit operation operation of the transaction, the log files are permanently updated in the actual database.

CHECKPOINTS:

(1)Checkpoints in the transaction ensures that the changes that are performed are permanently updated.

(2)After the checkpoints the changes have not been updated.

(3)It ensures that the database before the checkpoint is in consistent state.

(d)

DATAWAREHOUSE:

(1)Datawarehouse is a place where all kinds of data are stored.

(2)The size of the data in the datawarehouse is very much larger in size compared to the database.

(3)The data that is stored in the datawarehouse is huge and historical.

DATABASE:

(1)Database stores similar kinds of data.

(2)The size of the data stored in the databases are very small compared to the datawarehouse.

(3)The data that is stored in the database is very small.


Related Solutions

Using a simple relation of your own choice and example, explain Entity Integrity and Referential Integrity.
Using a simple relation of your own choice and example, explain Entity Integrity and Referential Integrity.
QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with...
QUESTION 1 a. What are referential integrity constraints? Please explain with an example. b. Explain with an example the GROUP BY/HAVING clause
Please read carefully the following case study and provide a suitable answer to its questions. A...
Please read carefully the following case study and provide a suitable answer to its questions. A male baby born after a normal pregnancy appeared to be healthy until after the third day after his birth. He became lethargic, hypnotic (low muscle tone), his breathing was shallow and lead to apnea. First, he was hooked up to a mechanical respirator. A blood sample was taken to the lab and found that his plasma ammonia level was 474 µmol/L. As a healthcare...
Explain utility maximization rule with an example. Explain utility maximization rule with an example. please answer...
Explain utility maximization rule with an example. Explain utility maximization rule with an example. please answer my question as soon as possible
Explain the effects of each situation below on the market demand and supply using suitable diagrams....
Explain the effects of each situation below on the market demand and supply using suitable diagrams. A new skirt design which increases the preferences for the Asshanas clothing brand among teenagers.                                                                                                              A government ban on the supply of meat from New Zealand.                                    The increased price of chicken feed and hos this affects the chicken market.              The effects of the Goods and Services Tax (GST) on smartphone purchases.              
Explain the effects of each situation below on the market demand and supply using suitable diagrams....
Explain the effects of each situation below on the market demand and supply using suitable diagrams. a. A new skirt design which increases the preferences for the Asshanas clothing brand among teenagers.​​ b. A government reduce the import rate on the supply of meat from New Zealand. c. The decrease in price of chicken feed and hos this affects the chicken market. d. The effects of the Goods and Services Tax (GST) on smartphone purchases.
John Rawls is popular for his theory, justice as fairness. With a suitable diagram, explain the...
John Rawls is popular for his theory, justice as fairness. With a suitable diagram, explain the theory.
Please provide me a correct and clear answer for these questions. 1. explain the growth curve...
Please provide me a correct and clear answer for these questions. 1. explain the growth curve of bacteria e coli? 2. Draw, label, explain function of each part in cstr bioreactor? 3. types of impeller with picture ? Thanks in advance
Is utility theory a positive or normative theory? explain your answer.
Is utility theory a positive or normative theory? explain your answer.
Answer the following questions with references and citations. 1. Explain, with the use of examples, when...
Answer the following questions with references and citations. 1. Explain, with the use of examples, when it would be appropriate to use trademarks and copyright to protect a firm’s intellectual property. Other than through the use of patents and copyright, how can a firm prevent its competencies from being imitated? 2. How can late entrants win the innovation race? Please give two examples. 3. Considering the case study, discuss some of the wider strategic reasons why firms may wish to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT