freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

mongodb基本命令-文庫吧資料

2024-08-08 04:05本頁面
  

【正文】 說明:指定數(shù)據(jù)存儲目錄和日志目錄,如果采用安全認證模式,需要加上auth選項,如:mongod auth dbpath /usr/mongo/data logfile /var/ 以修復模式啟動mongod repair以修復模式啟動數(shù)據(jù)庫。1查詢并統(tǒng)計結(jié)果記錄數(shù)use fragment().count()find()可以提供查詢參數(shù),然后查詢并統(tǒng)計結(jié)果,如下所示:[plain] view plaincopy use fragment switched to db fragment ().count() 36749 上述執(zhí)行先根據(jù)查詢條件查詢結(jié)果,然后統(tǒng)計了查詢數(shù)據(jù)庫fragment的baseSe結(jié)果記錄集合中記錄數(shù)。1刪除索引刪除索引給出了兩個方法:[plain] view plaincopy(name) () 第一個通過指定索引名稱,第二個刪除指定集合的全部索引。()可以查詢?nèi)克饕?。url39。title39。39。version39。}) { _id : ObjectId(4ef970f23c1fc4613425accc), version : , segment : e3ol6 } 查詢多條記錄使用find()函數(shù),參數(shù)指定查詢條件,不指定條件則查詢?nèi)坑涗洝?39。查詢一條記錄使用findOne()函數(shù),參數(shù)為查詢條件,可選,系統(tǒng)會隨機查詢獲取到滿足條件的一條記錄(如果存在查詢結(jié)果數(shù)量大于等于1)示例如下所示:[plain] view plaincopy ({39。e3ol639。segment39。39。version39。:17855200}) { ok : 1 } show collections replicationColletion storeCollection 刪除集合刪除集合,()。:10240, 39。:true, 39。, {39。創(chuàng)建集合(name, { size : ..., capped : ..., max : ... } )創(chuàng)建集合,示例如下所示:[plain] view plaincopy (39。}) show dbs LuceneIndexDB admin local (empty) pagedb test 可見,在use指定數(shù)據(jù)庫后,并且向指定其中的一個集合并插入數(shù)據(jù)后,數(shù)據(jù)庫和集合都被創(chuàng)建了。:39。, 39。:39。在MongoDB中,你可以直接通過use dbname來切換到這個數(shù)據(jù)庫上下文下面,系統(tǒng)會自動延遲創(chuàng)建該數(shù)據(jù)庫,例如:[plain] view plaincopy show dbs admin local (empty) pagedb test use LuceneIndexDB switched to db LuceneIndexDB show dbs admin local (empty) pagedb test db LuceneIndexDB ({39。查詢指定數(shù)據(jù)庫統(tǒng)計信息use fragment()查詢結(jié)果示例如下所示:[plain] view plaincopy () { db : fragment, collections : 12, objects : 384553, avgObjSize : , dataSize : 1164581068, storageSize : 1328351744, numExtents : 109, indexes : 10, indexSize : 16072704, fileSize : 4226809856, ok : 1 } 顯示fragment數(shù)據(jù)庫的統(tǒng)計信息?;久罴皩嵗旅嫱ㄟ^實際的例子來演示一些常見的命令:(一)基本命令show dbs顯示當前數(shù)據(jù)庫服務器上的數(shù)據(jù)庫use pagedb 切換到指定數(shù)據(jù)庫pagedb的上下文,可以在此上下文中管理pagedb數(shù)據(jù)庫以及其中的集合等show collections顯示數(shù)據(jù)庫中所有的集合(collection)() 查看數(shù)據(jù)庫服務器的狀態(tài)。new39。x39。如果想要得到更多,而且每個命令的詳細用法,()查詢。ame39。 use to further iterate = x set default number of items to display on shell exit quit the mongo shell 這是MongoDB最頂層的命令列表,主要告訴我們管理數(shù)據(jù)庫相關(guān)的一些抽象的范疇:數(shù)據(jù)庫操作幫助、集合操作幫助、管理幫助。MongoDB命令幫助系統(tǒng)在安裝MongoDB后,啟動服務器進程(mongod),可以通過在客戶端命令mongo實現(xiàn)對MongoDB的管理和監(jiān)控。MongoDB基本管理命令分類: Database 20111227 17:03 2059人閱讀 評論(1) 收藏 舉報MongoDB是一個NoSQL數(shù)據(jù)庫系統(tǒng):一個數(shù)據(jù)庫可以包含多個集合(Collection),每個集合對應于關(guān)系數(shù)據(jù)庫中的表;而每個集合中可以存儲一組由列標識的記錄,列是可以自由定義的,非常靈活,由一組列標識的實體的集合對應于關(guān)系數(shù)據(jù)庫表中的行。下面通過熟悉MongoDB的基本管理命令,來了解MongoDB提供的DBMS的基本功能和行為??匆幌翸ongoDB的命令幫助系統(tǒng):[plain] view plaincopyrootdev2:~ mongo MongoDB shell version: connecting to: test help () help on db methods () help on collection methods () help on replica set methods help connect connecting to a db help help admin administrative help help misc misc things to know help mr mapreduce help show dbs show database names show collections show collections in current database show users show users in current database show profile show most recent entries with time = 1ms use db_name set current database () list objects in collection foo ( { a : 1 } ) list objects in foo where a == 1 it result of the last line evaluated。如果你想了解數(shù)據(jù)庫操作更詳細的幫助命令,(),如下所示:[plain] view plaincopy () DB methods: (username, password[, readOnly=false]) (username, password) (fromhost) (name) returns the help for the mand (fromdb, todb, fromhost) (name, { size : ..., capped : ..., max : ... } ) () d
點擊復制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1