Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: database Homework
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
Posted 26-Sep-10 12:29pm
Edited 4-Oct-10 9:50am
v4

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Well, yes and no. Smile | :)
 
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.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 200
1 George Jonsson 175
2 Kornfeld Eliyahu Peter 169
3 PIEBALDconsult 110
4 Richard MacCutchan 85
0 OriginalGriff 6,080
1 DamithSL 4,648
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,624
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100