1 / 18

NOSQL

NOSQL. Mongo DB Couch DB ANgular JS Node JS. NoSQL. Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable.

perrone
Download Presentation

NOSQL

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. NOSQL Mongo DB Couch DB ANgular JS Node JS

  2. NoSQL • Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable. • Schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more. • A NoSQL (often interpreted as Not Only SQL ) database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. Motivations for this approach include simplicity of design, horizontal scaling and finer control over availability.

  3. NoSQL can be classified in 3 types: 1. Wide Column Store / Column Families Eg - : Hadoop / HBase, Cassandra ,Amazon SimpleDB , CloudData etc. 2. Document Store Eg - : ArangoDB, OrientDB , Mongo DB , Couch DB 3. Key Value / Tuple Store Eg - : Oracle NOSQL Database , Reddis ,Dynamo DB.

  4. Couch DB • CouchDB is a database that completely embraces the web. Store your data with JSON documents. Access your documents and query your indexes with your web browser, via HTTP. Index, combine, and transform your documents with JavaScript. • CouchDB works well with modern web and mobile apps. • And you can distribute your data, or your apps, efficiently using CouchDB’s incremental replication. CouchDB supports master-master setups with automatic conflict detection. • CouchDB is highly available and partition tolerant, but is also eventually consistent,CouchDB has a fault-tolerant storage engine that puts the safety of your data first.

  5. Features of Couch DB • ACID Properties • The CouchDB file layout and commitment system features all Atomic Consistent Isolated Durable (ACID) properties. On-disk, CouchDB never overwrites committed data or associated structures, ensuring the database file is always in a consistent state. This is a “crash-only" design where the CouchDB server does not go through a shut down process, it's simply terminated. • Compaction • Wasted space is recovered by occasional compaction. On schedule, or when the database file exceeds a certain amount of wasted space, the compaction process clones all the active data to a new file and then discards the old file. The database remains completely online the entire time and all updates and reads are allowed to complete successfully. The old file is deleted only when all the data has been copied and all users transitioned to the new file.

  6. Features of Couch DB • Views • ACID properties only deal with storage and updates, we also need the ability to show our data in interesting and useful ways. Unlike SQL databases where data must be carefully decomposed into tables, data in CouchDB is stored in semi-structured documents.

  7. Security and Validation • Administrator Access • CouchDB database instances have administrator accounts. Administrator accounts can create other administrator accounts and update design documents. Design documents are special documents containing view definitions and other special formulas, as well as regular fields and blobs. • Update Validation • As documents written to disk, they can be validated dynamically by javascript functions for both security and data validation. When the document passes all the formula validation criteria, the update is allowed to continue. If the validation fails, the update is aborted and the user client gets an error response.

  8. Mongo DB • MongoDB (from humongous) is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster. • MongoDB is free and open-source software.

  9. Features Of Mongo DB Document-oriented • Instead of taking a business subject and breaking it up into multiple relational structures, MongoDB can store the business subject in the minimal number of documents. For example, instead of storing title and author information in two distinct relational structures, title, author, and other title-related information can all be stored in a single document called Book. Ad hoc queries • MongoDB supports search by field, range queries, regular expression searches. Queries can return specific fields of documents and also include user-defined JavaScript functions.

  10. Features Of Mongo DB Indexing • Any field in a MongoDB document can be indexed (indices in MongoDB are conceptually similar to those in RDBMSes). Secondary indices are also available. Replication • MongoDB provides high availability with replica sets.[16] A replica set consists of two or more copies of the data. Each replica set member may act in the role of primary or secondary replica at any time. • Load balancing • File Storage Server-side JavaScript execution • JavaScript can be used in queries, aggregation functions (such as MapReduce), and sent directly to the database to be executed.

  11. Usabilty of Different No SQL DB DB Choice depends on Your software requirement.

  12. Mongo DB vs Couch DB • As you can see, there are three primary concerns you must balance when choosing a data management system: consistency, availability, and partition tolerance. * Consistency means that each client always has the same view of the data. * Availability means that all clients can always read and write. * Partition tolerance means that the system works well across physical network partitions. • As you can see in the diagram, MongoDB and CouchDB are built with a slightly different focus. Both scale across multiple nodes easily, but MongoDB favours consistency while CouchDB favours availability.

  13. Mongo DB vs Couch DB MongodB : Availability and Partition Tolerance CouchDB : Consistency and Partition Tolerance MongoDB: If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. CouchDB : For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important.

  14. CONCLUDE - MongoDB • Written in: C++ • Main point: Retains some friendly properties of SQL. (Query, index) • License: AGPL (Drivers: Apache) • Protocol: Custom, binary (BSON) • Master/slave replication (auto failover with replica sets) • Sharding built-in • Queries are javascript expressions • Run arbitrary javascript functions server-side • Better update-in-place than CouchDB • Uses memory mapped files for data storage • Performance over features • Journaling (with --journal) is best turned on • On 32bit systems, limited to ~2.5Gb • An empty database takes up 192Mb • GridFS to store big data + metadata (not actually an FS) • Has geospatial indexing • Best used: If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. • For example: For most things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back.

  15. CONCLUDE - CouchDB • Main point: DB consistency, ease of use • License: Apache • Protocol: HTTP/REST • Bi-directional (!) replication, • continuous or ad-hoc, • with conflict detection, • thus, master-master replication. (!) • MVCC - write operations do not block reads • Previous versions of documents are available • Crash-only (reliable) design • Needs compacting from time to time • Views: embedded map/reduce • Formatting views: lists & shows • Server-side document validation possible • Authentication possible • Real-time updates via _changes (!) • Attachment handling • thus, CouchApps (standalone js apps) • jQuery library included • Best used: For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. • For example: CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments.

  16. ANGULAR JS • AngularJS (commonly referred to as “Angular” or “Angular.js”) is an open-source web application framework mainly maintained by Google and by a community of individual developers and corporations to address many of the challenges encountered in developing single-page applications. • It aims to simplify both the development and the testing of such applications by providing a framework for client-side model–view–controller (MVC) and model–view–viewmodel (MVVM) architectures, along with components commonly used in rich Internet applications.

  17. WHY Angular JS • AngularJS provides the following features which makes developing web apps easy: • Two way data binding • Dependency Injection • Custom HTML Directives • Easy integration with REST webservices using $http, $resource, Rectangular etc • Support for Testing.

More Related