Changes

Dbms workshop

13 bytes removed, 18:24, 17 June 2014
/* Mise en place d'une base mongodb */
== Semaine 4 17/06/2014 ==
== Mise en place d'une base mongodb ==
=== Installation ===
Téléchargement depuis le site http://www.mongodb.org/downloads
Soit la racine /u01/projets/mongodb
les binaires dans /u01/projets/mongodb/bin &gt; <pre> bsondump mongo mongod mongodump mongoexport mongofiles mongoimport mongooplog mongoperf mongorestore mongos mongostat mongotop</pre>
Un repertoire data/db à la racine.
=== Lancement du serveur ===
<blockquotepre>/u01/projets/mongodb/bin/mongod --dbpath /u01/projets/mongodb/data/db 2014-06-17T19:05:22.147+0200 [initandlisten] MongoDB starting : pid=14868 port=27017 dbpath=/u01/projets/mongodb/data/db 64-bit host=dbi-ntbk02 2014-06-17T19:05:22.151+0200 [initandlisten] db version v2.6.2 2014-06-17T19:05:22.152+0200 [initandlisten] git version: 4d06e27876697d67348a397955b46dabb8443827 2014-06-17T19:05:22.152+0200 [initandlisten] build info: Linux build10.nj1.10gen.cc 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49</blockquotepre>=== lancement du client ===
<blockquotepre>boizot@dbi-ntbk02:/u01/projets/mongodb/doc$ /u01/projets/mongodb/bin/mongo MongoDB shell version: 2.6.2 connecting to: test show dbs admin (empty) local 0.078GB</blockquotepre>=== Creation de la base FFH ===
<blockquote>use FFH switched to db FFH db FFH
</blockquote>
'''Initialisation de données''' &gt; <pre> M1 = { Member_pseudo : &quot;Pirboazo&quot;, Member_num : 123001, Langue:'fr' } { &quot;Member_pseudo&quot; : &quot;Pirboazo&quot;, &quot;Member_num&quot; : 123001, &quot;Langue&quot; : &quot;fr&quot; }
<blockquote>M2 = { Member_pseudo : &quot;Yv&quot;, Member_num : 3001, Langue:'fr' } { &quot;Member_pseudo&quot; : &quot;Yv&quot;, &quot;Member_num&quot; : 3001, &quot;Langue&quot; : &quot;fr&quot; }</blockquotepre>
'''Creation de la Collection Membre''' &gt;db.membre.insert(M1) WriteResult({ &quot;nInserted&quot; : 1 }) db.membre.insert(M2) WriteResult({ &quot;nInserted&quot; : 1 })
154
edits