1 / 32

No SQL Database

No SQL Database. BY NUR HIDAYA BUKHARI 102904037. PRODI TEKNIK INFORMATIKA DAN KOMPUTER UNIVERSITAS NEGERI MAKASSAR 2012. Outlines. Apa itu No Sql Database ? Sejarah dan perkembangan Mengapa Menggunakan No Sql Database Klasifikasi No SQL Database Perbedaan SQL dan No SQL Database Etc.

dknight
Télécharger la présentation

No SQL Database

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. No SQL Database BY NUR HIDAYA BUKHARI 102904037 PRODI TEKNIK INFORMATIKA DAN KOMPUTER UNIVERSITAS NEGERI MAKASSAR 2012

  2. Outlines • Apa itu No Sql Database ? • Sejarah dan perkembangan • Mengapa Menggunakan No Sql Database • Klasifikasi No SQL Database • Perbedaan SQL dan No SQL Database • Etc.

  3. Apa Itu No SQL Database Dapat juga disebut “Not Only SQL” adalah sistem manajemen database alternatif yang berbeda jauh dari model tradisionaldari sistem manajemen database relasional (RDBMS) ataupun sistem manajemen database berbasis object(ODBMS). Penyimpanan data ini tidak memerlukan skema tabel tetap, biasanya menghindari joins operation dan skala horizontal, merupakan open source, cara penyimpanannya- pun tidak memerlukan inisialisasi terlebih dahulu. Dalam arti luas,cara penyimpanan data yang tidak menggunakan sql atau database relasional untuk menyimpan data. Di Populerkan oleh website besar seperti Google dan Facebook.

  4. Sejarah dan Perkembangan NoSql • Coined in 1998 by Carlos Strozzi to describe a database that did not expose a SQL interface • In 2008, Eric Evans reintroduced the term to describe the growing non-RDBMS movement • Popularized by large web sites such as Google, Facebook and Digg http://en.wikipedia.org/wiki/NoSQL_%28RDBMS%29

  5. Sejarah dan Perkembangan NoSql - Perkembangan dari situs media sosial (Facebook, Twitter) dengan kebutuhan data yang besar. -Kebutuhan akan penyimpanan data yang besar di situs web besar seperti Google, Yahoo ( Banyak data yang tidak file ). - Munculnya solusi berbasis cloud seperti Amazon S3 (solusi penyimpanan yang sederhana) - Untuk tipe data dinamis dengan seringnya perubahan skema. - Komunitas open-source.

  6. Sejarah dan Perkembangan NoSql • Ada tiga bahasan besar yang mendorong perkembangan NoSql : • BigTable (Google) • Dynamo (Amazon) • CAP Theorem

  7. No Sql Database Karakteristik • Large data volumes • Google’s “big data” • Queries need to return answers quickly • Mostly query, few updates • Asynchronous Inserts & Updates • Schema-less • ACID transaction properties are not needed • BASE transaction • CAP Theorem • Open source development

  8. Transactions – ACID Properties • Atomic – All of the work in a transaction completes (commit) or none of it completes • Consistent – A transaction transforms the database from one consistent state to another consistent state. Consistency is defined in terms of constraints. • Isolated – The results of any changes made during a transaction are not visible until the transaction has committed. • Durable – The results of a committed transaction survive failures

  9. BASE Transactions • Acronym contrived to be the opposite of ACID • Basically Available, • Soft state, • Eventually Consistent • Characteristics • Weak consistency – stale data OK • Availability first • Best effort • Approximate answers OK • Aggressive (optimistic) • Simpler and faster

  10. Keuntungan • Cheap, easy to implement (open source) • Data are replicated to multiple nodes (therefore identical and fault-tolerant) and can be partitioned • Down nodes easily replaced • No single point of failure • Easy to distribute • Don't require a schema • Can scale up and down • Relax the data consistency requirement (CAP)

  11. NoSQL Products • Cassandra • CouchDB • Hadoop & Hbase • MongoDB • StupidDB • Etc.

  12. Perbandingan Beberapa Aplikasi NoSQL DataBase

  13. Perbandingan Beberapa Aplikasi NoSQL DataBase

  14. Perbandingan Beberapa Aplikasi NoSQL DataBase

  15. Klasifikasi No Sql Database Discussing NoSQL databases is complicated because there are a variety of types: • Column Store – Each storage block contains data from only one column • Document Store – stores documents made up of tagged elements • Key-Value Store – Hash table of keys

  16. Klasifikasi No Sql Database • XML Databases • Graph Databases • Codasyl Databases • Object Oriented Databases • Distributed Peer Stores

  17. 2 Garis Besar NoSql • NoSQL solutions fall into two major areas: • Key/Value or ‘the big hash table’. • Amazon S3 (Dynamo) • Voldemort • Scalaris • Schema-less which comes in multiple flavors, column-based, document-based or graph-based. • Cassandra (column-based) • CouchDB (document-based) • Neo4J (graph-based) • HBase (column-based)

  18. Key/Value Pros: • very fast • very scalable • simple model • able to distribute horizontally Cons: - many data structures (objects) can't be easily modeled as key value pairs

  19. Schema-Less Pros: - Schema-less data model is richer than key/value pairs • eventual consistency • many are distributed • still provide excellent performance and scalability Cons: - typically no ACID transactions or joins

  20. Perbedaan Dengan Database Relasional • Relational • Insert data • $sql = "INSERT INTO `$tbl` SET `login` = 'coba1', `password` = '0c50a2d250b30bf01aa0fabf782cb448', `email` = 'coba1@sinaryuda.web.id'"; mysql_query($sql); • No Sql (MongoDB) • Insert data •  db.mahasiswa.save({nama:’FadliSaldi’,NPM:’18109015′,jurusan:’Sistem Informasi’,Fakultas:’Ilmu Komputer’})

  21. Perbedaan Dengan Database Relasional • SQL Databases • Predefined Schema • Standard definition and interface language • Tight consistency • Well defined semantics • NoSQL Database • No predefined Schema • Per-product definition and interface language • Getting an answer quickly is more important than getting a correct answer

  22. Perbedaan Dengan Database Relasional • MySQL > 50 GB Data • Writes Average : ~300 ms • Reads Average : ~350 ms • NoSQL > 50 GB Data • Writes Average : 0.12 ms • Reads Average : 15 ms

  23. Haruskah Menggunakan No SQL Database ? • Untuk kita semua menggunakan database relasional seperti biasanya mungkin adalah pilihan yang paling tepat. • Sistem penyimpanan data menggunakan No Sql database cocok untuk aplikasi yang membutuhkan data tak terstruktur yang sangat besar,seperti : • Log Analysis • Social Networking Feeds

  24. Introducing MongoDB • Open source, document-oriented database • 10gen supports official drivers for many platforms, but not .NET!

  25. Introducing MongoDB • Documents in a MongoDB database are stored in schema-less collections • Documents are stored in BSON (Binary JSON) • Each item in a collection has a unique (primary) key called an ObjectId

  26. MongoDB – Kelebihan • Memberikan primary key secara otomatis • Mendukung replikasi yang berguna bagi web yang memiliki trafik yang tinggi seperti : portal berita,forum,blog,dll. • Mendukung sharding yang digunakan pada data yang sudah mencapai juta giga. • Mendukung model pemrograman MapReduce

  27. Instalasi mongodb di windows • Download the binaries from mongodb.org • Extract to Program Files directory (or wherever) • Create a directory c:\data\db • Run mongod.exe from the command line with the install switch

  28. Mongodb shell • Connect to a server:port/database (defaults are localhost:27017/test ):

  29. Mongodb shell cntd • Insert an item into a collection

  30. Mongodb shell cntd • Find items in a collection:

  31. Mongodb shell cntd • Update an item in a collection

  32. Mongodb shell cntd • Remove an item in collection

More Related