Ligjerata 10

download Ligjerata 10

of 39

  • date post

    27-Jan-2015
  • Category

    Technology

  • view

    127
  • download

    6

Embed Size (px)

description

Ferdi Nuredini

Transcript of Ligjerata 10

  • 1. Teknologji Informative 1

2. 2 3. Algjebra RelacionaleAlgjebra relacionale paraqet nj trsi t plot meoperacione ndaj relacioneve q mundsojn selektimin e tdhnave nga databaza relacionale.Prodhimi kartezianUnioni , Prerja , ZbritjaProjeksioni -joinDivision (Pjestimi) 4. ShembullR r1 r2 r3 S1 s1 s21x3 3p4x3 4q3y4 4p2z7 S2 s1 s24q2m 5. R x S2 r1 r2 r3 s1 s2 1x34q 4x34q 3y44q 2z74q 1x32m 4x32m 3y42m 2z72m 6. Projection R [ r2 , r3 ]r2 r3x3y4z7-join R [ r3 > s1 ] S1 r1 r2 r3s1 s2 3y4 3p 2z7 3p 2z7 4q 2z7 4p 7. R[r3 =ls1]S1r1r2 r3 s1 s21 x33p4 x33p3 y44q3 y44p2 z7 8. DENDDivide by Result DEND/DORS# P# DOR 1 P# S# p1s1s1 p1s2s1 p2P#S#DOR 2s1 p3p2s1s1 p4p4s4s1 p5s1 p6 DOR 3P# S#s2 p1p1 s1s2 p2p2s3 p2p3s4 p2p4s4 p4p5s4 p5p6 9. Cape Codd Outdoor Sports Cape Codd Outdoor Sports sht nj kompani fiktive qbn shitjen e prohimeve t nryshme. Cape Codd Outdoor Sports: Ka 15 dyqane shitse. Ka nj magazin on-line n Internet. Ka departament pr postimin e porosive. T gjitha shitjet shnohen n Oracle databaz. 10. Struktura e shitjes e Cape Codd Retail 11. Nxjerrja e t dhnave q shiten n CapeCodd Retail Prdoren tre tabela: RETAIL_ORDER, ORDER_ITEM, edhe SKU_DATA (SKU = Stock Keeping Unit). T dhnat e nxjerra shndrrohen n: DBMS t ndryshm MS SQL Server N kolona t ndryshme OrderDate bhet OrderMonthdhe OrderYear 12. Formati i tdhnave tnxjerra ngashitja 13. Tabelat pr nxjerrjen e t dhnave [nMS SQL Server] 14. Gjuha SQLKomanda/formulimi SELECT Korniza themelore e formulimeve t SQL sht SQL SELECT formulimi: SELECT {Emri_i_Kolons(s)} FROM{Emri_i_Tabels(s)} WHERE {Kushtet} T gjitha SQL formulimet prfundojn me pik-presje (;). 15. Disa kolona nga nj TabelSELECT Department, BuyerFROM SKU_DATA; 16. Specifikimi i rnditjes s kolonaveSELECT Buyer, DepartmentFROM SKU_DATA; 17. Komanda DISTINCTSELECT DISTINCT Buyer, DepartmentFROM SKU_DATA; 18. Selektimi i t gjitha kolonave:Komanda yllz (*)SELECT*FROM SKU_DATA; 19. Disa rreshta nga nj TabelSELECT *FROM SKU_DATAWHEREDepartment = Water Sports; 20. Kolona dhe rreshta specifike nga njTabelSELECT SKU_Description, BuyerFROM SKU_DATAWHERE Department = Climbing; 21. Sortimi i rezultateve: ORDER BYSELECT *FROM ORDER_ITEMORDER BY OrderNumber, Price; 22. Dy lloje sortimesh:Rrits edhe RnsSELECT *FROM ORDER_ITEMORDER BY Price DESC, OrderNumber ASC;Shnim: Nse nuk specifikohet ndonjra nga komandat ASC ose DESC, sortimi dot bhet sipas ASC. 23. Opcionet e komands WHERE : ANDSELECT *FROM SKU_DATAWHERE Department = Water Sports AND Buyer = Nancy Meyers; 24. Opcionet e komands WHERE : ORSELECT *FROM SKU_DATAWHERE Department = CampingOR Department = Climbing; 25. Opcionet e komands WHERE :- INSELECT *FROM SKU_DATAWHEREBuyer IN (Nancy Meyers, Cindy Lo, Jerry Martin); 26. Opcionet e komands WHERE: NOT INSELECT *FROM SKU_DATAWHERE Buyer NOT IN (Nancy Meyers, Cindy Lo, Jerry Martin); 27. Opcionet e komands WHERE:Intervale me BETWEENSELECT *FROM ORDER_ITEMWHERE ExtendedPrice BETWEEN 100 AND 200; 28. Opcionet e komands WHERE:Intervale me simbole matematikoreSELECT *FROM ORDER_ITEMWHERE ExtendedPrice >= 100 AND ExtendedPrice