Hello I am attempting to identify a transitive dependency in the following diagram. I think that possibly the determinate of "Subtotal" is "Quantity" and "Price Charged" but I'm not sure if "subtotal" is also dependant on the "product_code" which would make it a partial dependency right?
This is how I've worked out the 1NF.
1NF (CUTOMER_NUMBER, INVOICE_NUMBER, PRODUCT_CODE → CUSTOMER_NAME, INVOICE_DATE, LINE_NUMBER, COMMON_NAME, SCIENTIFIC_NAME, CATEGORY, QUANTITY, PRICE_CHARGED)
PARTIAL DEPENDENCIES:
CUSTOMER (CUSTOMER_NUMBER → CUSTOMER_NAME)
INVOICE (INVOICE_NUMBER → INVOICE_DATE)
PRODUCT (PRODUCT_CODE → COMMON_NAME, SCIENTIFIC_NAME, QUANTITY, PRICE_CHARGED)
TRANSITIVE DEPENDENCY
SUBTOTAL (QUANTITY, PRICE_CHARGED → SUBTOTAL)
I'm fairly confident about the other dependencies but am not sure the transitive one is correct?
edit: MODIFIED DETAIL
1NF (CUTOMER_NUMBER, INVOICE_NUMBER, PRODUCT_CODE → CUSTOMER_NAME, INVOICE_DATE, LINE_NUMBER, COMMON_NAME, SCIENTIFIC_NAME, CATEGORY, QUANTITY, PRICE_CHARGED)
PARTIAL DEPENDENCIES:
CUSTOMER (CUSTOMER_NUMBER → CUSTOMER_NAME)
PRODUCT (PRODUCT_CODE → COMMON_NAME, SCIENTIFIC_NAME)
INVOICE (INVOICE_NUMBER, LINE_NUMBER → QUANTITY, PRICE_CHARGED, INVOICE_DATE, PRODUCT_CODE)
TRANSITIVE DEPENDENCY
- ?
Is this looking better, is there no transitive dependency?
QUANTITY
andPRICE_CHARGED
depend on theproduct_code
. Do customers always order the same quantity of a product?