Consider the universal table D = {P, Q, R, S, T, U, V, W, X, Y, Z} with the following set of

functional dependencies:
{P, R} -> {Q, T, U}
{T} -> {S}
{V, W} > {X, Z}
{X} -> {Y}
What is the primary key for D?
Decompose D into 2NF tables.
Decompose D into 3NF tables.

To determine the primary key for table D, we need to find a minimal set of attributes that can uniquely identify each tuple in the table. In other words, the primary key should be a group of attributes that, taken together, uniquely determine the values of all other attributes in the table.

Looking at the given set of functional dependencies, we can identify a possible candidate key, which is a set of attributes that can function as a primary key. Let's go through the process of finding the candidate key for table D:

1. Begin by examining each functional dependency.

- {P, R} -> {Q, T, U}: This dependency tells us that the attributes P and R together uniquely determine the attributes Q, T, and U.

- {T} -> {S}: This dependency shows that the attribute T uniquely determines the attribute S.

- {V, W} -> {X, Z}: Here, the attributes V and W together uniquely determine the attributes X and Z.

- {X} -> {Y}: This dependency indicates that the attribute X uniquely determines the attribute Y.

2. Combine all the attributes involved in the functional dependencies identified in step 1.

- {P, R, Q, T, U, S, V, W, X, Y, Z}

3. Check if any subset of the attributes in step 2 can function as a candidate key by ensuring that the attributes in the subset can uniquely determine all other attributes in the table.

From the given functional dependencies, we can see that the attributes {P, R} can uniquely determine all other attributes in the table. Therefore, {P, R} is a candidate key and can be considered as the primary key for table D.

Next, let's decompose table D into 2NF (second normal form) tables:

1. Start by creating a table for each functional dependency.

Table 1: PRQTU
- Attributes: P, R, Q, T, U
- Primary Key: {P, R}
- Functional Dependencies: {P, R} -> {Q, T, U}

Table 2: TS
- Attributes: T, S
- Primary Key: T
- Functional Dependencies: {T} -> {S}

Table 3: VWXZ
- Attributes: V, W, X, Z
- Primary Key: {V, W}
- Functional Dependencies: {V, W} -> {X, Z}

Table 4: XY
- Attributes: X, Y
- Primary Key: X
- Functional Dependencies: {X} -> {Y}

2. Determine whether each table is in 2NF. A table is in 2NF if every attribute that is not part of the primary key is functionally dependent on the whole primary key.

In this case, all the tables are in 2NF because each attribute that is not part of the primary key is functionally dependent on the entire primary key.

Now, let's decompose table D into 3NF (third normal form) tables:

1. Start with the tables obtained from the 2NF decomposition:

Table 1: PRQTU
Table 2: TS
Table 3: VWXZ
Table 4: XY

2. Analyze the functional dependencies for each table and identify any non-key dependencies (attributes that are functionally determined by other non-key attributes).

From the functional dependencies, we can see that there are no non-key dependencies in the given set.

Since there are no non-key dependencies, the tables obtained from the 2NF decomposition are already in 3NF.

To summarize, the primary key for table D is {P, R}. Table D can be decomposed into the following 2NF tables:
- PRQTU: {P, R, Q, T, U}
- TS: {T, S}
- VWXZ: {V, W, X, Z}
- XY: {X, Y}

These 2NF tables are also in 3NF, so no further decomposition is required.