



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Professor: Pramanik; Class: Advanced Database Systems; Subject: Computer Science & Engineering; University: Michigan State University; Term: Spring 2008;
Typology: Exams
1 / 5
This page cannot be seen from the preview
Don't miss anything!
On special offer
(a) (10 points) When student grades are changed and the change is more that 25%, insert the changes into a table named Notify. (b) (20 points) Those triggers that maintain a materialized view for average grades of students in a university.
(d) (10 points) Consider the SegmentIntersectionTest algorithm of page 180 of Rigaux,
If there are n line segments (total for all polylines) what is the order of computa- tional time complexity for detecting a segment intersection (using sweep-line). (e) Consider the algorithm SegmentIntersection of page 182 for finding all segment intersections.
ii. (10 points) If there are n line segments with k intersections, what is the total
of the algorithm. Give a short justification.
RIVER(NAME:char, FLOOD-PLAIN:polygon, GEOMETRY:linstring) ROAD(ID:char, NAME:char, TYPE:char, GEOMETRY:linstring) FOREST(NAME:char, GEOMETRY:polygon) LAND-PARCELS(ID:integer, GEOMETRY:polygon, COUNTY:char)
Transform the following two queries into SQL using the OGIS specified data types and operations: i. (10 points) Name all rivers that cross Itasca State Forest. ii. (10 points) No urban development is allowed within two miles of the Red River and five miles of the Big Tree State Park. Identify the land parcels and the county they are in that cannot be developed.
Following is an example of computing the weighted sum of distances between the query image and a database image.
ORDSYS.ORDImageSignature.evaluateScore(DBimage_sig,QRYimage_sig, ’color=1.0,texture=0,shape=0,location=0’);
(b) (5 points) Describe briefly the type of performance that can be mesured for the above retrival system using recall and precision.
(c) (20 points) Relation scheme for Sales table is given below: Sales(Sale-id, prod-id, product-name, product-category, product-warehouse, warehouse- loc, store-id, loc-id, prod-price, qty-sold, store-city, store-state, store name, rep- sOnQuota, RepsOnNoQuota, Hr, day, month, yr) i. Decompose the above table into 3NF. Assume appropriate functional depen- dencies. ii. Decompose the above table into forms (i.e., tables corresponding to STAR Schema) for data warehousing applications. (d) (15 points) Answer the following in SQL for the above relations. If you are not able to do it by using regular SQL, define additional features for SQL as appropriate. i. For each state, average sales for reps who are on quota vs. average sales for re ps who are not on quota. ii. Last year’s vs. this year’s total sales for each product. iii. For each state, show the top 10 customers based on total sale for 2007.
(a) (15 points) Which of the following fragmentation schemes are valid for r? i. {C 1 , C 2 } ii. {C 2 , C 3 } iii. {C 1 , C 4 , C 5 } iv. {C 2 , C 4 , C 5 } (b) (10 points) Let s1,s2,s3,s4 be the fragments for r corresponding to the fragmenta- tion conditions C1, C2, C3,C4, respectively. Give minimal sets of fragments that can be used to evaluate σC (r) for the following choices of C: i. A 6 = B ∧ B = D ii. B < D ∧ D < E
Supplier (at site 1) Supp − part (at site 2)
Sno Sna Sadr Sno Pno
s1 sn1 sa1 s1 p s2 sn2 sa2 s1 p s3 sn3 sa3 s2 p s4 sn4 sa4 s2 p s5 sn5 sa5 s2 p s5 p
Assume the following sizes for the attributes: Sno: 4 bytes, Sna: 100 bytes, Sadr: 100 bytes, Pno: 4 bytes. Give the number of bytes that are needed to be transferred between the two sites to process the following query given in relational algebra. Assume that the query has originated at site 2 and the answer should be presented at site 2. (Supplier ./ Supp − part)
(a) (10 points) Using regular join (b) (10 points) Using semijoin