MongoDBでcollection名の変更は、db.copyDatabase(fromdb, todb, fromhost)を使います。 dbshell Reference - MongoDB MySLQで、テーブルのコピーは以下のSQLに相当します。 /* testテーブルのスキーマをコピーしてテーブル作成 */ > CREATE TABLE test2 LIKE test; /* test2テーブルのデータをINSERT */ > INSERT INTO test2 SELECT * FROM test;testというdatabaseをtest2としてコピーする方法です。 [root@xxx ~]# mongo MongoDB shell version: 2.0.4 connecting to: test > show dbs test 0.0625GB > db.copyData
Markus Gattolさんの Webサイト にあるすばらしいFAQも参照してください。 "namespace" とは何ですか MongoDB は [BSON] オブジェクトを コレクション の中に格納します。 データベース名とコレクション名(両方をピリオドで結んだもの)の合わせたものが、 namespace と呼ばれています。 たとえば、 acme.users は、namespaceで、acme がデータベース名で、 users がコレクション名です。ピリオド自体をコレクション名に入れることができるので、 acme.blog.posts のような名前も問題ないです。 (この場合 blog.posts がコレクション名です) どうやってコレクションの中のオブジェクトを全件別のコレクションにコピーできますか? 下記参照。下のコードは eval() メソッドを使い、ハイパフォーマンスにサーバ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く