联盟,笛卡尔积 [英] union,cartesian product
本文介绍了联盟,笛卡尔积的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用您在上一个示例中创建的表来表示笛卡尔乘积,并集的特定示例,并将差异设置为日常英语和关系代数.
可以只具有一个关系(表)的联合或笛卡尔积吗?抱歉,我无法使该表格适合您的桌子,但该属性是许可证号,保质期,yeinsuredExpired,型号,颜色,自动/人,所有者
请有人帮忙,我仍在等待答案.可以在此表格上执行此操作吗?
express a specific example for cartesian product, union, and set difference as everyday English and as relational algebra using the table you created in the previous example.
Is it possible to have union or cartesian product with only one relation(table)? sorry for the table i cant make it fit, but the attributes are licenceNo, yrinsured,yeinsuredExpired,model,color,auto/man,owner
Please may someone help, I am still waiting for an answer. Can this be done to this table and how?
01 licenceNo yr_insured yr_insuredExpired model color auto/man owner
02 111-aaa 1999 2009 beatle pink auto Johnson
03 222-bbb 1999 2009 mustang white auto Trot
04 333-ccc 2000 2010 tacoma blue auto White
05 444-ddd 2007 2017 f-350 blue auto Black
06 555-eee 2005 2015 d-2500 black auto Smith
07 666-fff 2007 2017 corolla white man Lee
08 777-ggg 2010 2020 matrix white auto Kim
09 888-hhh 2008 2018 civic green man Singh
10 999-iii 2008 2018 escalde black auto Williams
11 000-jjj 2009 2019 civic red auto Vanderhoot
推荐答案
是的,是的,不是的. :)
例如,在包含经理属性的员工表中,发现层次结构的一种解决方案是使用自连接,这会导致笛卡尔积.
是的,因为只有一张桌子.否,因为出于连接目的将其视为两个表.
Well, yes and no. :)
For example in an employee table that includes a manager attribute, one solution to discovering the hierarchy is to use a self join which can result in a cartesian product.
So yes, because there would only be one table. No because it is being treated as two tables for the purposes of the join.
这篇关于联盟,笛卡尔积的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文