Question

In: Computer Science

Consider a relation named STUDENT_ ACCOMMODATION (StudentID, Buidling, AccommodationFee) as shown in the figure below. Explain...

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

Solutions

Expert Solution

Solution:

From the table above we can conclude the following dependecies:

A) StudentID ---------> Building, AccommadtionFee

B) Building -----------> AccommadtionFee

Also from the functional dependencies we can conclude that StudentID is the candidate key.

According to 3NF definition, a functional dependency X-----> Y is in 3NF

1) If X is a super key

OR

2) Y is a prime attribute( each element of Y is part of candidate key)

So from the 3NF definition we can see that Building is not a superkey and AccommadtionFee is not a prime attribute . Therefore it is not in 3NF.

Also to check for 2NF the Functional dependencies should not have partial dependencies( a part of candidate key deriving a non prime attribute is called partial dependency)

In both the depencies (A & B) there is no partial dependency as

StudentID ---------> Building, AccommadtionFee . StudentID is a candidate key(not a part of candidate key). So it is not partial dependency.

  Building -----------> AccommadtionFee . Building is not a part of candidate key. So, it is also not a partial dependency.

So the functional dependencies don't have any partial dependencies. Therefore it is in 2NF.


Related Solutions

Consider the system of capacitors shown in the figure below
Consider the system of capacitors shown in the figure below (C1 = 4.00 μF,C2 = 2.00 μF). (a) Find the equivalent capacitance of the system.  (b) Find the charge on each capacitor.  (c) Find the potential difference across each capacitor (d) Find the total energy stored by the group.
Consider the system of capacitors shown in the figure below (C1 = 7.00
Consider the system of capacitors shown in the figure below (C1 = 7.00
Consider the circuit shown in the figure below where L = 4.80 mH and R2 =...
Consider the circuit shown in the figure below where L = 4.80 mH and R2 = 420 ?. Consider the circuit shown in the figure below whereL=4.80mHandR2=420?. (a) When the switch is in position a, for what value of R1 will the circuit have a time constant of 15.1 s k? (b) What is the current in the inductor at the instant the switch is thrown to position b? 
Consider the mass spectrometer shown schematically in the figure below. The magnitude of the electric field...
Consider the mass spectrometer shown schematically in the figure below. The magnitude of the electric field between the plates of the velocity selector is 2.40 103 V/m, and the magnetic field in both the velocity selector and the deflection chamber has a magnitude of 0.040 0 T. Calculate the radius of the path for a singly charged ion having a mass m = 2.04 10-26 kg.
Consider three gas connected gas containers as shown in the figure below. Consider three gas connected...
Consider three gas connected gas containers as shown in the figure below. Consider three gas connected gas containers as shown in the figure below. CO2 (g) P = 2.13, V = 1.50L H2(g) P = 0.861 atm, V = 1.00 L Ar (g) p = 1.15atm, V = 2.00L    T = 298K Assume, that you open the two stopcock so that the gases can flow freely. Calculate the change of the chemical potential of the entire system due to mixing...
Consider the circuit shown in the figure below. (Let R = 26.0 ohm.) Find the current...
Consider the circuit shown in the figure below. (Let R = 26.0 ohm.)  Find the current in the 26.0-OHM resistor.  Compare the potential difference across the 10-ohm resistor, the  Find the potential difference between points a and b.  Is it possible for the potential difference across any element
Consider the reversible Carnot cycle shown in the following figure given below with 1.19 mol of...
Consider the reversible Carnot cycle shown in the following figure given below with 1.19 mol of an ideal gas with C V,m =5R/2 as the working substance. The initial isothermal expansion occurs at the hot reservoir temperature of T hot = 890 K from an initial volume of 3.85 L ( V a ) to a volume of 10.5 L ( V b ) . The system then undergoes an adiabatic expansion until the temperature falls to T cold =...
For the system of capacitors shown in the the figure below(Figure 1) , a potential difference...
For the system of capacitors shown in the figure below(Figure 1), a potential difference of 25.0V is maintained across ab.Part (a): What is the equivalent capacitance of this system between a and b in nF?Part (b): How much charge is stored by this system in nC?Part (c): How much charge does the 6.50 nF capacitor store in nC?Part (d): What is the potential difference across the 7.50 nF capacitor in V?
​Two concentric spheres are shown in the figure below.
Two concentric spheres are shown in the figure below. The inner sphere is a solid conductor and carries a charge of +5.00 μC uniformly distributed over its outer surface. The outer sphere is a conducting shell that carries a net charge of -8.00 μC. No other charges are present. The radii shown in the figure have the values R1 = 10.0cm, R2 = 20.0cm, and R3 = 30.0 cm. (a) (10 points) Find the total excess charge on the inner and...
Find the measure of angle A in the figure shown below
Find the measure of angle A in the figure shown below
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT