INFO20003 Database Systems
Dr Renata Borovica-Gajic
INFO20003 Database Systems
Copyright By PowCoder代写 加微信 powcoder
Administration
• Assignment 2 is posted, due Friday 29/04 6pm
• Your solutions will be tested on an extended data set
– Used to identify “hacked” solutions
– Use only information provided in the question and
schema (assignment) description – no peeking to reveal the answer and then “code” it into a solution
INFO20003 Database Systems 2
Quiz 5 walkthrough
• On the LMS…
INFO20003 Database Systems 5
Exercise (PollEv.com/rbor)
Given: Reserves (R): NTuples(R) = 100, Nkeys(sid) =100,
Sailors (S): NTuples(S) =1000, Nkeys(rating) = 10 interval [1-10], age interval [0-100], Nkeys(sid)=1000
SELECT * FROM Sailors as S INNER JOIN Reserves as R ON S.SID = R.SID WHERE rating =8 and 20< age < 30;
Calculate result size:
NTuples(S) = 1000
NTuples(R) = 100
RF(S.SID=R.SID) = ?
RF(rating) = ?
RF(20