Question
9. Consider the following tables Table1 ID1 Name 1 aaa 3 bcd 4 aaa 9 fff Table2 ID2 OtherID 111 3 222 3 555 9
9. Consider the following tables
Table1
ID1 | Name |
1 | aaa |
3 | bcd |
4 | aaa |
9 | fff |
Table2
ID2 | OtherID |
111 | 3 |
222 | 3 |
555 | 9 |
345 | |
a) What would be the result of a projection of Table1 to the Name attribute in the relational algebra, considering the definition of a relation as a set of tuples?
b) What is the result of a natural join, left outer join, and right outer join for Table1 and Table2?
c) Describe the natural join in c) as a combination of Cartesian product, selection and projection. What is the selection criterion? To what attributes are you projecting?
10. Consider the following relational schema
Provide the SQL data definition statements for creating the two tables in the above relational schema (make sure not to use the reserved word Order inappropriately):
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started