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

备考刷题,请到

CDA认证小程序

Please answer the following question based on the data in the diagram: The store table is left joined with the daily store target table. What is the corresponding relationship?
A. One-to-one
B. One-to-many
C. Many-to-many
D. Many-to-one
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

The common field between the store table and the daily store target table is the store ID. The store table is the "one" side and the daily store target table is the "many" side.

正确答案是:B: 一对多(One-to-many)。

**专业分析:**

在表格连接(join)操作中,“左连接”(left join)是指从左表(在本例中是store表)中选择所有记录,并从右表(在本例中是daily store target表)中选择匹配的记录。如果右表中没有匹配的记录,则结果中显示NULL。

根据题目描述,store表和daily store target表进行左连接,意味着我们希望从store表中选择所有记录,并从daily store target表中选择匹配的记录。

1. **store表**:通常包含商店的基本信息,如商店ID、商店名称、地址等。
2. **daily store target表**:通常包含商店的每日目标数据,如日期、目标销售额等。

一个商店在store表中通常只有一条记录(即一个商店ID对应一条记录),但在daily store target表中,一个商店可能有多条记录,因为每天都会有一条目标记录。

因此,一个商店ID在store表中对应一条记录,而在daily store target表中可能对应多条记录,这就是一对多的关系。

综上所述,store表与daily store target表的左连接关系通常是一对多的关系,所以正确答案是B: 一对多(One-to-many)。