Cov txheej txheem:

Yuav ua li cas txuas MongoDB rau NetBeans?
Yuav ua li cas txuas MongoDB rau NetBeans?

Video: Yuav ua li cas txuas MongoDB rau NetBeans?

Video: Yuav ua li cas txuas MongoDB rau NetBeans?
Video: Hmong - LUB NEEJ LI CAS? - lus nug txog ntuj ceeb tsheej 2024, Kaum ib hlis
Anonim

Tsim ib JDBC Cov Ntaub Ntawv Source rau MongoDB hauv NetBeans

  1. Driver File(s): Nyem Ntxiv thiab, nyob rau hauv cov ntaub ntawv explorer dialog uas tshwm, xaiv cdata. jdbc ua. mongodb . jar ntaub ntawv.
  2. Driver Class: Nyem Nrhiav mus nrhiav cov chav kawm tsav tsheb hauv JAR. Ces xaiv cdata. jdbc ua. mongodb .
  3. Lub Npe: Sau lub npe rau tus tsav tsheb.

Ua raws li qhov xav tau, JDBC txuas rau MongoDB li cas?

Txhawm rau siv koj cov ntaub ntawv thiab txuas ntawm JDBC koj yuav tsum tau ua tsib kauj ruam hauv qab no:

  1. Ntxiv cov ntaub ntawv JDBC Driver jar los tsim txoj hauv kev.
  2. Import java. sql ua. * pob khoom.
  3. Sau npe rau Database Driver.
  4. Tsim cov Database Txuas.
  5. Kaw kev sib txuas.

Ib sab saum toj no, ntxiv JDBC rau NetBeans li cas? Tsim ib daim ntawv thov JDBC hauv NetBeans: Phau Ntawv Qhia Ib Kauj Ruam

  1. Kauj Ruam 0: Peb Xav Tau Dab Tsi (Tsuas yog, Peb Tau Siv Dab Tsi hauv Kab Lus no) NetBeans 8.2.
  2. Kauj Ruam 1: Teem Koj Tus Neeg Siv MySQL Account.
  3. Kauj ruam 2: Tsim Database.
  4. Kauj ruam 3: Tsim Java Project.
  5. Kauj ruam 4: Ntxiv MySQL JDBC Tsav Tsheb.
  6. Kauj ruam 5: Tsim daim ntawv thov.
  7. Kauj ruam 6: Ua tiav daim ntawv thov.

Ntxiv mus, MongoDB txuas rau database li cas?

Rau txuas rau koj lub zos MongoDB , koj teev Hostname rau localhost thiab Chaw nres nkoj rau 27017. Cov nqi no yog lub neej ntawd rau txhua lub zos MongoDB kev sib txuas (tshwj tsis yog koj hloov lawv). Xovxwm txuas , thiab koj yuav tsum pom cov databases hauv koj lub zos MongoDB.

Kuv puas tuaj yeem siv MongoDB nrog Java?

Txuas ntawm Java . Piv txwv tias koj tau daws koj qhov kev cia siab thiab koj tau teeb tsa koj qhov project, koj npaj txhij mus txuas rau MongoDB ntawm koj Java application . Txij li thaum MongoDB yog cov ntaub ntawv database, tej zaum koj yuav tsis xav tsis thoob thaum kawm tias koj tsis txuas rau nws ntawm ib txwm SQL / kev sib raug zoo DB txoj kev zoo li JDBC.

Pom zoo: