This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS411 Database Systems Spring 2007 HW #2  Part 1 Due: 1:55pm CST, 2/27/07 Note: Print your name and NetID in the upper right corner of every page of your submission. Handin your stapled homework to Trisha Benson in 4322 SC. In case Trisha is not in office, slide your homework under the door. NOTE : Please use Greek notations for relational algebra operators. (e.g., σ for a selection operator, π for a projection operator, × for a cartesian product, ρ for a renaming operator, and a49 for a join operator.) Problem 1 Relational Algebra ( 12 points , 4 points each) Consider the following relations: Suppliers(sid , sname, address) Parts(pid , pname, color) Catalog(sid , pid , cost) Give the queries in relational algebra to answer the following questions. (1.1) Find the sid of all suppliers who supply green parts. Answer: π sid ( σ color = ′ green ′ ( Parts ) a49 Catalog a49 Suppliers ). (1.2) Find the sname of suppliers who supply some green part but are NOT at “201 N. Good win Ave.”. Answer: π sname ( σ color = ′ green ′ ( Parts ) a49 Catalog a49 Suppliers ) π sname ( σ address = ′ 201 N.GoodwinAve. ′ Suppliers ). (1.3) Find the sname of suppliers who don’t supply any part that is more expensive than $50. Answer: π sname ( Suppliers ) π sname ( Suppliers a49 ( σ cost> 50 Catalog )). Grading note: Full credits for any correct answers Subtract 4 pts for using outerjoin in place of (natural join and selection) For (1.3): Subtract 2 pts for selecting cost ≤...
View
Full
Document
This note was uploaded on 09/14/2008 for the course CS 411 taught by Professor Winslett during the Spring '07 term at University of Illinois at Urbana–Champaign.
 Spring '07
 Winslett

Click to edit the document details