0% found this document useful (0 votes)
49 views10 pages

Dbms Notes

Uploaded by

Zain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
49 views10 pages

Dbms Notes

Uploaded by

Zain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
b a > Dated: 20 Feo 2023 pBNS ~ > Heta Date + data characteristics (infe. of athen data.) ~ Schemas description of collection of data SS ReRation ; -table with rews and) columns = 2 ou ceN ae Naive (the one whi We pare zi ~ e who has neven used posetes Software.) ~ ati 2 as ah a No Partt aS Executtoy in DB s je SQL quer, ELECT = Basic SQ grey has S >» FROM and WHERE ~ 290 S e select from Customer whee City > “New Yok 6k ? _ Grads <> et Jao ZY Ge je eet | — ng. astiname ‘i Select A fam Cutsem wero Mame bike Jol Te — select a from Oneens where (odendatx. C7 2s12-04-10 © = = < AND salesmensteb. c © - . ° MoT (ordendate. = /2a13-09-10) ANP Scsman-d 2560S) OR C purch- amt pilecs)) on Calman AS Ss SELECT ord_no , pilch-amt (porch-amt_xloe\AS MEREIVED iy y ecet-( putnam A190), ence Des uNAcH ~-Prom Orders ™~ a ase PU THIcECtNE ~ [ =) + CenoaQeed, f + = Decentvatized) : + Disbibuted, * f = =a. 1 my —SELEGT TOP SX FROM Customers F my TOP BB — Riches top retemeste =a WITH TIES —— With sanre date eat ORDER BY Seating ~_OFFSET 5 ——~ igndtes the finst 5 rows and) fetens the data of OWS nexS reds FETCH NEXT 3 ROWS ONLY —— fetches the aot 3 reus offer. = athe, Of, ~ croup BY ~— Gieyps: a set sf dotm gcc te a Column. S agqreqate functiavs = Sum, MIN, MAX, AVG, CouNT Tg +. eS Aggregate func.* doesn cansider NULL values, Except COUNT (*) WHERE Souldn't be use with aggregate func. so HAVING Is used, + === aithough WHERE can be used in the Same, query. J 4 - e “Dated: 27 Feb 2023 te Practice : ‘SELECT AWG(AGE) FROM Cloning ud \~ fom Ching : Select cownT Cciassifieatien)) fom Usning where Classification pase ee * Select Name Min AYE) fromv Cloning 7 « Sefect Name Aye from ciening where Age 7 50 Scect + from Cloning OFFSET @ FETCH F Z Three Level Archirecture, : EXE. Level ,| Conceptuad Leve® , [dnterma? Leved, 4 \ 1 | L View Lever || BRA Trfe cutailasie \ Prupsica® View! v (Nite) pes, L Limieds_perspeeti oe as any (tn biamey front) for ser \ All dota ic J \ Vise Vietiat ‘cat dates | [Date dependence. begical DP vs Physical DP CG Imp for oT) DeMS — = “TKanscotlon Capos (_cemmit, Rallback) Data pefinition (Grate, Aner, Drop) Pata Manipulation (Select, Update, Insert Dekete,’) Date Cenprely C Great , Revoke) 2 om Dated: 7 Mach, 2023 < ~ Dave Modek “is the leglco® represented) =e sS PeEssat epres ov _of the stucture of they | Basic Buildi: : ding Blocks Row = Tuple. © E + Entity — ee — RelaGenships Key —~ > Constaints — — 6 March 2023 — Simple. Camposke ml = Sper ey =f Primanp Sager mii | Fenign Key 7 SS Secondary Karp Candidate, 1 Integeity Gensbaints * >P7 3 —_8 March 2023 —~ —~ —~ Rekatfory Alyebrev « 7 —~ TW yepresents ce ether z eee me GT represents condition ( 2) —~ sents renaming aperatey ; ie represen 9 ape ats a Set_operations in SAL. ; re ~ UNION) INTERSECT, and EXCEPT 2 Ba i 2 O's iy ~ (SELECT fame FROM Customer) INTERSECT Rony = — x (SELECT name FROM Supplier); ~ Relation T UNION vs UNION ALL Sees s ~ aneries = v + C= Gress Precuct (Cambination of alt date) 5 beter approacdy jeining. JOINS 2 Li TF ig = COM og Dated: \3 March, 2023 AS = Joins are the, crags prduct but qieng with a canditterny « . od SELECT smame, day a FRoM Gailerss, Reserved € (Declaration oF Vantbles WHERE Siq= sit AND 6 bid = 163 Ractce. = Sy, Fo eid (oe ee so et (se Certified ec, Emproy tet 6p Aiccrsft on VTL v I a. Fieich (© aname = 2. Teename ( T anane = Boeing) wy ees CEPIPIER ts 3: Fins 8 gate pore EE AUIS — Fire (XN aitance, range —* Satay 7-46 © LTS” | aide aC uns (_S salary > fe0000 ii, = projector Ss reprveras, = SELECT 6 eho reprints WHERE T Dated: '5 Marh, 2023 ANAT 6 Lyle 18 [Reins | fr Natura’ Join: hamesha uska record Jakar dedeta he jou ~or loner Join match karahi net! hein x_Outer Tein: wen vecard bhi tata he jiSka (ol tecard oni milter. H—consists—of —4- | He Comprises of “ws types of jolng ¢ t= LefE Join (Retrieves “ail the ras” of the (eR fale.) 2- Rigne joi Ch ee 4 erent taste) 3 = Fe Foi Combination of Left ana Right: join) + Natural vs Inner Tole | = No _cnditior is required in Notun hin ie PKK 60 no & need to wee ie the keyword ‘fan? TON kepworch must be used Im Inne’ Joln/ outer Join. PRACTICE L L- Left joinv Select - ae building wdistinct role From Buildings kre join Emptoyecs nN Building -name a Building. J select puilding_name, distinct pote from Rulings lett foin -Employecs ey _Buileling- name, = Building her, tore is nude. Dated: oF PRACTICE & Subgueries Nested Suoquertes Que Enchey Relationship Mode (ERD) (4 Atbibue oF an entity fs @ ctefining property 9° quastey » alee lee ph ooe eae aaalsialaletal sca oeaE Rash £ Cardinality iN 4 00% -~ Binary = Gne “to ane, i es = Temay F Gor ts Many» gnen er mene) SEM ea/e inlay, ae aK : Vecsey] Poem toe A Simp, Example (Stide 26) So ebae oe eo” Exercise weak, Lpatetleg as) S ao + Empkyecs (557, salary, phone) Total Partitipation » depts (dna, dneme ,busger) * child of emplyus ( name & o9¢) _ a . eameaiaT vee ¢ ‘ Spiess) work 19 depts CED Games are. ei HS 4s mine eos an caper — =e p= Pare pomente 7 A narages CEE CEE EET § Dated: Musiciamy C S8tp name address 7 phoned + Mnsbumerte (VID, name mmeey >) + Albuns (Ald, title, cate. , format, alm PL) « Seng CERI antnor) Se ee = Masictan fe gap" ansouments | a = Mustcian imcuee fire pa So pam Hess » Z|

You might also like