Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

STUDY NOTES FOR PROGRAMMING, Study notes of Computer Programming

Contents Include: Introduction to Databases and SQL Data Types and Table Structures DDL (Data Definition Language) – CREATE, ALTER, DROP DML (Data Manipulation Language) – INSERT, UPDATE, DELETE DQL (Data Query Language) – SELECT, WHERE, ORDER BY, GROUP BY, HAVING Joins (INNER, LEFT, RIGHT, FULL) Subqueries and Nested SELECTs Functions – Aggregate, String, Date Views and Indexes Normalization (1NF to 3NF) Basic ER Diagrams and Relational Mapping Sample SQL Queries and Practice Questions

Typology: Study notes

2024/2025

Available from 05/11/2025

tarun-singh-jodha-1
tarun-singh-jodha-1 🇮🇳

3 documents

1 / 88

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58

Partial preview of the text

Download STUDY NOTES FOR PROGRAMMING and more Study notes Computer Programming in PDF only on Docsity!

The Clete SQL Hand Zook «== Comprehensive pbtes and Lips =k od 2. ) A. Zntroduction fo Databases 2. Dntredyo-tion tp SQ@t [ Basic Concepts] : 2:4-Creating Tables 2.2. Inserting Kows 2.3: Retieving Data 24 Update Co ooas 2.5: Delete Rows 2:6. AI4ter Tables E-Quensing with SOL: 3-4. Comparison Opentog 3-2- Sti Operators 33. Logical Operators 34. Inand Between Operators 3:5: Order B oe and DisHack! Ae Aggregation and Group Gy AA “aggegoons ~ 4.9 Group Sy 5: Common Concepts * 5:4. SQL Eepressions 5.9. SQL Fund-tions 6. Modeling Databases: | 6.4. Core Concepts of ER Hode| 6-2. Creating a Relational Database Notes by Bhavana LT n-thoduction +o Databases : Concepts in focus 1 RData * Database | # Database Management System (DBMS) * @ Advantages. Hike las # Types! OF Dittabase sy. Akloo Gh afie sec) at _ © Relational Database “Ph Soe nb Relattiondl: Dectabaise SData:- “CF hodwtebe hye gael « > Any Sort of tration that Ig Stored is called data. 1 Examplestsr..4. eer g- multimedia on WhatsApp. 2: products and order on. Amazon ZB: Contack details in telephone directo | sete. => Database :- > ~An Ogarized collecton of data is called a ote base. => Database Hanagemart System C DBMS) :- >A SoPtware thet wb used +o Coy Store and access clataRom the database ina Seaure voay ; web Application phe Arle BP Ax Hodels —> Diet te 1 Needs fe seis sf ‘ E tite 80 Sahar rs} Reece mmenclation Ho _ Datahase 28) Engines — Notes by Bhavana Advan % Seourtty t Data ts stored § matntained secur & Ease of Use} provides simpler ways fo ¢ e is tated ard are data ot the rate it ia gene respectvel aay, -*& Durabi lg and Availability 5 Durable. ad, provides assess to all the clients at. any poirt to, sidabpeP fryotieel A , | * performance ; 3- Quickly accessible: +s: all. the cheeks Capp aations and stakeholders): —? Types of Databases. PS —Rere are tdipPerent: ‘ys of databases based on hess we * ‘erganize: rthe dota. - 12.2 Colomm teamily G raph Deeamert Relational Database :- Tn reletional databases, the data is Organized tn the -form of tables. Notes by Bhavana Spon -y Vartous. operation’ "|-> Creates a nev -table fn the database, @ —Ltroduectton +to SarLenes] => SQL Stands Bo => Ser is used fs per-Rim' Operatish on R¢letenal ‘DBMS Fy SQL ts dealaratve. Hence, easy +o learn. ; sem 7 Ser ptevides mulkple clauses ( Command&) +0 Pp pie Tike Gregté* tettevay update ad i209 bbe ap ade Lt : “y she data. ¥ Ls garded ¥ PUAUN 4 } rivsiiesne us onlin tats CREATE. TABLE, Fable name (! _ ealumn4 ype, “ educa +yper . Dd: : n “the dlataty Here’, ype) aa Agpea in, tthe 395 ae Tg ae spd 4 ‘ ee py) Lompranl acing as -_— & tt he he ek hh fn ta im tn in ia ‘i i i toh © ff 4 4 ft ee are supported *n' 'S@E are robe dle “Eneample $¢ Te dee ctingt et a : Create a player -table 40 Store: the. -Follecaing detatla of players. column—name elata_type name VARCHAR (206) age TNT / ENTEGER gar. xnt [INTEGER Note$ by Bhavana mgd gt batt aOR eATE. “Tape playerC “Sfname Reha C200), e qe as EGER, ' WA SAT oie DY A aoe INTEGER Dr % We aan ‘chdak’ the detatls oP the cwated table at a ant point tn me using ie2 apalbenm athe. Gayle & es =} polloustng data types are, Peauentty used, SOL: Datatype | on Syntast “Integer INT/ INTEGER OO cae. Ts === = — : leat —s Nt oe fais Bs no SE VARCHAR . Took TEXT OO ’ Bd stan Aye af oglt poses ci lode crm yar ‘Date DATE Time TEME i} Patetime | | DATETIME OST BooLeAn i ne 1 yt Note :- ae ee dle Boolean Values are ores as Eos) ae . {Seam mveg 4 Crave 9% . mate objeat a represented asi aN: -Mm— PD * tes by Bhavana _ Dadabase “the "player table the} Stores the ‘detallA of players fn ‘a stournamemh, (s peetvely . . ol | 5 Player table, store. -the name» age and Scot Players Excomple t= og ‘ ; Insert name, oe and score. oP 2 > ployer in the player -table- " INSERT INTO player (name, age , Seo) VALUES bec - Cc" Rakesh", 34, +) 1 C Wats Avis); — Upon executing the above dats code, berth the entiep would be added +o the player -table- Latin Viet the ‘added: date! —y We can retrieve ii toxerted .cleta ky using cthe Rle- cing Peenands ee SELEecT * PROM player... - output} | name age Score: : Rakesh 3q 3S Sait at 32 Notes by Bhavana — possible Mistakes‘ Vie sani de dle es gd syyels i Mistake: > the number of vpavag “Phat udtire® tase * mateh estth -the number SF” Poteet nathits tha :2 pales fq the query HOD muse . iF ‘ Apapely 32. br - sari" auseet rato OI Ge player Cname, 9g scor&) VALUES ARO ty Vivat , 3 y PAO ep SN OAT) 1s GMT OGD OvTeUT ; t! Erors 2 Nalues Re 3S colomnisay tay Mistake 2% 0 OBS PE beat 5 r) aI Qkel= ue an . pa ese to spear only Hho. ost tables tte Artaboase - Lek wd) ts naman crandl = lle rae | SQL" tusegT pNTo | Bb ad be player Snfrmetion Cname, er seed) foes 24 > Do act add, ae ional param-thesis ©) post vaAwEs Key- word in Hye *asde, Seri INSERT T Delete All Rows.) + ., Symtare:- DELETE FROM table name; ~ Example + Delete all the Recas LPosem player table DELETE FROM players % Delete Specie @uus Syrtete :- Dotanel. OBLETE FROM . -table_name pe t -; a Column = Value 4 5 Example :- ve eho © eye fon +o player table Note; We can emigely dent a player by name, DELETE FROM . player WHERE name = *shgann * : Notes by Bhavana Warntag We aan not re-dtrieve the catq , once. ne delete , “the. data Pram the table Bo fon 6 oe = DROp -table:- DRoP clause is used +o delete a table Pom the ‘ atetabase. Syntaxi- DROP TABLE : ‘+tableendme : : ' Ercample :- ' % Delete player table fom the clatabase DROP TABLE player ; Peter? ALTER clause iw Used +o edd, delete, or madi columns to an existes table. => Add Column Syrtax eee: table_name AOD Celumn —Name datatype : Notes by Bhavana OO OE"E>-— OO OO — => Drop Column SD, « Syntare y— ; $ 4 ALTER TABLE e . ¢ +able_name PROP coluMN Database :- The database contains a product -table ctaka of products like! name; ante t price , 4ing. . - : . Go Comparison Operatog :- that stores the brand and ™- . opera-tor ese ption = grin -Emala to . fo: =< 7 Not equals -to < Less -than == Less than or equal to > Greater than . bs wm + fy . { 3 == Greater than or equal ~ Notes by Bhavana