Redian新闻
>
how to normalizae this database
avatar
how to normalizae this database# Database - 数据库
l*9
1
主要fields包括:movie_name, released_date, list_of_actors,
genre, actor_name, hometown, list_of_movies, birthday...
主要是list_of_actors and list_of_movies 如何在表
的关系中表达出来。。 谢谢。
avatar
a*e
2
movie table:
movie_id
movie_name
release_date
genre
actor table:
actor_id
actor_name
hometown
birthday
movie_actor table:
movie_id
actor_id

【在 l*******9 的大作中提到】
: 主要fields包括:movie_name, released_date, list_of_actors,
: genre, actor_name, hometown, list_of_movies, birthday...
: 主要是list_of_actors and list_of_movies 如何在表
: 的关系中表达出来。。 谢谢。

avatar
l*9
3
thanks, sounds good. so in the movie_actor table,
the PK should be the combination of two ids, right?
do I need an unique id in this table for sometimes
easy-query? If I do so, it seems not 3NF then..
thanks again..

【在 a*******e 的大作中提到】
: movie table:
: movie_id
: movie_name
: release_date
: genre
: actor table:
: actor_id
: actor_name
: hometown
: birthday

avatar
a*e
4
The combination of the two ids should be sufficient for PK.

【在 l*******9 的大作中提到】
: thanks, sounds good. so in the movie_actor table,
: the PK should be the combination of two ids, right?
: do I need an unique id in this table for sometimes
: easy-query? If I do so, it seems not 3NF then..
: thanks again..

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。