# Attempt to find Transitive Dependencies

Table From this table example I am trying to understand both this dependencies. According to me partial dependencies have a primary composite key and transitive dont have.

I try to figure out Partial dependenceis but not sure, but i cant find the transitive one Try to figure it out. Orange one are Primary key.

Functional dependencies are determined from the subject matter. I'm inferring the FDs here from the names of the columns.

The key is Ord_NO and Prod_ID. I didn't include CUS_ID in the primary key, because it depends on Ord_NO.

Name depends on CUS_ID which depends on Ord_NO.

This is a transitive dependency.

## The only non key column which depends on the whole key is Qty_Ord. All the rest are partial dependencies.

Edit: I revised my answer to make the Column Names agree with the ones in the sample data.

The sample data is so small as to be anecdotal. Deriving FDs from such a small sample is risky, at best. You run the risk of seeing as patterns what are in reality mere coincidences.

Based on the Column names and an intuitive notion of how orders work, here are the FDs.

`````` Cus_ID -->  Name
Ord_NO --> Ord_Date
Ord_NO --> Cus_ID
Prod_ID --> Description
Ord_NO, Prod_ID --> Qty_Ord
``````

While these are consistent with the sample data, they are NOT derived from it. As I already said, that's risky with such a small sample.

• I think Cust_ID don't depend on the Order number since in the last row C001 have ord_no 088.Therefore Cust_no can be the primary key and there will be no transitive dependency. – agam Apr 5 '18 at 4:56
• From the sample data alone, `Cust_ID` depends on `Ord_NO` – ypercubeᵀᴹ Apr 5 '18 at 7:00
• So my dependency diagram is correct? – agam Apr 5 '18 at 7:19
• One Customer can have many orders. But One Order cannot have many customers. Not in the data you've shown, and not in my intuitive understanding of order processing. – Walter Mitty Apr 5 '18 at 11:07
• so can tell what will be a 2nf table for it. – agam Apr 5 '18 at 13:46