開発者ツール

MongoDBガイド

開発データ、コード、検索作業に使えるブラウザツールです。

カテゴリコマンド説明
ConnectionmongoshConnect to a local MongoDB server.
Connectionmongosh "mongodb://localhost:27017/app_db"Connect to a specific database with a connection string.
Databaseshow dbsList databases.
Databaseuse app_dbSwitch to a database. It is created when data is inserted.
Collectionshow collectionsList collections in the current database.
Collectiondb.createCollection("users")Create a collection explicitly.
Insertdb.users.insertOne({ email: "demo@example.com", createdAt: new Date() })Insert one document.
Insertdb.users.insertMany([{ email: "a@example.com" }, { email: "b@example.com" }])Insert multiple documents.
Readdb.users.find({ email: /@example.com$/ }).sort({ createdAt: -1 }).limit(20)Query, sort, and limit documents.
Readdb.users.findOne({ email: "demo@example.com" })Find a single matching document.
Updatedb.users.updateOne({ email: "demo@example.com" }, { $set: { active: true } })Update one matching document.
Updatedb.users.updateMany({ active: { $exists: false } }, { $set: { active: true } })Update many matching documents.
Deletedb.users.deleteOne({ email: "demo@example.com" })Delete one matching document.
Deletedb.users.deleteMany({ active: false })Delete many matching documents.
Indexdb.users.createIndex({ email: 1 }, { unique: true })Create a unique ascending index.
Indexdb.users.getIndexes()List collection indexes.
Aggregationdb.orders.aggregate([{ $group: { _id: "$userId", total: { $sum: "$total" } } }])Group documents and compute totals.
Countdb.users.countDocuments({ active: true })Count matching documents.
Backupmongodump --db app_db --out ./backupExport a database backup.
Restoremongorestore --db app_db ./backup/app_dbRestore a dumped database.

概念

MongoDBの基本

概念意味
DocumentA JSON-like BSON object stored in a collection.
CollectionA group of documents, roughly comparable to a table but schema-flexible.
DatabaseA namespace containing collections and indexes.
ObjectIdThe common default value for the _id primary key.
IndexA data structure that speeds up reads and supports uniqueness constraints.
AggregationA pipeline for transforming, grouping, filtering, and joining document data.

ツールガイド

使い方: MongoDBガイド

概要

開発データ、コード、検索作業に使えるブラウザツールです。 結果を使用する前に確認するための、簡単な手順を説明します。

手順

  1. MongoDBガイド を開き、処理する入力データのコピーを準備します。
  2. ツールで求められるファイル、テキスト、または値を入力します。
  3. 目的に合う設定を選び、処理を開始します。
  4. コピー、ダウンロード、共有の前に結果を確認します。

まず短い機密性のない例で結果を確認してから、最終的なコンテンツで同じ操作を行ってください。

結果を使用する前に

  • NovaKit のツールはブラウザ内での利用を想定しています。処理する権限のあるデータだけを使用してください。
  • 元のデータを保持し、重要な結果は意思決定や最終文書に使う前に確認してください。

FAQ

よくある質問

MongoDBガイド: 結果はどのように確認しますか?

開発データ、コード、検索作業に使えるブラウザツールです。

MongoDBガイド: 結果はどのように確認しますか?

MongoDBガイド を開き、処理する入力データのコピーを準備します。 ツールで求められるファイル、テキスト、または値を入力します。 目的に合う設定を選び、処理を開始します。 コピー、ダウンロード、共有の前に結果を確認します。

結果はどのように確認しますか?

使用前に出力を読み直し、プレビューまたはテストしてください。

アカウントの作成は必要ですか?

いいえ。NovaKit のツールはアカウントなしで直接使用できます。

データはどのように扱われますか?

NovaKit のツールはブラウザ内での利用を想定しています。処理する権限のあるデータだけを使用してください。

注意すべき点はありますか?

元のデータを保持し、重要な結果は意思決定や最終文書に使う前に確認してください。

MongoDBガイド にはどのような例を使えますか?

まず短い機密性のない例で結果を確認してから、最終的なコンテンツで同じ操作を行ってください。

結果のコピーを保存できますか?

利用できるコピー、ダウンロード、印刷、エクスポート機能を使い、確認が終わるまで元の入力を保持してください。

関連ツール

作業を続ける