-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMongoDB Document Database Queries with AWS EC2 Server .htm
674 lines (633 loc) · 26.4 KB
/
MongoDB Document Database Queries with AWS EC2 Server .htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"Century Gothic";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
line-height:107%;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
h1
{mso-style-link:"Heading 1 Char";
margin-top:20.0pt;
margin-right:0in;
margin-bottom:2.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;
font-weight:normal;}
h2
{mso-style-link:"Heading 2 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Century Gothic",sans-serif;
color:#032348;
font-weight:normal;}
h3
{mso-style-link:"Heading 3 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Century Gothic",sans-serif;
color:#032348;
font-weight:normal;}
h4
{mso-style-link:"Heading 4 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:12.0pt;
font-family:"Century Gothic",sans-serif;
color:#032348;
font-weight:normal;}
h5
{mso-style-link:"Heading 5 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
color:#032348;
text-transform:uppercase;
font-weight:normal;}
h6
{mso-style-link:"Heading 6 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;
text-transform:uppercase;
font-weight:normal;
font-style:italic;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
{mso-style-link:"Heading 7 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;
font-weight:bold;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
{mso-style-link:"Heading 8 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;
font-weight:bold;
font-style:italic;}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
{mso-style-link:"Heading 9 Char";
margin-top:2.0pt;
margin-right:0in;
margin-bottom:0in;
margin-left:0in;
margin-bottom:.0001pt;
line-height:107%;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;
font-style:italic;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-link:"Header Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-link:"Footer Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoCaption, li.MsoCaption, div.MsoCaption
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:0in;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;
font-variant:small-caps;
color:#146194;
font-weight:bold;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
{mso-style-link:"Title Char";
margin:0in;
margin-bottom:.0001pt;
line-height:85%;
font-size:36.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;
text-transform:uppercase;
letter-spacing:-.75pt;}
p.MsoTitleCxSpFirst, li.MsoTitleCxSpFirst, div.MsoTitleCxSpFirst
{mso-style-link:"Title Char";
margin:0in;
margin-bottom:.0001pt;
line-height:85%;
font-size:36.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;
text-transform:uppercase;
letter-spacing:-.75pt;}
p.MsoTitleCxSpMiddle, li.MsoTitleCxSpMiddle, div.MsoTitleCxSpMiddle
{mso-style-link:"Title Char";
margin:0in;
margin-bottom:.0001pt;
line-height:85%;
font-size:36.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;
text-transform:uppercase;
letter-spacing:-.75pt;}
p.MsoTitleCxSpLast, li.MsoTitleCxSpLast, div.MsoTitleCxSpLast
{mso-style-link:"Title Char";
margin:0in;
margin-bottom:.0001pt;
line-height:85%;
font-size:36.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;
text-transform:uppercase;
letter-spacing:-.75pt;}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
{mso-style-link:"Subtitle Char";
margin-top:0in;
margin-right:0in;
margin-bottom:12.0pt;
margin-left:0in;
font-size:14.0pt;
font-family:"Century Gothic",sans-serif;
color:#052F61;}
a:link, span.MsoHyperlink
{color:#0D2E46;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:#356A95;
text-decoration:underline;}
p.MsoNoSpacing, li.MsoNoSpacing, div.MsoNoSpacing
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
line-height:107%;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:107%;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
{margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:107%;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
{margin-top:0in;
margin-right:0in;
margin-bottom:8.0pt;
margin-left:.5in;
line-height:107%;
font-size:11.0pt;
font-family:"Century Gothic",sans-serif;}
p.MsoQuote, li.MsoQuote, div.MsoQuote
{mso-style-link:"Quote Char";
margin-top:6.0pt;
margin-right:0in;
margin-bottom:6.0pt;
margin-left:.5in;
line-height:107%;
font-size:12.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;}
p.MsoIntenseQuote, li.MsoIntenseQuote, div.MsoIntenseQuote
{mso-style-link:"Intense Quote Char";
margin-right:0in;
margin-bottom:12.0pt;
margin-left:.5in;
text-align:center;
font-size:16.0pt;
font-family:"Century Gothic",sans-serif;
color:#146194;
letter-spacing:-.3pt;}
span.MsoSubtleEmphasis
{color:#595959;
font-style:italic;}
span.MsoIntenseEmphasis
{font-weight:bold;
font-style:italic;}
span.MsoSubtleReference
{font-variant:small-caps;
color:#595959;
border:none;
text-decoration:none;}
span.MsoIntenseReference
{font-variant:small-caps;
color:#146194;
font-weight:bold;
text-decoration:underline;}
span.MsoBookTitle
{font-variant:small-caps;
letter-spacing:.5pt;
font-weight:bold;}
p.MsoTocHeading, li.MsoTocHeading, div.MsoTocHeading
{margin-top:20.0pt;
margin-right:0in;
margin-bottom:2.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Century Gothic",sans-serif;
color:#021730;}
span.HeaderChar
{mso-style-name:"Header Char";
mso-style-link:Header;}
span.FooterChar
{mso-style-name:"Footer Char";
mso-style-link:Footer;}
span.cm-keyword
{mso-style-name:cm-keyword;}
span.cm-variable-2
{mso-style-name:cm-variable-2;}
span.cm-number
{mso-style-name:cm-number;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-link:"Heading 1";
font-family:"Century Gothic",sans-serif;
color:#021730;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-link:"Heading 2";
font-family:"Century Gothic",sans-serif;
color:#032348;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-link:"Heading 3";
font-family:"Century Gothic",sans-serif;
color:#032348;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-link:"Heading 4";
font-family:"Century Gothic",sans-serif;
color:#032348;}
span.Heading5Char
{mso-style-name:"Heading 5 Char";
mso-style-link:"Heading 5";
font-family:"Century Gothic",sans-serif;
color:#032348;
text-transform:uppercase;}
span.Heading6Char
{mso-style-name:"Heading 6 Char";
mso-style-link:"Heading 6";
font-family:"Century Gothic",sans-serif;
color:#021730;
text-transform:uppercase;
font-style:italic;}
span.Heading7Char
{mso-style-name:"Heading 7 Char";
mso-style-link:"Heading 7";
font-family:"Century Gothic",sans-serif;
color:#021730;
font-weight:bold;}
span.Heading8Char
{mso-style-name:"Heading 8 Char";
mso-style-link:"Heading 8";
font-family:"Century Gothic",sans-serif;
color:#021730;
font-weight:bold;
font-style:italic;}
span.Heading9Char
{mso-style-name:"Heading 9 Char";
mso-style-link:"Heading 9";
font-family:"Century Gothic",sans-serif;
color:#021730;
font-style:italic;}
span.TitleChar
{mso-style-name:"Title Char";
mso-style-link:Title;
font-family:"Century Gothic",sans-serif;
color:#146194;
text-transform:uppercase;
letter-spacing:-.75pt;}
span.SubtitleChar
{mso-style-name:"Subtitle Char";
mso-style-link:Subtitle;
font-family:"Century Gothic",sans-serif;
color:#052F61;}
span.QuoteChar
{mso-style-name:"Quote Char";
mso-style-link:Quote;
color:#146194;}
span.IntenseQuoteChar
{mso-style-name:"Intense Quote Char";
mso-style-link:"Intense Quote";
font-family:"Century Gothic",sans-serif;
color:#146194;
letter-spacing:-.3pt;}
.MsoChpDefault
{font-family:"Century Gothic",sans-serif;}
.MsoPapDefault
{margin-bottom:8.0pt;
line-height:107%;}
/* Page Definitions */
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link="#0D2E46" vlink="#356A95">
<div class=WordSection1>
<p class=MsoNormal>By Afsar Ali</p>
<h1><b><span style='font-size:14.0pt'>MongoDB Document Database Queries with
AWS EC2 Server </span></b></h1>
<p class=MsoListParagraphCxSpFirst style='margin-bottom:0in;margin-bottom:.0001pt;
line-height:normal'> </p>
<p class=MsoListParagraphCxSpMiddle style='margin-bottom:0in;margin-bottom:
.0001pt;text-indent:-.25in;line-height:normal'>(1)<span style='font:7.0pt "Times New Roman"'>
</span>what is Document Database, </p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'>A
document database is designed to store semi-structured data as documents,
typically in JSON or XML format. Unlike traditional relational databases, the
schema for each non-relational (NoSQL) document can vary, giving Developers,
Database Administrators, and IT Professionals more flexibility in organizing
and storing application data and reducing storage required for optional values.
</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'> </p>
<p class=MsoListParagraphCxSpMiddle style='margin-bottom:0in;margin-bottom:
.0001pt;text-indent:-.25in;line-height:normal'>(2)<span style='font:7.0pt "Times New Roman"'>
</span>what is MongoDB and identify the benefits of MongoDB,</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'>MongoDB
is NoSQL document database that provides high performance, high availability,
and easy scalability. Some of the benefits are: It can store heterogeneous
data(JSON objects), Deep query-ability. MongoDB supports dynamic queries on
documents using a document-based query language that's nearly as powerful as
SQL, Ease of scale-out: MongoDB is easy to scale, No complex joins, Structure
of a single object is clear.</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'> </p>
<p class=MsoListParagraphCxSpMiddle style='margin-bottom:0in;margin-bottom:
.0001pt;text-indent:-.25in;line-height:normal'>(3)<span style='font:7.0pt "Times New Roman"'>
</span>why SQL queries and queries in MongoDB are different </p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'>Since
MongoDB is document-oriented semi-structured database and SQL is table based
structured database, the queries differ to handle the nested constructs
involved in JSON storage elegantly. Due to the document-oriented nature of the
storage, if it were to do SQL, it really world be a variant, not true SQL. The
extensions would need something like the current MongoDB dot notation to reach
into objects. Development is simplified as MongoDB documents map naturally to
modern, object-oriented programming languages. Using MongoDB removes the
complex object-relational mapping (ORM) layer that translates objects in code
to relational tables. MongoDBs flexible data model also means that your
database schema can evolve with business requirements. For example, schema
changes that took days of weeks in The Weather Channel's MySQL databases could
be made in just hours with MongoDB.</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:1.0in;margin-bottom:.0001pt;line-height:normal'> </p>
<p class=MsoListParagraphCxSpMiddle style='margin-bottom:0in;margin-bottom:
.0001pt;text-indent:-.25in;line-height:normal'>(4)<span style='font:7.0pt "Times New Roman"'>
</span>five queries with questions, queries, and screenshots of Robomongo.</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'> </span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Question 1:</span></b> What emails subject was related to
Appointments, using wild card?</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Query 1: </span></b><span style='font-size:10.0pt;
font-family:Consolas;color:#A9B7C6'>db.enron.find</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>({</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"subject"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> /.*Appointments.*/</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>})</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Screenshot:</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><img
width=594 height=734 id="Picture 1"
src="MongoDB%20Document%20Database%20Queries%20with%20AWS%20EC2%20Server%20_files/image001.jpg"></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Question 2:</span></b> how many emails had the word
confidential in its text?</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Query 2: </span></b><span style='font-size:10.0pt;
font-family:Consolas;color:#A9B7C6'>db.enron.count</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>({</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"text"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> /confidential/</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>})</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Screenshot:</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><img
width=624 height=341 id="Picture 2"
src="MongoDB%20Document%20Database%20Queries%20with%20AWS%20EC2%20Server%20_files/image002.jpg"></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Question 3:</span></b> Lets look at all those emails
with confidential on it?</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Query 3: </span></b><span style='font-size:10.0pt;
font-family:Consolas;color:#A9B7C6'>db.enron.find</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>({</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"text"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'>/confidential/</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>},{</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"sender"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"date"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"subject"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"to"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"text"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"_id"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>0</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>})</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Screenshot:</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><img
width=563 height=355 id="Picture 4"
src="MongoDB%20Document%20Database%20Queries%20with%20AWS%20EC2%20Server%20_files/image003.jpg"></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Question 4:</span></b> all emails less than certain date
with certain columns?</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Query 4: </span></b><span style='font-size:10.0pt;
font-family:Consolas;color:#A9B7C6'>db.enron.find</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>({</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"date"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:{</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"$lt"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> </span><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>ISODate<b>(</b></span><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"2001-02-01"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>)}},{</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"sender"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> </span><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"to"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> </span><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"date"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"subject"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"_id"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>0</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'> </span><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"text"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#83B7C6'>1</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>})</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Screenshot:</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><img
width=509 height=331 id="Picture 3"
src="MongoDB%20Document%20Database%20Queries%20with%20AWS%20EC2%20Server%20_files/image004.jpg"></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Question 5:</span></b> How many times did Rosalee contact
Steven?</p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Query 5: </span></b><span style='font-size:10.0pt;
font-family:Consolas;color:#A9B7C6'>db.enron.find</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>({</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"to"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"[email protected]"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>,</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"sender"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>:</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#6A8759'>"[email protected]"</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>})</span></b><span
style='font-size:10.0pt;font-family:Consolas;color:#A9B7C6'>.count</span><b><span
style='font-size:10.0pt;font-family:Consolas;color:#CC7832'>()</span></b></p>
<p class=MsoListParagraphCxSpMiddle style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><b><span
style='color:#00B050'>Screenshot:</span></b></p>
<p class=MsoListParagraphCxSpLast style='margin-top:0in;margin-right:0in;
margin-bottom:0in;margin-left:.25in;margin-bottom:.0001pt;line-height:normal'><img
width=541 height=346 id="Picture 5"
src="MongoDB%20Document%20Database%20Queries%20with%20AWS%20EC2%20Server%20_files/image005.jpg"></p>
</div>
</body>
</html>