考试报名
考试报名
考试内容
考试大纲
在线客服
返回顶部

备考刷题,请到

CDA认证小程序

A relationship that allows an address to be used by multiple people,and each person can have multiple addresses can be resolved
A. with a partnership entity called Person Address Usage and two, 'one to many' relationships
B. by changing the primary keys on Person and Address to ensure referential integrity.
C. with an associative entity called Person Address Usage and two,'one to many' relationships
D. with an additional relationship describing the address usage
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

正确答案是 C: with an associative entity called Person Address Usage and two,'one to many' relationships。

专业分析:

在数据库设计中,当存在多对多(many-to-many)关系时,通常需要引入一个中间实体(associative entity)来解决这个问题。对于题目中描述的情况:

1. 一个地址可以被多个不同的人使用(一个地址对应多个用户)。
2. 每个人也可以拥有多个地址(一个人对应多个地址)。

这就形成了一个多对多的关系。为了在关系型数据库中处理这个多对多的关系,需要创建一个关联实体(associative entity),在这个例子中,可以称之为 "Person Address Usage"。

具体步骤如下:

1. 创建一个关联实体 "Person Address Usage"。
2. 在 "Person Address Usage" 中包含两个外键,一个指向 "Person" 表,一个指向 "Address" 表。
3. 这样,"Person Address Usage" 表就可以记录每个人和地址之间的使用关系。

通过这种方式,原来的多对多关系被分解成两个一对多的关系:
- 一个 "Person" 可以有多个 "Person Address Usage" 记录。
- 一个 "Address" 也可以有多个 "Person Address Usage" 记录。

因此,选项 C 是正确的。