ago
40 views
1 1 vote

A relation contains four tuples for course $\text{CS 186}$, and every tuple stores the teacher as $\text{Hellerstein}$.

Lets consider the set of data is as follows :

\[
\begin{array}{|c|c|c|c|c|c|}
\hline
\text{Course} & \text{Teacher} & \text{Room} & \text{Hour} & \text{Student ID} & \text{Grade} \\
\hline
\text{CS 186} & \text{Hellerstein} & \text{Soda 306} & \text{12:30 TR} & \text{2154} & \text{A} \\
\hline
\text{CS 186} & \text{Hellerstein} & \text{Soda 306} & \text{12:30 TR} & \text{1129} & \text{A} \\
\hline
\text{CS 186} & \text{Hellerstein} & \text{Soda 306} & \text{12:30 TR} & \text{8510} & \text{AB} \\
\hline
\text{CS 186} & \text{Hellerstein} & \text{Soda 306} & \text{12:30 TR} & \text{4243} & \text{C} \\
\hline
\text{CS 286} & \text{Stonebraker} & \text{Cory 150} & \text{11:00 TR} & \text{9821} & \text{C} \\
\hline
\text{CS 286} & \text{Stonebraker} & \text{Cory 150} & \text{11:00 TR} & \text{8435} & \text{A} \\
\hline
\text{CS 286} & \text{Stonebraker} & \text{Cory 150} & \text{11:00 TR} & \text{2835} & \text{A} \\
\hline
\text{CS 150} & \text{Patterson} & \text{Soda 505} & \text{1:00 TRF} & \text{7235} & \text{AB} \\
\hline
\text{CS 150} & \text{Patterson} & \text{Soda 505} & \text{1:00 TRF} & \text{8510} & \text{AB} \\
\hline
\text{CS 150} & \text{Patterson} & \text{Soda 505} & \text{1:00 TRF} & \text{2449} & \text{AB} \\
\hline
\text{CS 170} & \text{Blum} & \text{Soda 405} & \text{2:25 MWF} & \text{9821} & \text{B} \\
\hline
\text{CS 170} & \text{Blum} & \text{Soda 405} & \text{2:25 MWF} & \text{8510} & \text{A} \\
\hline
\text{CS 170} & \text{Blum} & \text{Soda 405} & \text{2:25 MWF} & \text{2154} & \text{BC} \\
\hline
\end{array}
\]

Suppose the teacher changes to $\text{Garcia}$, but only three of the four tuples are updated.

What problem has occurred?

  1. Insertion anomaly
     
  2. Deletion anomaly
     
  3. Update anomaly
     
  4. No anomaly, because different tuples may store different teachers for the same course

1 Answer

1 1 vote

$\text{Teacher}$ information is stored repeatedly because several $\text{student}$ tuples correspond to the same $\text{course}$.

Initially, the relation contains repeated copies of the fact:

$\text{CS 186} \rightarrow \text{Hellerstein}$

If the teacher changes, every copy must be modified.

Suppose three rows become

$\text{CS 186} \rightarrow \text{Garcia}$

while one row still contains

$\text{CS 186} \rightarrow \text{Hellerstein}$

The database now represents two conflicting values for the same fact.

This inconsistency is caused by redundant storage and a partial update.

Therefore, this is an update anomaly.

Hence, the correct answer is C.

ago
Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
47
47 views
GO Classes asked 3 days ago
47 views
Consider the single relation containing $\text{Course, Teacher, Room, Hour, StudentID, Grade}$.\[\begin{array}{|c|c|c|c|c|c|}\hline\text{Course} & \text{Teacher} & \text{...
2 2 votes
2 2 answers
90
90 views
GO Classes asked 3 days ago
90 views
Consider relation $R(A,B,C,D,E,F)$ with$A\to B$$A\to C$$F\to D$$F\to E$Suppose $R$ is decomposed into $R_1(A,B,C)$ and $R_2(D,E,F)$.Which statement best describes this de...
1 1 vote
1 1 answer
61
61 views
GO Classes asked 3 days ago
61 views
A redundant relation is decomposed appropriately to improve its logical database design.Which of the following benefits can be relied upon as a purpose of the decompositi...
1 1 vote
1 1 answer
42
42 views
GO Classes asked 3 days ago
42 views
Consider $\text{Postings(post, position, user, ptext)}$.Two aliases of this relation are used:$\text{P1 = Postings}$$\text{P2 = Postings}$Consider the query:SELECT count(...