Yintoni i-SQL?

Ngu-Allen G. Taylor

Into yokuqala yokuqonda malunga ne-SQL kukuba i-SQL ayisiyiyo ulwimi lwenkqubo, njengokuba IPython , C, C ++, C #, kunye IJava . Ukusombulula ingxaki kulwimi lwenkqubo, ubhala Inkqubo Ulandelelwano lwemiyalelo eyenza umsebenzi othile emva komnye kude kube kugqityiwe umsebenzi. Inkqubo inokuba kukulandelelana ngokuthe ngqo okuthe ngqo okanye inokuphinda ibuye umva, kodwa kuyo nayiphi na imeko, umdwelisi nkqubo ukhankanya indlela yokuphunyezwa.



SQL

Ukusombulula iingxaki usebenzisa i-SQL.



I-SQL, kwelinye icala, yiyo engenzi nkqubo. Ukusombulula ingxaki usebenzisa i-SQL, vele uxelele i-SQL Intoni ufuna (ngokungathi uthetha no-Aladdin's genie) endaweni yokuxelela inkqubo indlela yokufumana into oyifunayo. Inkqubo yolawulo lwedatha (DBMS) igqiba ngeyona ndlela yokufumana okucelayo.

Konke kulungile. Uxelelwe nje ukuba i-SQL ayilolwimi lwenkqubo- kwaye oko kuyinyani. Nangona kunjalo, izigidi zabadwelisi benkqubo phaya (kwaye mhlawumbi ungomnye wabo) baqhele ukusombulula iingxaki ngendlela yenkqubo. Ke, kule minyaka idlulileyo, bekukho uxinzelelo oluninzi ukongeza ukusebenza kwenkqubo kwi-SQL- kwaye i-SQL ngoku ibandakanya amanqaku olwimi lwenkqubo: BEGIN iibhlokhi, IF iingxelo, imisebenzi, kunye (ewe) iinkqubo. Ngala maziko ongezelelweyo, ungagcina iinkqubo kwiserver, apho abathengi abaninzi banokusebenzisa iinkqubo zakho rhoqo.



Ukubonisa ukuba kuthetha ukuthini ukuxelela inkqubo into oyifunayo, masithi unetafile YOMSEBENZI ofuna ukufumana kuyo imiqolo ehambelana nabo bonke abantu abadala. Ufuna ukuchaza umntu omkhulu njengaye nabani na ongaphezulu kweminyaka engama-40 okanye nabani na ofumana ngaphezulu kwe- $ 100,000 ngonyaka. Unokwenza ukubuyisa okufunwayo ngokusebenzisa lo mbuzo ulandelayo:

Age

Le ngxelo ibuyisa yonke imiqolo kwitafile YOMSEBENZI apho ixabiso likwi Salary ikholamu inkulu kuno-40 okanye ixabiso kwi

SELECT * FROM EMPLOYEE WHERE Age > 40 OR Salary > 100000 ;
ikholamu inkulu kune-100,000. Kwi-SQL, awunyanzelekanga ukuba uchaze ukuba ulwazi lufunyanwa njani. Injini yedatha ivavanya isiseko sedatha kwaye igqibe ngokwakho ukuba isifezekisa njani isicelo sakho. Kufuneka uchaze kuphela ukuba yeyiphi idatha ofuna ukuyifumana.

UKUYA Umbuzo weSQL Ngaba ngumbuzo owubuza kwisiseko sedatha. Ukuba nayiphi na idatha ekwiziko ledatha yanelisa iimeko zombuzo wakho, i-SQL iyayifumana loo datha.



Ukuphunyezwa kwe-SQL yangoku kuswele uninzi lweenkqubo ezisisiseko zokwakha ezisisiseko kuninzi lweelwimi. Izicelo zokwenyani zehlabathi zihlala zifuna ubuncinci ezinye zezi nkqubo zakhiweyo, yiyo loo nto i-SQL iyidatha ulwimi. Ngaphandle kolwandiso olongezwe ngo-1999, 2003, 2005, 2008, no-2011, kusafuneka usebenzise i-SQL ngokudibanisa nolwimi lwenkqubo (njenge-C ++) ukwenza usetyenziso olupheleleyo.

Unokukhupha ulwazi kwiziko ledatha usebenzisa i-SQLin enye yeendlela ezimbini:

  • Yenza ifayile ye- umbuzo ongxamisekileyo Kwikhibhodi yakho ngokuchwetheza ingxelo ye-SQL kunye nokufunda iziphumo kwiscreen. Imibuzo evela kwikhibhodi ifanelekile xa ufuna impendulo ekhawulezileyo kumbuzo othile. Ukuhlangabezana nemfuno ekhawulezileyo, unokufuna ulwazi ongazange walufuna ngaphambili kwiziko ledatha. Ngokuqinisekileyo ngekhe uphinde uludinge olo lwazi, kodwa uyalufuna ngoku. Ngenisa ingxelo ye-SQL efanelekileyo kwikhibhodi, kwaye ngexesha elifanelekileyo, iziphumo ziyavela kwiscreen sakho.
  • Yenza inkqubo eqokelela ulwazi kwiziko ledatha kwaye emva koko inike ingxelo kulwazi olukwiskrini okanye kwingxelo eprintiweyo. Ukubandakanya umbuzo we-SQL ngqo kwinkqubo yindlela elungileyo yokuqhuba umbuzo onobunzima oza kuwuqhuba kwakhona kwixesha elizayo. Ngale ndlela, unokwenza umbuzo kube kanye ukuba uwusebenzise rhoqo njengoko ufuna.

Imbali (kakhulu) encinci ye-SQL

I-SQL ivela kwenye yeelebhu zophando ze-IBM, njengoko kunjalo nethiyori yolwazi olunxulumene nolwalamano. Kwii-1970s zakuqala, njengoko abaphandi be-IBM baphuhlisa iinkqubo ze-DBMS (okanye i-RDBMS) zakwangoko, bayila idatha yolwimi ukuze basebenze kwezi nkqubo. Bayibiza ngokuba yinguqulelo yangaphambi kokukhutshwa kolu lwimi UKULANDELANA ( S Ukutsalwa NGU Nglish INTONI ry U-L Ulwimi). Nangona kunjalo, xa kufika ixesha lokuba bakhulule ngokusesikweni ulwimi lwabo lwemibuzo njengemveliso, bafumanisa ukuba enye inkampani sele ithengisile igama lemveliso uSequel. Ke ngoko, iingqondi zentengiso kwi-IBM zigqibe kwelokuba zinike imveliso ekhutshiweyo igama elahlukileyo kwi-SEQUEL kodwa isaziwa njengelungu losapho olunye. Bayibiza ngokuba yi-SQL Umxholo-ell . Nangona ukubizwa ngokusesikweni ku-ess-que-ell, abantu babeqhele ukubiza iSequel kwiintsuku zokuqala zokukhutshwa kwaye baqhubeka besenza njalo. Lo mkhwa uqhubekile ukuza kuthi ga ngoku; abanye abantu baya kuthi Sequel kwaye abanye baya kuthi SQ-L, kodwa bobabini bathetha ngento enye.

I-syntax ye-SQL luhlobo lwesiNgesi esakhiweyo, kulapho lavela khona igama laso loqobo. Nangona kunjalo, i-SQL ayilolwimi olucwangcisiweyo ngengqondo yokuba iinzululwazi zekhompyuter ziyaliqonda elo gama. Ke ngoko, ngaphandle kokucingelwa ngabantu abaninzi, i-SQL ayisosifaniso sokuma kolwimi olucwangcisiweyo. Kukulandelelana koonobumba abathathu abangajamelani nantoni na, njengegama le-C ulwimi alimele nantoni na.

Umsebenzi we-IBM kunye noovimba beenkcukacha zonxibelelwano kunye ne-SQL yayisaziwa kakuhle kwishishini nangaphambi kokuba i-IBM yazise ngemveliso yayo ye-SQL / DS yolwazi (RDBMS) ngo-1981. Ngelo xesha, i-Relational Software, Inc. (ngoku eyi-Oracle Corporation) yayisele ikhuphe i-RDBMS yayo yokuqala. . Ezi mveliso zakwangoko ziseta imigangatho yodidi olutsha lweenkqubo zolawulo lwedatha. Babandakanya i-SQL, eyathi yangumgangatho we-facto yolwazi lweedatha. Abathengisi bezinye iinkqubo zolawulo lwesiseko sedatha baphuma neenguqu zabo ze-SQL. Ngokwesiqhelo, olu olunye uphumezo luqulathe konke ukusebenza okungundoqo kweemveliso ze-IBM, ezandisiweyo ngeendlela ezazisebenzisa amandla athile emveliso yazo ye-RDBMS. Ngenxa yoko, nangona phantse bonke abathengisi basebenzise uhlobo oluthile lwe-SQL, ukuhambelana phakathi kwamaqonga kwakungekho mgangathweni.

Ukuphunyezwa yi-RDBMS ethile esebenza kwiqonga elithile lehardware.

Kungekudala intshukumo yaqala, ukwenza umgangatho we-SQL owamkelwa kwilizwe liphela apho wonke umntu angabambelela. Ngo-1986, i-ANSI (iZiko leMigangatho yeSizwe laseMelika) yakhupha umgangatho osesikweni owabizwa ngegama I-SQL-86. I-ANSI ihlaziye loo mgangatho ngo-1989 ukuya ku I-SQL-89 kwaye kwakhona ngo-1992 ukuya I-SQL-92. Njengoko abathengisi be-DBMS beqhubeka ngokukhutshwa kweemveliso zabo, bazama ukuzisa ukufezekiswa kwabo kufutshane nalo mgangatho. Le nzame izise injongo yokuthwala kwe-SQL yokwenyani kufutshane nenyani.

Olona hlobo lutsha lwamva nje lwe-SQL esemgangathweni yi-SQL: 2016 (ISO / IEC 9075-X: 2016) .. Zonke iinkqubo ezithile ze-SQL zahlukile kumgangatho ukuya kwinqanaba elithile. Kuba imigangatho epheleleyo ye-SQL ibanzi, ukuphunyezwa okwangoku akunakulindeleka ukuba kuxhaswe ngokupheleleyo. Nangona kunjalo, abathengisi be-DBMS basebenzela ukuxhasa iseti esezantsi yolwimi oluqhelekileyo lwe-SQL. Umgangatho opheleleyo we-ISO / IEC ngu iyafumaneka ukuze ithengwe , kodwa awufuni kuyithenga ngaphandle kokuba unenjongo yokwenza eyakho i-ISO / IEC SQL inkqubo yolawulo lwedatha esemgangathweni. Umgangatho ubuchwephesha kakhulu kwaye awunakuqondakala nakubani na ngaphandle kwesazi solwimi lwekhompyuter.