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

备考刷题,请到

CDA认证小程序

The figure shows a company's sales data table, product table, and category table. Please answer the following question: The sales table is left joined with the product 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 sales table and the product table is the product ID. The sales table has many records for each product, while the product table has only one record for each product.

正确答案是:B: One-to-many

专业分析:
在这个问题中,销售表(Sales)和产品表(Product)进行左连接(left join)。左连接意味着销售表中的每一行都会与产品表中的匹配行进行连接,如果没有匹配行,则结果中该行的产品信息部分为空。

具体分析如下:
1. 销售表(Sales)中的每一行记录了一次销售情况。
2. 产品表(Product)记录了每一种产品的详细信息。

在实际业务中,一个产品(Product)可能会被多次销售,即在销售表中出现多次。因此,一个产品对应多个销售记录,这种关系称为“一对多”关系(One-to-many)。

例如:
- 产品表中有一条记录,产品ID为101。
- 销售表中可能有多条记录,每条记录的产品ID都是101,表示该产品被多次销售。

因此,销售表和产品表的左连接关系是“一对多”(One-to-many)。