Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
16 de abril FLISOL 2016 1
MongoDBMongoDB
Not Only SQLNot Only SQL
16 de abril FLISOL 2016 2
Lucas de OliveiraLucas de Oliveira
http://deoliveiralucas.nethttp://deoliveiralucas.net
16 de abril FLISOL 2016 3
•
NoSQL = Not Only SQL
•
Alto desempenho
•
Diferentes modelos de dados (documentos,
grafos, chav...
16 de abril FLISOL 2016 4
•
JSON/BSON
•
Schemaless
•
Replica Set
MongoDBMongoDB
16 de abril FLISOL 2016 5
•
Sharding
•
GridFS
•
Geolocation
MongoDBMongoDB
16 de abril FLISOL 2016 6
ExemploExemplo:
Banco de dados relacional
MongoDBMongoDB
IdId nomenome emailemail
1 Aluno1 email...
16 de abril FLISOL 2016 7
ExemploExemplo:
Não relacional orientado a documentos
MongoDBMongoDB
{
nome: Aluno1,
email: emai...
16 de abril FLISOL 2016 8
> mongoimport --db unisal --collection posts --file posts.json
> mongoimport --db unisal --colle...
16 de abril FLISOL 2016 9
> mongod
> mongo
> show dbs
> use unisal
> show collections
MongoDB – AcessoMongoDB – Acesso
16 de abril FLISOL 2016 10
> db.alunos.insert({
nome: "Lucas",
sobrenome: "de Oliveira",
email: "contato@deoliveiralucas.n...
16 de abril FLISOL 2016 11
> var aluno = {
nome: "de Oliveira",
sobrenome: "Lucas",
email: "deoliveiralucas@contato.net"
}...
16 de abril FLISOL 2016 12
> var query = {
nome: "Lucas"
}
> db.alunos.find(query)
MongoDB - ConsultarMongoDB - Consultar
16 de abril FLISOL 2016 13
OperadoresOperadores (Comparação)(Comparação)
•
$eq
•
$gt
•
$gte
•
$lt
MongoDB - ConsultarMongo...
16 de abril FLISOL 2016 14
OperadoresOperadores (Comparação)(Comparação)
•
$lte
•
$ne
•
$in
•
$nin
MongoDB - ConsultarMong...
16 de abril FLISOL 2016 15
OperadoresOperadores (Lógico)(Lógico)
•
$or
•
$and
•
$not
•
$nor
MongoDB - ConsultarMongoDB - C...
16 de abril FLISOL 2016 16
•
Map-Reduce
•
Aggregation
MongoDB - ConsultarMongoDB - Consultar
16 de abril FLISOL 2016 17
> var query = {
nome: "Lucas"
}
> var mod = {
nome: "Oliveira"
}
> db.alunos.update(query, mod)...
16 de abril FLISOL 2016 18
Agora vamos fazer direito
> var query = {
nome: "de Oliveira"
}
> var mod = {
$set: {
nome: "de...
16 de abril FLISOL 2016 19
Operadores (campo)Operadores (campo)
•
$set
•
$inc
•
$rename
•
$unset
•
$min
•
$max
•
$currentD...
16 de abril FLISOL 2016 20
Operadores (array)Operadores (array)
•
$addToSet
•
$pop
•
$pullAll
•
$pull
•
$push
MongoDB - At...
16 de abril FLISOL 2016 21
> var cursor = db.alunos.find()
> while(cursor.hasNext()){ print(tojson(cursor.next())) }
Mongo...
16 de abril FLISOL 2016 22
for (var i = 0; i < 10000; i++) {for (var i = 0; i < 10000; i++) {
var aluno = {
nome: "nome" +...
16 de abril FLISOL 2016 23
> mongod --replSet unisalReplica --port 27015 --dbpath /data/rs1> mongod --replSet unisalReplic...
16 de abril FLISOL 2016 24
> mongo --port 27015> mongo --port 27015
> rs.initiate()
> rs.status()
> rs.add("deoliveiraluca...
16 de abril FLISOL 2016 25
•
MongoDB UniversityMongoDB University
•
Webschool.ioWebschool.io
MongoDB – CursosMongoDB – Cur...
16 de abril FLISOL 2016 26
•
https://docs.mongodb.org/manual/https://docs.mongodb.org/manual/
•
https://docs.mongodb.org/m...
16 de abril FLISOL 2016 27
Obrigado!Obrigado!
Nächste SlideShare
Wird geladen in …5
×

MongoDB FLISoL 2016

397 Aufrufe

Veröffentlicht am

Oficina de MongoDB ministrado no Flisol Lorena em 16 de Abril de 2016

Veröffentlicht in: Technologie
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... Download doc Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

MongoDB FLISoL 2016

  1. 1. 16 de abril FLISOL 2016 1 MongoDBMongoDB Not Only SQLNot Only SQL
  2. 2. 16 de abril FLISOL 2016 2 Lucas de OliveiraLucas de Oliveira http://deoliveiralucas.nethttp://deoliveiralucas.net
  3. 3. 16 de abril FLISOL 2016 3 • NoSQL = Not Only SQL • Alto desempenho • Diferentes modelos de dados (documentos, grafos, chave-valor e colunas) NoSQLNoSQL
  4. 4. 16 de abril FLISOL 2016 4 • JSON/BSON • Schemaless • Replica Set MongoDBMongoDB
  5. 5. 16 de abril FLISOL 2016 5 • Sharding • GridFS • Geolocation MongoDBMongoDB
  6. 6. 16 de abril FLISOL 2016 6 ExemploExemplo: Banco de dados relacional MongoDBMongoDB IdId nomenome emailemail 1 Aluno1 email1@email.com 2 Aluno2 email2@email.com Tabela de alunos idid id_alunoid_aluno telefonetelefone 1 1 1234-5678 2 1 1234-7070 3 2 9101-1121 Tabela de telefones
  7. 7. 16 de abril FLISOL 2016 7 ExemploExemplo: Não relacional orientado a documentos MongoDBMongoDB { nome: Aluno1, email: email1@email.com, telefones: [ 1234-5678, 1234-7070 ] } { nome: Aluno2, email: email2@email.com, telefones: [ 9101-1121 ] }
  8. 8. 16 de abril FLISOL 2016 8 > mongoimport --db unisal --collection posts --file posts.json > mongoimport --db unisal --collection grades --file grades.json • --batchSize 1 > mongoexport --db unisal --collection posts --out posts.json MongoDB – Import / ExportMongoDB – Import / Export
  9. 9. 16 de abril FLISOL 2016 9 > mongod > mongo > show dbs > use unisal > show collections MongoDB – AcessoMongoDB – Acesso
  10. 10. 16 de abril FLISOL 2016 10 > db.alunos.insert({ nome: "Lucas", sobrenome: "de Oliveira", email: "contato@deoliveiralucas.net" }) MongoDB - InserirMongoDB - Inserir
  11. 11. 16 de abril FLISOL 2016 11 > var aluno = { nome: "de Oliveira", sobrenome: "Lucas", email: "deoliveiralucas@contato.net" } > db.alunos.insert(aluno) MongoDB - InserirMongoDB - Inserir
  12. 12. 16 de abril FLISOL 2016 12 > var query = { nome: "Lucas" } > db.alunos.find(query) MongoDB - ConsultarMongoDB - Consultar
  13. 13. 16 de abril FLISOL 2016 13 OperadoresOperadores (Comparação)(Comparação) • $eq • $gt • $gte • $lt MongoDB - ConsultarMongoDB - Consultar
  14. 14. 16 de abril FLISOL 2016 14 OperadoresOperadores (Comparação)(Comparação) • $lte • $ne • $in • $nin MongoDB - ConsultarMongoDB - Consultar
  15. 15. 16 de abril FLISOL 2016 15 OperadoresOperadores (Lógico)(Lógico) • $or • $and • $not • $nor MongoDB - ConsultarMongoDB - Consultar
  16. 16. 16 de abril FLISOL 2016 16 • Map-Reduce • Aggregation MongoDB - ConsultarMongoDB - Consultar
  17. 17. 16 de abril FLISOL 2016 17 > var query = { nome: "Lucas" } > var mod = { nome: "Oliveira" } > db.alunos.update(query, mod) MongoDB - AtualizarMongoDB - Atualizar
  18. 18. 16 de abril FLISOL 2016 18 Agora vamos fazer direito > var query = { nome: "de Oliveira" } > var mod = { $set: { nome: "deoliveiralucas" } } > db.alunos.update(query, mod) MongoDB - AtualizarMongoDB - Atualizar
  19. 19. 16 de abril FLISOL 2016 19 Operadores (campo)Operadores (campo) • $set • $inc • $rename • $unset • $min • $max • $currentDate MongoDB - AtualizarMongoDB - Atualizar
  20. 20. 16 de abril FLISOL 2016 20 Operadores (array)Operadores (array) • $addToSet • $pop • $pullAll • $pull • $push MongoDB - AtualizarMongoDB - Atualizar
  21. 21. 16 de abril FLISOL 2016 21 > var cursor = db.alunos.find() > while(cursor.hasNext()){ print(tojson(cursor.next())) } MongoDB - CursorMongoDB - Cursor
  22. 22. 16 de abril FLISOL 2016 22 for (var i = 0; i < 10000; i++) {for (var i = 0; i < 10000; i++) { var aluno = { nome: "nome" + i, sobrenome: "sobrenome" + i, idade: Math.floor((Math.random() * (80 - 15)) + 15) }; db.alunos.insert(aluno); } MongoDB - JavascriptMongoDB - Javascript
  23. 23. 16 de abril FLISOL 2016 23 > mongod --replSet unisalReplica --port 27015 --dbpath /data/rs1> mongod --replSet unisalReplica --port 27015 --dbpath /data/rs1 > mongod --replSet unisalReplica --port 27016 --dbpath /data/rs2> mongod --replSet unisalReplica --port 27016 --dbpath /data/rs2 > mongod --replSet unisalReplica --port 27017 --dbpath /data/rs3> mongod --replSet unisalReplica --port 27017 --dbpath /data/rs3 > mongod --replSet unisalReplica --port 27018 --dbpath /data/arb> mongod --replSet unisalReplica --port 27018 --dbpath /data/arb MongoDB – Replica SetMongoDB – Replica Set
  24. 24. 16 de abril FLISOL 2016 24 > mongo --port 27015> mongo --port 27015 > rs.initiate() > rs.status() > rs.add("deoliveiralucas:27016") > rs.add("deoliveiralucas:27017") > rs.addArb("deoliveiralucas:27018") MongoDB – Replica SetMongoDB – Replica Set
  25. 25. 16 de abril FLISOL 2016 25 • MongoDB UniversityMongoDB University • Webschool.ioWebschool.io MongoDB – CursosMongoDB – Cursos
  26. 26. 16 de abril FLISOL 2016 26 • https://docs.mongodb.org/manual/https://docs.mongodb.org/manual/ • https://docs.mongodb.org/manual/tutorial/query-documents/https://docs.mongodb.org/manual/tutorial/query-documents/ • https://docs.mongodb.org/manual/administration/replica-sets/https://docs.mongodb.org/manual/administration/replica-sets/ ReferênciasReferências
  27. 27. 16 de abril FLISOL 2016 27 Obrigado!Obrigado!

×