我正在尝试将一组功能依赖项规范化为 2NF 和 3NF 而不会丢失依赖项

I am trying to normalize a set of functional dependencies to 2NF and 3NF without loss of dependencies

以下是 table 'Portfolio' 的函数依赖(包含有关特定用户购买的股票的信息):

User_name, Stock_ID -> Quantity, Buying Price ;
Stock_ID -> Current_Price ;
Buying_Price, Current_Price -> Change ;
Quantity, Change -> Net_Change ;

您确定要 table 中的这些属性似乎是多余的并且只会导致不必要的功能依赖吗?如果 'change'='buying_price'-'current_price' 和 'Net_change'='Quantity'*'change',那么 'buying_price' 和 'current_price' 可能足以以较少的冗余实现相同的结果,因为 'Change' 和 'Net_change' 可以在需要时计算。

正如 Lordferrous 已经提到的,该关系不在 2NF 中,为了实现这一点,我们将必须将部分依赖 'Stock_ID -> Current_Price' 移动到不同的关系。在这个过程中 FD3 (Buying_Price, Current_Price -> Change ) 会丢失。