0% found this document useful (0 votes)
14 views

Advanced Database System

Uploaded by

Shreya Jadhav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
14 views

Advanced Database System

Uploaded by

Shreya Jadhav
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
——_}Sat_Stands_for_si ructared_ a uery _Langau qe - _— Tt isused for storing $ managing datain— ——telational_ database management system (R05 Le — i =| SQlL_allows users. -to_query the database 4 in — nber_of ways, us ing Engi’sh Like statements : ; —, he S@\_langauge has several parts? —_— a }1> DDI i it) pra {vid Der a _ | iv) rey 7 _ 18 ODL ¢ Daia Definition _Langauge)* _____—- |= The S@i_ppl_cammand_prowid es__various commands ____for_defining r1elatian_sch emas_deleting relatans — | E madli fying relaten schemas. a _ por commands: It) Create: - Tr i6 used +o create database or new table — in SQL: To create database! —__________—— syntax_~— Create database —databasename— Eq. - create database TY : (column 4. _datetype.,.column 4 column 3 data ty pe,s.columnn_datatype): rene (so). Address varchar ES); uclen Address ch division sa} Address division student =This. command's _+ used +o change the name of the table- mnta: name + leg * Rename table Student To TyStuderts + ‘Truncate ? - This staiement is used to ts- remove all rows _ finm_a_tahle- Santax. wy) strruncate table +table-name > a" - sYruncate. table Students —__________— Roll_No 2 : INSER INIO. Huderzs CeotLnes Hane 7 eddtes) MAL S64, Protingha” , "Garg —\ TASERT ayy 4¢, Student Felt 26. WANE Aadtes ooo VALUES Co, + Becta, . Baud” ze ANSenT + _—|—__VALvES_¢ _—} INSERT + - : YALWES (4. " Siddhi"> Select * from students 3. Ufdate: i ‘ i tat pies- [she existing data in. _| = uppate table -na z =namet= Kolha pur” Where ne porn Cds > | veoare student See palate “BIND Peleg i — {| Rell-No Name fades —~ 1 | = = = j 1 Prahksha Kolhaput | H = tt _ ik Delete: ro remove, cingle, ar is_ command allows (isers to Yemove SiINgle, or | ahead oe the deta [> Syntax : = | DE\ETE FROM table name Where Condition: Es Delete, from student Where, Roll.no 2 Qutput Name. Address | | Pratikeha |_ Kolhapur 2. Ruta ja Bawad: 4 sea Satara. 4 “saltile _ dlifttoace, wean por tD aL. __— Con —we._Chance the. Sac lion eig 2 ik yee, Sel avon? 2} Cea _we Change the 8, Stato ong —210--—$ 1. 4hS_ How. ¥. Ad Aattite dittererees behocon — Delele ,. — . using Op) Ye we can change the Structure of Yelahon _ i L —bbl_statements are used tn build $ modify — the structure. of the table S_4 other objects in the database. -When Wevexecute, a DDL statement it takes effect immed tately- = the character strings ,which mialt be called | re VARCHAR or CHAR For variably Strings + num ert'c IMESGER ities laualy sper he eel & Opre or related ty pes. IOS oy fixed lenatt or = The alter table statement may be used io Specify primary § fareign key constraints .a3 — ke_ather modi i i fications “ip the ah | €—structire« Key ire» Ke constrainis. snay—also_be——. SPECI ‘fled inh = Syn 2 CREATE TABLE stafement- alter table App CoNSTREZNT— permarr Ker (catiribute List, - Als OW _can simply change the situcits table using alter’ command . HESTON See lle _can_add_a_new < Madi fy “dasaty \pe_of ; - Ee: Darter jahle_aasea iable_name add column Name datatypes ii) Alter table table mame modi fy coluran—_— column.name. new datatypes 7 Eq * i) Bier table student add Division varcharOs i) Alter table student Modify cdlumn_pivision ints Can_we change oe Structure of relatian using — or, if yes how a we gan change tne structure of_relahon cai ) comman = Te modify tne grriictne of_a table . we pe use commands like, insert update & By using —insert “command 4 we can acla news records: ip Sy nrbax 4 Wit mn 3 fable nang LOM Ls Ghigy, dhsert. inte 7 er _colurnn 0.) Sal es WON the iggy, wo walue nd awe Ares Ege —anserd_intogtudent ( dolteric.s Sait, tad reg | Values C1, Abe” Gargot)4 pee 6 eee) student (RovL Db.» 1300 values (2. DER” Kola pune ys L0G ee _ Gacuotl : a Student ——___— pean update _Cormenand wie 4e_con rik -any.recorrd inthe table “ = Syntax t ae Vodate. table-name set hunni ame Lt: talass Ee B-GOLD8. Rraieran VIHERE conditions _ using delete conmand. we can delete — — Single Or multiple exist d=_-frar — the table. - = Syntax . Delete frorn table name there ———— ConditHon + : 7 Eq + Stuclent Delete from tee where Rollno= 1s eno Name Address j = DEF kasaba Bawada Student. Write difference, between Delete 1 Drop & Teunaate-

You might also like