Puas yog SQL ceev?
Puas yog SQL ceev?

Video: Puas yog SQL ceev?

Video: Puas yog SQL ceev?
Video: KOJ LUB CEV PUAS YOG TOOJ HLAU By Yanis Tsab (Official MV) Nkauj Tawm Tshiab 2023. 2024, Hlis ntuj nqeg
Anonim

SQL ntawv yog ceev vim tias cov ntaub ntawv tuaj yeem txiav txim siab kom tau txais cov ntaub ntawv. Tej zaum koj yuav tau ua qee qhov kev hloov kho, piv txwv li, koj yuav tsum tau tsim cov indexes lossis cov partitions. Tab sis lub kaw lus feem ntau ua haujlwm zoo ntawm kev xaiv cov phiaj xwm ua tau zoo tshaj plaws rau txhua qhov lus nug. SQL ntawv yog ib hom lus siab heev.

Tib neeg kuj nug, yog SQL lossis NoSQL sai dua?

Feem ntau, NoSQL tsis yog sai dua tshaj SQL ntawv ib yam li SQL ntawv tsis yog sai dua tshaj NoSQL . Ntawm qhov tod tes, NoSQL cov databases tshwj xeeb yog tsim los rau cov ntaub ntawv tsis muaj teeb meem uas tuaj yeem ua cov ntaub ntawv-oriented, kem-oriented, graph-based, thiab lwm yam. Nyob rau hauv cov ntaub ntawv no, ib qho chaw tshwj xeeb cov ntaub ntawv khaws cia ua ke thiab tsis muab faib.

Ib sab saum toj no, kuv tuaj yeem ua kom ceev cov lus nug SQL li cas? Peb tau ua cov npe ntawm 17 txoj hauv kev uas koj tuaj yeem xav txog txhawm rau txhim kho koj cov lus nug SQL.

  1. Siv cov npe ntawm cov npe tsis yog * hauv SELECT nqe lus.
  2. Sim tsis txhob siv HAVING clause hauv SELECT nqe lus.
  3. Tsis txhob siv UPDATE es tsis yog CASE.
  4. Tsis txhob dig muag rov siv Code.
  5. Siv ib qho IN predicate thaum nug ib kab indexed.

Ntxiv mus, uas koom nrog yog nrawm dua hauv SQL?

Zoo, feem ntau PIB HAIV NEEG yuav sai dua vim tias nws tsuas yog rov qab cov kab sib tw hauv txhua lub rooj sib koom ua ke raws li cov kab sib koom. Tab sis LEFT JOIN yuav rov qab tag nrho cov kab los ntawm cov lus teev tseg LEFT thiab tag nrho cov kab sib txuam los ntawm lub rooj teev tseg RIGHT.

Vim li cas MongoDB sai dua SQL?

MongoDB yooj yim teeb tsa, teeb tsa, thiab khiav hauv kev sib piv rau RDBMS. MongoDB siv lub cim xeeb sab hauv los khaws cov khoom ua haujlwm uas ua rau sai dua siv sijhawm. MongoDB txhawb kev sib sib zog nqus query-muaj peev xwm xws li peb tuaj yeem ua cov lus nug dynamic ntawm cov ntaub ntawv siv cov ntaub ntawv raws li cov lus nug uas yuav luag muaj zog li SQL ntawv.

Pom zoo: