-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathADMS.js
222 lines (190 loc) · 5.53 KB
/
ADMS.js
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
db.createCollection("students");
db.students.insert({_ID:1, Studentname:"Michelle Jacintha", Grade: "VII", Hobbies:"Internet Surfing"});
db.students.insert({_ID:2, Studentname:"Mabel Mathews", Grade: "VII", Hobbies:"Baseball"});
db.students.find();
---------------------------------------------------------------------------------------
db.createCollection("mycol");
db.mycol.insert({_ID:"ObjectId(7df78ad8902c)", Title:"MongoDB Overview", Description:"MongoDB is no sql database", By:"CGPIT", url:"www.cgpit-bardoli.edu", Tages:"mongodb,database,NoSQL", Likes:"100"});
db.mycol.find();
---------------------------------------------------------------------------------------
db.createCollection("post");
db.post.insert({_ID:"ObjectId(7df78ad8902c)", Title:"MongoDB Overview", Description:"MongoDB is no sql database", By:"CGPIT", url:"www.cgpit-bardoli.edu", Tages:"mongodb,database,NoSQL", Likes:"100", comment:""});
db.post.insert({ Title:"NoSQLDatabas",
Description:"NoSQL database does not have tables",
By:"UTU",
url:"www.utu.ac.in",
Tages:["mongodb","database","NoSQL"],
Likes:"20",
comment:[
{
user: 'user1',
message: 'New Pic',
DateCreated: new Date(2017,07,01,2.26),
Like:0
}
]
})
db.post.find();
---------------------------------------------------------------------------------------
db.createCollection("Company");
db.Company.insert({_ID:1,
Name:{first:"John",last:"Backus"},
Birth:ISODate("1924-12-03T05:00:00Z"),
Death:ISODate("2007-03-17T04:00:00Z"),
Contribs:"Fortran,ALGOL,Backus-Naur Form,FP",
award:[
{
award:"W.W. McDowell Award",
year:1967,
by:"IEEE Computer Society"
},
{
award:"National Medal of Science",
year:1975,
by:"National Science Foundation"
},
{
award:"Turing Award",
year:1977,
by:"ACM"
},
{
award:"Draper Prize",
year:1993,
by:"National Academy of Engineering"
},
]
})
db.Company.insert({_ID:"51df07b094c6acd67e492f41",
Name:{first:"John",last:"McCarthy"},
Birth:ISODate("1927-09-04T04:00:00Z"),
Death:ISODate("2011-12-24T05:00:00Z"),
Contribs:"Lisp,Artificial Intelligence,ALGOL",
award:[
{
award:"Turing Award",
year:1971,
by:"ACM"
},
{
award:"Kyoto Prize",
year:1988,
by:"Inamori Foundation"
},
{
award:"National Medal of Science",
year:1990,
by:"National Science Foundation"
},
]
})
db.Company.insert({_ID:3,
Name:{first:"Grace",last:"Hopper"},
title:"Rear Admiral",
Birth:ISODate("1906-12-09T05:00:00Z"),
Death:ISODate("1992-01-01T05:00:00Z"),
Contribs:"UNIVAC,compiler,FLOW-MATIC,COBOL",
award:[
{
award:"Computer Sciences Man of the Year",
year:1969,
by:"Data Processing Management Association"
},
{
award:"Distinguished Fellow",
year:1973,
by:"British Computer Society"
},
{
award:"W. W. McDowell Award",
year:1976,
by:"IEEE Computer Society"
},
{
award:"National Medal of Technology",
year:1991,
by:"United States"
},
]
})
db.Company.insert({_ID:4,
Name:{first:"Kristen",last:"Nygaard"},
Birth:ISODate("1926-08-27T04:00:00Z"),
Death:ISODate("2002-08-10T04:00:00Z"),
Contribs:"OOP,Simula",
award:[
{
award:"Rosing Prize",
year:1999,
by:"Norwegian Data Association"
},
{
award:"Turing Award",
year:2001,
by:"ACM"
},
{
award:"IEEE John von Neumann Medal",
year:2001,
by:"IEEE"
},
]
})
db.Company.insert({_ID:5,
Name:{first:"Ole-Johan",last:"Dahl"},
Birth:ISODate("1931-10-12T04:00:00Z"),
Death:ISODate("2002-06-29T04:00:00Z"),
Contribs:"OOP,Simula",
award:[
{
award:"Rosing Prize",
year:1999,
by:"Norwegian Data Association"
},
{
award:"Turing Award",
year:2001,
by:"ACM"
},
{
award:"IEEE John von Neumann Medal",
year:2001,
by:"IEEE"
},
]
})
db.Company.insert({_ID:6,
Name:{first:"James",last:"Gosling"},
Birth:ISODate("1955-05-19T04:00:00Z"),
Contribs:"java",
award:[
{
award:"The Economist Innovation Award",
year:2002,
by:"The Economist"
},
{
award:"Officer of the Order of Canada",
year:2007,
by:"Canada"
},
]
})
db.Company.insert({_ID:7,
Name:{first:"Yukihiro",last:"Matz,last:Matsumoto"},
Birth:ISODate("1965-04-14T04:00:00Z"),
Contribs:"Ruby",
award:[
{
award:"Award for the Advancement of Free Software",
year:2011,
by:"Free Software Foundation"
},
]
})
db.Company.insert({_ID:8,
Name:{first:"Martin",last:"Odersky"},
Contribs:"Scala",})
db.Company.find();
----------------------------------------------------------------------------------------------
pr1)