omerelik
19.04.2008, 14:54
ARKADAŞLAR BEN PAZARTESİYE SQL DEN BİR KONU ANLATACAM
Sorgu: “London” şubesinde çalışan tüm yöneticiler
SELECT *
FROM staff s, branch b
WHERE s.bno=b.bno AND
(s.positıon=‘Manager’ AND b.city=‘London’);
Sorgunun İlişkisel Cebirde İfadesi
(StaffXBranch) (position =‘Manager’)^(city=‘London’)^(staff.bno=branch.bno)
(Staff |><| Branch) (position =‘Manager’)^(city=‘London’) staff.bno=branch.bno
( (Staff )) |><| ( (Branch)) position=‘Manager’ staff.bno=branch.bno city=‘London’
Staff-1000 satır
Branch-50 satır
Her şubede bir yönetici (50 yönetici)
5 ‘London’ şubesi
1.yol
(1000+50)+2*(1000*50)=101050 disk erişimi
2.yol
2*1000+(1000+50)=3 050 disk erişimi
3.yol
1000+50+2*(50+5)=1 160 disk erişimi
BUNU BANA ACIKLAR ISINIZ BU DİSK ERİŞİMİ NASIL HESAPLANIYOR
Sorgu: “London” şubesinde çalışan tüm yöneticiler
SELECT *
FROM staff s, branch b
WHERE s.bno=b.bno AND
(s.positıon=‘Manager’ AND b.city=‘London’);
Sorgunun İlişkisel Cebirde İfadesi
(StaffXBranch) (position =‘Manager’)^(city=‘London’)^(staff.bno=branch.bno)
(Staff |><| Branch) (position =‘Manager’)^(city=‘London’) staff.bno=branch.bno
( (Staff )) |><| ( (Branch)) position=‘Manager’ staff.bno=branch.bno city=‘London’
Staff-1000 satır
Branch-50 satır
Her şubede bir yönetici (50 yönetici)
5 ‘London’ şubesi
1.yol
(1000+50)+2*(1000*50)=101050 disk erişimi
2.yol
2*1000+(1000+50)=3 050 disk erişimi
3.yol
1000+50+2*(50+5)=1 160 disk erişimi
BUNU BANA ACIKLAR ISINIZ BU DİSK ERİŞİMİ NASIL HESAPLANIYOR