Changes

Jump to: navigation, search

Dbms workshop

1 byte added, 18:27, 17 June 2014
/* Creation de la base FFH */
=== Creation de la base FFH ===
<blockquotepre>use FFH switched to db FFH db FFH</blockquotepre>
'''Initialisation de données'''
<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; }
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; }
</pre>
 
'''Creation de la Collection Membre''' &gt;db.membre.insert(M1) WriteResult({ &quot;nInserted&quot; : 1 }) db.membre.insert(M2) WriteResult({ &quot;nInserted&quot; : 1 })
On Quitte et on se reconnecte &gt; exit bye pboizot@dbi-ntbk02:/u01/projets/mongodb/doc$ /u01/projets/mongodb/bin/mongo MongoDB shell version: 2.6.2 connecting to: test &gt; show dbs FFH 0.078GB admin (empty) local 0.078GB test (empty)
Constat la base FFH existe... &gt;<pre>use FFH</pre>
<blockquote>show collections membre system.indexes
154
edits