我需要设计数据库来跟踪以下属性:
stdnum // student number
postcode // postal code
phone_number // student phone number
city // student address: city
还列出了功能依赖项:
stdnum -> postcode
stdnum -> phone_number
postcode -> city
phone_number -> city
我需要找到无损连接、依赖保留、属性的第三范式分解。
我尝试了不同的分解,但没有一个能满足所有要求(它们是:无损连接、依赖保留、第 3 范式)。
例如。如果我保留原始关系而不进行更改(表将具有所有 4 个属性),我将获得无损连接、依赖保留但不是 3NF,只有 2NF。
以下分解:
(stdnum, postcode, phone_number, city) =
=(stdnum, postcode, phone_number) JOIN (postcode, city) JOIN (phone_number, city)
在 3NF 中,依赖保留,但不是无损连接。
我的问题有什么解决办法吗?
感谢。