简体   繁体   English

是我在3nf的表

[英]is my table in 3nf

i have simple table with the following structure ID(PK) , title, director, year of production, production company 我有简单的表格,具有以下结构ID(PK),标题,导演,生产年份,制作公司

in 3nf, there must be no transitive relation between non primary keys, but i think (director, year of production and production company ) is dependent on title, but title itself cannot be a primary key in separate table since titles are not unique, 在3nf中,非主键之间必须没有传递关系,但我认为(导演,制作和制作公司的年份)依赖于标题,但标题本身不能成为单独表格中的主键,因为标题不是唯一的,

so is my table in 3nf or what ? 我的桌子在3nf还是什么?

Your director, year of production, and production company are not dependent on title but on the film ID (assuming the subject matter is in fact films). 您的导演,制作年份和制作公司不依赖于标题,而是依赖于电影ID(假设主题事实上是电影)。 The same film title (say "Robin Hood" or "Peter Pan" or "Tarzan") could appear several times in the table, but the director information depends on the film ID, not the title. 同一部电影片名(说“罗宾汉”或“彼得潘”或“泰山”)可能会在表格中多次出现,但导演信息取决于电影ID,而不是标题。

Your table is in 3NF -- unless you allow for multiple directors on a single film, or multiple production companies, or films that take several years to produce. 你的桌子是在3NF - 除非你允许在一部电影,多个制作公司或需要几年制作的电影中担任多个导演。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM