SlideShare a Scribd company logo
1 of 30
Download to read offline
Pengenalan MongoDB dan
  Penggunaanya Dalam Aplikasi PHP.

  Perjumpaan I : Kumpulan Minat Khusus Pangkalan Data Sektor Awam (DB SIG)
  Khamis 14 Jun 2012, Bilik Mesyuarat , Aras 6, MAMPU, MKN-Embassy Techzone, Jalan Teknokrat 2, 63000 , Cyberjaya




  Disampaikan Oleh : Syahman bin Mohamad (Wakil PESIMA)

Sabtu, 16 Jun 2012
?

Sabtu, 16 Jun 2012
MongoDB (dari kata “humongous”).

         “Scallable, high-performance, open
         source, schema-free, document-
         oriented database” mongodb.org


Sabtu, 16 Jun 2012
Cabang Pangkalan Data NoSQL.

                        NoSQL ?
      ● Not Only SQL
      ● Berbeza dengan RDBMS

      ● Tidak perlu skema

      ● Tidak menggunakan SQL untuk kuiri

      ● Simpan data guna konsep dokumen


Sabtu, 16 Jun 2012
Pangkalan Data Menggunakan Konsep/Teknologi NoSQL




                           sumber : nosql.findthebest.com



Sabtu, 16 Jun 2012
# Falsafah 1


   “One size fits all” approach no longer applies !




Sabtu, 16 Jun 2012
# Falsafah 2


   Non-relational DBs scale more easily, especially
   horizontally




Sabtu, 16 Jun 2012
# Falsafah 3


   Focus on speed, performance, flexibility and
   scalability (adapt to increased demands)




Sabtu, 16 Jun 2012
# Falsafah 4


   Not concerned with transactional stuff and
   relational semantics




Sabtu, 16 Jun 2012
# Falsafah 5


   DB should be an on-demand commodity, in a cloud
   like fashion




Sabtu, 16 Jun 2012
# Falsafah 6
  MongoDB tries to
  achieve
  the performance of
  traditional key-value
  stores while
  maintaining
  functionality of
  traditional RDBMS

Sabtu, 16 Jun 2012
Ciri-Ciri Penting MongoDB
●    Indexing

●    Schema-less + very flexible

●    Durability, solved with replication / failover
     support, or use journaling

●    Document Storage ( Using BSON Format-
     JSON Like Object ) - eg :
    ({“nama” : “Razali Bin Alias”, “umur” : 30, “jawatan” : “PPTM”})
Sabtu, 16 Jun 2012
Contoh : Format JSON




Sabtu, 16 Jun 2012
Kuiri Data ?


Sabtu, 16 Jun 2012
Kuiri Pangkalan Data MongoDB
+ berasaskan javascript


                      Sql -->   select * from pengguna;




   MongoDB noSql --> db.penguna.find()



 Sabtu, 16 Jun 2012
Pemahaman Konsep MongoDB




Sabtu, 16 Jun 2012
# Konsep : Data Berorientasi Dokumen
 ●   Dokumen-dokumen adalah objek/rekod
     pangkalan data

 ●   Menggunakan format JSON (dalam
     bentuk binari)

 ●   Boleh simpan pelbagai jenis maklumat bersama.


Sabtu, 16 Jun 2012
# Konsep : Contoh Dokumen MongoDB




Sabtu, 16 Jun 2012
# Pemetaan Konsep : RDBMS vs Mongo
           oracle,mysql         mongoDB
           tables,views        collections
          records, rows     json documents,
                                objects
                     join      embedded
                               document
         queries return     queries return a
          records (s)            cursor
             index               index
Sabtu, 16 Jun 2012
# Konsep : Kursor

●   Queries returns 'cursor' instead of collections

●   Allows to iterate through result set

●   Performance – Big reason to use cursor

●   Find() function returns a cursor object

Sabtu, 16 Jun 2012
Demo ?
      Aplikasi PHP : Pendaftaran Kehadiran Peserta DB-SIG




Sabtu, 16 Jun 2012
# Demo : Collection Design



                      Dokumen 1

                      Dokumen 2

                      Dokumen 3



                     Dokumen ..n..




Sabtu, 16 Jun 2012   PESERTA
# Demo : Application Goals




   (1) – peserta -daftar rekod
   peserta

                                           (2)- admin - papar rekod
                                 PESERTA   peserta




Sabtu, 16 Jun 2012
# Demo : Document Structure

              peserta = {
              nama: 'SYAHMAN BIN MOHAMAD',
              gred : 'F32',
              jabatan : 'JABATAN PENDAFTARAN NEGARA,PUTRAJAYA',
              email : 'syahman@jpn.gov.my',
              peranan : [
              'PENTADBIR/PENGURUS PANGKALAN DATA',
              'TEKNIKAL DAN OPERASI',
              'PEMBANGUNAN SISTEM',
              'PEMBANGUN PANGKALAN DATA'],
              ahli : 'PESIMA',
              alahan : 'MAKANAN LAUT' }


Sabtu, 16 Jun 2012
Aspek Keselamatan ?


Sabtu, 16 Jun 2012
MongoDB Security Features

 ●   Use trusted environment

 ●   Firewall rules

 ●   IP address binding / port binding

 ●   Secure mode ( --auth @ --keyFiles )

Sabtu, 16 Jun 2012
Advanced Topics


Sabtu, 16 Jun 2012
MongoDB Advanced Topic

 ●   Map/Reduce

 ●   Aggregation

 ●   Sharding

 ●   Replica Sets

Sabtu, 16 Jun 2012
Dokumentasi ?
            http://www.mongodb.org/display/DOCS/Home




Sabtu, 16 Jun 2012
Terima Kasih


Sabtu, 16 Jun 2012

More Related Content

Similar to Presentation mongodb public sector dbsig malaysia

mongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputing
moeincanada007
 
Yieldbot Tech Talk, Sept 20, 2012
Yieldbot Tech Talk, Sept 20, 2012Yieldbot Tech Talk, Sept 20, 2012
Yieldbot Tech Talk, Sept 20, 2012
yieldbot
 

Similar to Presentation mongodb public sector dbsig malaysia (20)

Mongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in BangaloreMongodb Training Tutorial in Bangalore
Mongodb Training Tutorial in Bangalore
 
MongoDB
MongoDBMongoDB
MongoDB
 
Certified NoSQL MongoDB (CNA)
Certified NoSQL MongoDB (CNA)Certified NoSQL MongoDB (CNA)
Certified NoSQL MongoDB (CNA)
 
Kickstarting Your Mongo Education with MongoDB University
Kickstarting Your Mongo Education with MongoDB UniversityKickstarting Your Mongo Education with MongoDB University
Kickstarting Your Mongo Education with MongoDB University
 
Mongo db operations_v2
Mongo db operations_v2Mongo db operations_v2
Mongo db operations_v2
 
Mongo bbmw
Mongo bbmwMongo bbmw
Mongo bbmw
 
MongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & TricksMongoDB Schema Design Tips & Tricks
MongoDB Schema Design Tips & Tricks
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
MongoDB by Emroz sardar.
MongoDB by Emroz sardar.MongoDB by Emroz sardar.
MongoDB by Emroz sardar.
 
mongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputingmongodb-120401144140-phpapp01 claud camputing
mongodb-120401144140-phpapp01 claud camputing
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
Copy of MongoDB .pptx
Copy of MongoDB .pptxCopy of MongoDB .pptx
Copy of MongoDB .pptx
 
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
 
A Study on Mongodb Database.pdf
A Study on Mongodb Database.pdfA Study on Mongodb Database.pdf
A Study on Mongodb Database.pdf
 
A Study on Mongodb Database
A Study on Mongodb DatabaseA Study on Mongodb Database
A Study on Mongodb Database
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
ORCID Outreach Meeting dev breakout session
ORCID Outreach Meeting dev breakout sessionORCID Outreach Meeting dev breakout session
ORCID Outreach Meeting dev breakout session
 
MongoDB DOC v1.5
MongoDB DOC v1.5MongoDB DOC v1.5
MongoDB DOC v1.5
 
Yieldbot Tech Talk, Sept 20, 2012
Yieldbot Tech Talk, Sept 20, 2012Yieldbot Tech Talk, Sept 20, 2012
Yieldbot Tech Talk, Sept 20, 2012
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Presentation mongodb public sector dbsig malaysia

  • 1. Pengenalan MongoDB dan Penggunaanya Dalam Aplikasi PHP. Perjumpaan I : Kumpulan Minat Khusus Pangkalan Data Sektor Awam (DB SIG) Khamis 14 Jun 2012, Bilik Mesyuarat , Aras 6, MAMPU, MKN-Embassy Techzone, Jalan Teknokrat 2, 63000 , Cyberjaya Disampaikan Oleh : Syahman bin Mohamad (Wakil PESIMA) Sabtu, 16 Jun 2012
  • 3. MongoDB (dari kata “humongous”). “Scallable, high-performance, open source, schema-free, document- oriented database” mongodb.org Sabtu, 16 Jun 2012
  • 4. Cabang Pangkalan Data NoSQL. NoSQL ? ● Not Only SQL ● Berbeza dengan RDBMS ● Tidak perlu skema ● Tidak menggunakan SQL untuk kuiri ● Simpan data guna konsep dokumen Sabtu, 16 Jun 2012
  • 5. Pangkalan Data Menggunakan Konsep/Teknologi NoSQL sumber : nosql.findthebest.com Sabtu, 16 Jun 2012
  • 6. # Falsafah 1 “One size fits all” approach no longer applies ! Sabtu, 16 Jun 2012
  • 7. # Falsafah 2 Non-relational DBs scale more easily, especially horizontally Sabtu, 16 Jun 2012
  • 8. # Falsafah 3 Focus on speed, performance, flexibility and scalability (adapt to increased demands) Sabtu, 16 Jun 2012
  • 9. # Falsafah 4 Not concerned with transactional stuff and relational semantics Sabtu, 16 Jun 2012
  • 10. # Falsafah 5 DB should be an on-demand commodity, in a cloud like fashion Sabtu, 16 Jun 2012
  • 11. # Falsafah 6 MongoDB tries to achieve the performance of traditional key-value stores while maintaining functionality of traditional RDBMS Sabtu, 16 Jun 2012
  • 12. Ciri-Ciri Penting MongoDB ● Indexing ● Schema-less + very flexible ● Durability, solved with replication / failover support, or use journaling ● Document Storage ( Using BSON Format- JSON Like Object ) - eg : ({“nama” : “Razali Bin Alias”, “umur” : 30, “jawatan” : “PPTM”}) Sabtu, 16 Jun 2012
  • 13. Contoh : Format JSON Sabtu, 16 Jun 2012
  • 14. Kuiri Data ? Sabtu, 16 Jun 2012
  • 15. Kuiri Pangkalan Data MongoDB + berasaskan javascript Sql --> select * from pengguna; MongoDB noSql --> db.penguna.find() Sabtu, 16 Jun 2012
  • 17. # Konsep : Data Berorientasi Dokumen ● Dokumen-dokumen adalah objek/rekod pangkalan data ● Menggunakan format JSON (dalam bentuk binari) ● Boleh simpan pelbagai jenis maklumat bersama. Sabtu, 16 Jun 2012
  • 18. # Konsep : Contoh Dokumen MongoDB Sabtu, 16 Jun 2012
  • 19. # Pemetaan Konsep : RDBMS vs Mongo oracle,mysql mongoDB tables,views collections records, rows json documents, objects join embedded document queries return queries return a records (s) cursor index index Sabtu, 16 Jun 2012
  • 20. # Konsep : Kursor ● Queries returns 'cursor' instead of collections ● Allows to iterate through result set ● Performance – Big reason to use cursor ● Find() function returns a cursor object Sabtu, 16 Jun 2012
  • 21. Demo ? Aplikasi PHP : Pendaftaran Kehadiran Peserta DB-SIG Sabtu, 16 Jun 2012
  • 22. # Demo : Collection Design Dokumen 1 Dokumen 2 Dokumen 3 Dokumen ..n.. Sabtu, 16 Jun 2012 PESERTA
  • 23. # Demo : Application Goals (1) – peserta -daftar rekod peserta (2)- admin - papar rekod PESERTA peserta Sabtu, 16 Jun 2012
  • 24. # Demo : Document Structure peserta = { nama: 'SYAHMAN BIN MOHAMAD', gred : 'F32', jabatan : 'JABATAN PENDAFTARAN NEGARA,PUTRAJAYA', email : 'syahman@jpn.gov.my', peranan : [ 'PENTADBIR/PENGURUS PANGKALAN DATA', 'TEKNIKAL DAN OPERASI', 'PEMBANGUNAN SISTEM', 'PEMBANGUN PANGKALAN DATA'], ahli : 'PESIMA', alahan : 'MAKANAN LAUT' } Sabtu, 16 Jun 2012
  • 26. MongoDB Security Features ● Use trusted environment ● Firewall rules ● IP address binding / port binding ● Secure mode ( --auth @ --keyFiles ) Sabtu, 16 Jun 2012
  • 28. MongoDB Advanced Topic ● Map/Reduce ● Aggregation ● Sharding ● Replica Sets Sabtu, 16 Jun 2012
  • 29. Dokumentasi ? http://www.mongodb.org/display/DOCS/Home Sabtu, 16 Jun 2012