<commit_before>### Basic query

![screen shot 2015-05-23 at 11 23 58 am](https://cloud.githubusercontent.com/assets/83296/7784730/456c7706-013e-11e5-987e-addd523c7e5b.png)

#and relation
db.shelf.findOne({age: {$gt: 10, $lt: 90}})
db.shelf.findOne({age: {$gt: 14}, name: /ege3/})

#or relation
db.shelf.findOne({$or: [{age: {$gt: 14}}, {name: /ege3/}, {passion: {$in: [/Ruby/]}}]})


```

```
sudo apt-get install -y mongodb-org=3.0.3 mongodb-org-server=3.0.3 mongodb-org-shell=3.0.3 mongodb-org-mongos=3.0.3 mongodb-org-tools=3.0.3
```


http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu
```
# mongoid 3.x
#
# As discussed in: http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3
#
production: 
  sessions:
    default:<commit_msg>Update mongodb.markdown<commit_after>### Basic query

![screen shot 2015-05-23 at 11 23 58 am](https://cloud.githubusercontent.com/assets/83296/7784730/456c7706-013e-11e5-987e-addd523c7e5b.png)

```
#and relation
db.shelf.findOne({age: {$gt: 10, $lt: 90}})
db.shelf.findOne({age: {$gt: 14}, name: /ege3/})

#or relation
db.shelf.findOne({$or: [{age: {$gt: 14}}, {name: /ege3/}, {passion: {$in: [/Ruby/]}}]})


```

```
sudo apt-get install -y mongodb-org=3.0.3 mongodb-org-server=3.0.3 mongodb-org-shell=3.0.3 mongodb-org-mongos=3.0.3 mongodb-org-tools=3.0.3
```


http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu
```
# mongoid 3.x
#
# As discussed in: http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3
#
production: 
  sessions:
    default:
{'fraction_non_alphanumeric': 0.21502590673575128, 'fraction_numerical': 0.10362694300518134, 'mean_word_length': 4.219594594594595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940790', 'n_tokens_mistral': 804, 'n_tokens_neox': 666, 'n_words': 106}