Puas yog Django siv SQL?
Puas yog Django siv SQL?

Video: Puas yog Django siv SQL?

Video: Puas yog Django siv SQL?
Video: Da Vang - Puas Yog Nyuab2 Koj (nkauj tawm tshiab 2021) 2024, Hlis ntuj nqeg
Anonim

Ua tau siv Django , koj tsis tas yuav siv SQL . Ua tau siv Django , koj tsis tas yuav siv SQL . Qhov tseeb, Django ua rau nws nyuaj heev rau koj siv SQL ncaj qha nrog nws. Nws los nrog ORM (Object Relational Mapper), uas ua feem ntau ntawm cov tom qab scenes ua haujlwm rau koj.

Tib neeg kuj nug, Django puas txhawb SQL Server?

Yuav kom daws tau qhov teeb meem thawj zaug, peb pom django ua -pyodbc-azure, uas yog "ib rab diav rawg niaj hnub django ua -pyodbc, ib Django Microsoft SQL Server sab nraud DB backend uas siv ODBC los ntawm kev ntiav cov tsev qiv ntawv pyodbc". Nws txhawb Django 2.0. x thiab tseem ceeb tshaj, nws kuj txhawb nqa Microsoft SQL Server.

Ib yam li ntawd, Django puas xav tau database? Koj yuav tsum siv a database cav yog tias koj xav siv ib co nta ntawm django ua , zoo li kev sib tham, piv txwv li. Yog tias koj xav siv ntu lossis khaws qee cov ntaub ntawv siv django ua apps, tab sis ua tsis xav tau ua tag nrho cov nyuaj database configurations, koj tuaj yeem siv sqlite3 ua koj li database cav.

Kuj paub, cov ntaub ntawv twg yog qhov zoo tshaj plaws rau Django?

4 Teb. Yog tias koj yuav siv a kev sib txheeb database , qhov nrov tshaj plaws hauv zej zog Django zoo li PostgreSQL. Nws yog kuv tus kheej nyiam. Tab sis, MongoDB zoo li tau txais txiaj ntsig zoo hauv Python / Django zej zog ib yam nkaus (Kuv tsis tau ua ib txoj haujlwm nrog nws, txawm li cas los xij).

Dab tsi databases txhawb Django?

Ntxiv rau SQLite, Django txoj cai txhawb nqa (i.e. suav nrog Django nws tus kheej) peb lwm yam kev sib raug zoo databases uas suav nrog: PostgreSQL, MySQL thiab Oracle.

Pom zoo: