This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE instabook; | |
CREATE TABLE Profiles( | |
ProfileId int NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
FullName varchar(255) NOT NULL, | |
UserHandle varchar(255) NOT NULL, | |
EmailAddress varchar(255) NOT NULL, | |
Description varchar(1000) NULL, | |
Picture varchar(500) NULL | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('filmstore'); | |
db.movie.insertMany([ | |
{"title":"I.D.","year":1995,"rated":null,"runtime":107,"countries":["Germany","UK"],"genres":["Crime","Drama"],"director":"Philip Davis","writers":["Jim Bannon","Vincent O'Connell"],"actors":["Reece Dinsdale","Richard Graham","Perry Fenwick","Philip Glenister"],"plot":"Four policemen go undercover and infiltrate a gang of football hooligans hoping to root-out their leaders. For one of the four, the line between 'job' and 'yob' becomes more unclear as time...","poster":"http://ia.media-imdb.com/images/M/MV5BMjEwNTU1MDY1NF5BMl5BanBnXkFtZTcwNTA2NTcxMQ@@._V1_SX300.jpg","imdb":{"id":"tt0113375","rating":7.4,"votes":4441},"awards":{"wins":1,"nominations":1,"text":"1 win \u0026 1 nomination."},"type":"movie"}, | |
{"title":"Before We Go","year":2014,"rated":"PG-13","runtime":95,"countries":["USA"],"genres":["Comedy","Drama","Romance"],"director":"Chris Evans","writers":["Ronald Bass","Jen Smolka","Chris Shafer","Paul Vicknair","Ronald Bass","Jen Smolka"],"actors":["Alice Eve","Ch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('filmstore'); | |
db.actor.insertMany([{ | |
"_id": ObjectId("5fb8415892085e5d0ced38dc"), | |
"name": "Catherine Missal", | |
"rating": 4875, | |
"alternative_name": null | |
},{ | |
"_id": ObjectId("5fb8415892085e5d0ced38dd"), | |
"name": "Monica Bellucci", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('filmstore'); | |
db.movie.bulkWrite([{updateOne:{ | |
filter:{"title":"A Clockwork Orange"}, | |
update:{"poster":"https://m.media-amazon.com/images/M/MV5BMTY3MjM1Mzc4N15BMl5BanBnXkFtZTgwODM0NzAxMDE@._V1_UX182_CR0,0,182,268_AL_.jpg"} | |
}}, | |
{insertOne:{ | |
document:{ | |
"title":"Xanadu", | |
"awards":{"wins":1,"nominations":10}, | |
"year":1980, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('filmstore'); | |
db.movie.replaceOne({"name":"Orange"}, | |
{"title":"A Clockwork Orange", | |
"awards":{"wins":5,"nominations":21}, | |
"year":1971, | |
"runtime":136, | |
"countries":["USA","UK"], | |
"budget":{"currency":"USD","amount":2200000}, | |
"boxoffice":{"currency":"USD","amount":26600000}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('quiz'); | |
db.score.insertMany([ | |
{ "_id" : 1, "name": "Martin", "score": "A+" , "feedback": "", created: new ObjectId(), survey:["NodeJs"]}, | |
{ "_id" : 2, "name": "Lunar", "score": 101, "feedback": "Error!", created: new ObjectId(), quizzes:["NodeJs"]}, | |
{ "_id" : 3, "name": "James", "score": NumberLong(692) , "feedback": "broken", created: new ObjectId(), quizzes:["NodeJs"]}, | |
{ "_id" : 4, "name": "Dwayne" , "score": NumberInt(886), created: new ObjectId() }, | |
{ "_id" : 5, "name": "Simone", "score": ["B", 59, 82.5, "A"], created: new ObjectId(), quizzes:["GIT","JavaScript","NodeJs","Python"]}, | |
{ "_id" : 6, "name": "Rebecca", "score": "C", created: new ObjectId(), quizzes:["SQL"]}, | |
{ "_id" : 7, "name": "Stacey", "score": "54", "feedback": "Missing", quizzes:["Python"], created: new ObjectId()}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use('filmstore'); | |
db.movie.drop(); | |
db.movie.insertMany([ | |
{"title":"Once Upon a Time in the West","year":1968,"rated":"PG-13","runtime":175,"countries":["Italy","USA","Spain"],"genres":["Western"],"director":"Sergio Leone","writers":["Sergio Donati","Sergio Leone","Dario Argento","Bernardo Bertolucci","Sergio Leone"],"actors":["Claudia Cardinale","Henry Fonda","Jason Robards","Charles Bronson"],"plot":"Epic story of a mysterious stranger with a harmonica who joins forces with a notorious desperado to protect a beautiful widow from a ruthless assassin working for the railroad.","poster":"http://ia.media-imdb.com/images/M/MV5BMTEyODQzNDkzNjVeQTJeQWpwZ15BbWU4MDgyODk1NDEx._V1_SX300.jpg","imdb":{"id":"tt0064116","rating":8.6,"votes":201283},"tomato":{"meter":98,"image":"certified","rating":9,"reviews":54,"fresh":53,"consensus":"A landmark Sergio Leone spaghetti western masterpiece featuring a classic Morricone score.","userMeter":95,"userRating":4.3,"userReviews":64006},"metacritic":80,"awards":{"wins":4,"nominat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspiration Playground | |
// To disable this template go to Settings | MongoDB | Use Default Template For Playground. | |
// Make sure you are connected to enable completions and to be able to run a playground. | |
// Use Ctrl+Space inside a snippet or a string literal to trigger completions. | |
// Select the database to use. | |
use('inspirations'); | |
// The drop() command destroys all data from a collection. | |
// Make sure you run it against the correct database and collection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS market; | |
CREATE DATABASE market; | |
USE market; | |
CREATE TABLE IF NOT EXISTS `produce` ( | |
`id` INT(10) NOT NULL, | |
`name` VARCHAR(50) NOT NULL, | |
`type` VARCHAR(50) NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": 1, | |
"firstname": "Maya", | |
"lastname": "Angelou", | |
"occupation": ["Poet", "Novelist"], | |
"height": 1830, | |
"country": "United States", | |
"bio": "American poet, singer, memoirist, and civil rights activist. She published seven autobiographies, three books of essays, several books of poetry, and is credited with a list of plays, movies, and television shows spanning over 50 years" | |
}, |