Difference between revisions of "MongoDB"

From mi-linux
Jump to navigationJump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Main Page]] >> MongoDB
  
 
== MongoDB Workbook ==
 
== MongoDB Workbook ==
  
Not this workbook is currently in progress!
+
MongoDB is a NoSQL database available on mi-linux, using a command line prompt.
  
MongoDB is a NoSQL database available on mi-linux, using a command line prompt. If you are taking a module using this database you will have an account automatically created for you. If you are a Project student who wishes to use the database, please contact M.Garvey@wlv.ac.uk to get an account setup.
+
If you are taking a module using this database you will have an account automatically created for you. If you are a Project student who wishes to use the database, please contact [mailto:m.garvey@wlv.ac.uk Mary Garvey]  to get an account setup.
  
 +
Commands to try out are in a box, for example:
  
== Using MongoDB ==
+
db.myCollectionName.find();
  
To access the database, first login to mi-linux.wlv.ac.uk (csl-student.wlv.ac.uk) using your University username and password.
+
There will be exercises for you to try out too. In some cases you will be given the results so you can check your answer. These will also be presented in a blue font, for example:
  
mi-linux can be accessed using a Secure Shell client, such as Putty, that is available using the Apps Anywhere system.
+
<pre style="color: blue">
 +
db.myCollectionName.find(deptNo: 10);
 +
</pre>
  
== Starting MongoDB ==
+
Syntax examples will be shown in a purple font, for example:
  
 +
<pre style="color:purple">
 +
db.collectionName.update({'keyField': 'value' },
 +
  {$set: field: 'newValue' }
 +
)
 +
</pre>
  
 +
This are included for reference purposes.
  
  
== Changing Password ==
+
'''Note: this workbook is currently Work in Progress!'''.
  
Once you have logged into MongoDB successfully you can change the default password:
+
If you spot any errors, please inform: [mailto:m.garvey@wlv.ac.uk Mary Garvey], quoting the URL of the page with the issue.
  
db.updateUser("myStudentNumber",
 
{
 
pwd: "myNewPassword",
 
    }
 
);
 
  
 +
----
  
Replacing myStudentNumber with your University student number and myNewPasswor with your new password.
+
[[MongoDB_Workbook|MongoDB Workbook]]

Latest revision as of 19:55, 13 November 2017

Main Page >> MongoDB

MongoDB Workbook

MongoDB is a NoSQL database available on mi-linux, using a command line prompt.

If you are taking a module using this database you will have an account automatically created for you. If you are a Project student who wishes to use the database, please contact Mary Garvey to get an account setup.

Commands to try out are in a box, for example:

db.myCollectionName.find();

There will be exercises for you to try out too. In some cases you will be given the results so you can check your answer. These will also be presented in a blue font, for example:

 db.myCollectionName.find(deptNo: 10);

Syntax examples will be shown in a purple font, for example:

 db.collectionName.update({'keyField': 'value' }, 
  {$set: field: 'newValue' }
 )

This are included for reference purposes.


Note: this workbook is currently Work in Progress!.

If you spot any errors, please inform: Mary Garvey, quoting the URL of the page with the issue.



MongoDB Workbook