Create two tables, TI (ename, jobno) and T2Ciobno, jobdesc). Let jobno be data-t
ID: 3902992 • Letter: C
Question
Create two tables, TI (ename, jobno) and T2Ciobno, jobdesc). Let jobno be data-type, NUMBER(3), and use appropriate data-types for the other attributes. Put three rows in T1 and two rows in T2. Give T1.jobno values 100, 200, 300 for the three rows: ,,..., 300>, where .. represents any value you choose. Give T2.jobno the values 100, 200: , a. How many rows are there in the equi-join (on jobno) of T1 and T2? b. If the values of T2.jobno were , (with different jobdesc values), how 3-2. many rows would you expect and why? Why would the rows have to have different descriptions? c. If the values of T2.jobno were 400, 500 as in ,, how many rows would you expect to get? If the values of T1.jobno were ,, (different names) and the values of T2.jobno wereExplanation / Answer
If you have any doubts, please give me comment...
T1(3 rows)
..., 100
..., 200
..., 300
T2(2 rows)
100, ...
200, ...
a)
Equi-Join between T1 and T2 means T1.jobno = T2.jobno
i.e.,
..., 100, 100, ...
..., 200, 200, ...
Total 2 rows
b)
If T2 is
200, ...
200, ...
result:
..., 200, 200, desc1
..., 200, 200, desc2
Total 2 rows
c)
If T2 is
400, ...
500, ...
result:
None
Total 0 rows becaue no matches between T1 and T2
d)
If T1 is:
n1, 100
n2, 100
n3, 100
If T2 is:
100, d1
100, d2.
Result:
n1, 100, 100, d1
n1, 100, 100, d2
n2, 100, 100, d1
n2, 100, 100, d2
n3, 100, 100, d1
n3, 100, 100, d2
Total 6 rows
e)
It's look like cartesian product but not a complete cartesian product/
It will apply cartesian product under condition of T1.jobno = T2.jobno
f)
0 to M X N depending on these conditions T1.jobno = T2.jobno
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.