Question
Using Relational Algebra, print all tuples where the project city and parts city are the same when the parts and projects tables are joined together.
Using Relational Algebra, print all tuples where the project city and parts city are the same when the parts and projects tables are joined together.
Relational Algebra that is used in my class:
() Select [] Project * Natural join - Difference & Intersection | Union
parts('pno', 'pname', 'color', 'weight', 'pcity') ===== ('p1', 'Nut', 'Red', '12', 'London') ('p2', 'Bolt', 'Green', '17', 'Paris') ('p3', 'Screw', 'Blue', '17', 'Rome') ('p4', 'Screw', 'Red', '14', 'London') ('p5', 'Cam', 'Blue', '12', 'Paris') ('p6', 'Cog', 'Red', '19', 'London') ('p7', 'Bolt', 'Black', '7', 'New York') ('p8', 'Cam', 'Yellow', '21', 'London')
projects('jno', 'jname', 'jcity') ======== ('j1', 'Sorter', 'Paris') ('j2', 'Punch', 'Rome') ('j3', 'Reader', 'Athens') ('j4', 'Console', 'Athens') ('j5', 'Collator', 'London') ('j6', 'Terminal', 'Oslo') ('j7', 'Tape', 'London') ('j8', 'Ruler', 'New York')
suppliers('sno', 'sname', 'status', 'scity') ========= ('s1', 'Smith', '20', 'London') ('s2', 'Jones', '10', 'Paris') ('s3', 'Blake', '30', 'Paris') ('s4', 'Clark', '20', 'London') ('s5', 'Adams', '30', 'Athens')
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