Upgrade to Pro — share decks privately, control downloads, hide ads and more …

NO-SQL

 NO-SQL

Database is one of the most important part of any project and now due to large size of data how the requirement of database changes.
NO-SOL is new concept of storing database with large scale

Avatar for Omkar Joshi

Omkar Joshi

October 12, 2012

Other Decks in Programming

Transcript

  1. Index  Introduction to NOSQL ◦ What is DBMS? 

    Why we need database management ◦ What is SQL? ◦ What is NOSQL?  Why there is need of NOSQL?  What are the advantages of NOSQL over SQL?  What is the scope of NOSQL?  Advantages And Disadvantages of NOSQL  Application area of NOSQL  Overview  Conclusion  Question  References
  2. What is DBMS?  A database management system (DBMS) is

    a software package with computer programs that controls the creation, maintenance, and use of a database. It allows organizations to conveniently develop databases for various applications. A database is an integrated collection of data records, files, and other objects. A DBMS allows different user application programs to concurrently access the same database. DBMSs may use a variety of database models, such as the relational model or object model, to conveniently describe and support applications. It typically supports query languages, which are in fact high-level programming languages, dedicated database languages that considerably simplify writing database application programs. Database languages also simplify the database organization as well as retrieving and presenting information from it. A DBMS provides facilities for controlling data access, enforcing data integrity, managing concurrency control, and recovering the database after failures and restoring it from backup files, as well as maintaining database security.
  3. History  Databases have been in use since the earliest

    days of electronic computing. Unlike modern systems, which can be applied to widely different databases and needs, the vast majority of older systems were tightly linked to the custom databases in order to gain speed at the expense of flexibility. Originally DBMSs were found only in large organizations with the computer hardware needed to support large data sets.  1960s Navigational DBMS  1970s relational DBMS  Late-1970s SQL DBMS  1980s object-oriented databases  21st century NoSQL databases
  4. What is SQL?  SQL stands for Structured Query Language.

    SQL language is used to create, transform and retrieve information from RDBMS (Relational Database Management Systems). SQL is pronounced SEQUEL. SQL was developed during the early 70‟s at IBM .  SQL is a declarative programming language designed for creating and querying relational database management systems. SQL is relatively simple language, but it‟s also very powerful.  SQL can insert data into database tables. SQL can modify data in existing database tables. SQL can delete data from SQL database tables. Finally SQL can modify the database structure itself – create/modify/delete tables and other database objects.
  5. SQL Database Examples  Commercial ◦ IBM DB2 ◦ Oracle

    RDMS ◦ Microsoft SQL Server ◦ Sybase SQL Anywhere  Open Source (with commercial options) ◦ MySQL ◦ Ingres
  6. NoSQL DEFINITION:-  Next Generation Databases mostly addressing some of

    the points: being non-relational, distributed, open-source and horizontally scalable.  The original intention has been modern web-scale databases. The movement began early 2009 and is growing rapidly. Often more characteristics apply such as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more. So the misleading term "nosql" (the community now translates it mostly with "not only sql") should be seen as an alias to something like the definition above.
  7.  Stands for Not Only SQL  Class of non-relational

    data storage systems  Usually do not require a fixed table schema nor do they use the concept of joins  All NoSQL offerings relax one or more of the ACID properties (will talk about the CAP theorem)
  8. CAP Theorem  Three properties of a system: Consistency, Availability

    and Partitions.  You can have at most two of these three properties for any shared-data system  To scale out, you have to partition. That leaves either consistency or availability to choose from ◦ In almost all cases, you would choose availability over consistency
  9. Why NoSQL?  For data storage, an RDBMS cannot be

    the be-all/end-all  Just as there are different programming languages, need to have other data storage tools in the toolbox  A NoSQL solution is more acceptable to a client now than even a year ago ◦ Think about proposing a Ruby/Rails or Groovy/Grails solution now versus a couple of years ago
  10.  Large datasets, acceptance of alternatives, and dynamically-typed data has

    come together in a perfect storm  Not a backlash/rebellion against RDBMS  SQL is a rich query language that cannot be rivaled by the current list of NoSQL offerings
  11. NoSQL Distinguishing Characteristics  Large data volumes ◦ Google‟s “big

    data”  Scalable replication and distribution ◦ Potentially thousands of machines ◦ Potentially distributed around the world  Queries need to return answers quickly  Mostly query, few updates  Open source development
  12. What kinds of 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)
  13. Advantages  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)
  14. What am I giving up?  joins  group by

     order by  ACID transactions  SQL as a sometimes frustrating but still powerful query language  easy integration with other applications that support SQL
  15. Typical NoSQL API  Basic API access: ◦ get(key) --

    Extract the value given a key ◦ put(key, value) -- Create or update the value given its key ◦ delete(key) -- Remove the key and its associated value ◦ execute(key, operation, parameters) -- Invoke an operation to the value (given its key) which is a special data structure (e.g. List, Set, Map .... etc).
  16. Don‟t forget about the DBA  It does not matter

    if the data is deployed on a NoSQL platform instead of an RDBMS.  Still need to address: ◦ Backups & recovery ◦ Capacity planning ◦ Performance monitoring ◦ Data integration ◦ Tuning & optimization  What happens when things don‟t work as expected and nodes are out of sync or you have a data corruption occurring at 2am?  Who you gonna call? ◦ DBA and SysAdmin need to be on board
  17. Where would I use it?  For most of us,

    we work in corporate IT and a LinkedIn or Twitter is not in our future  Where would I use a NoSQL database?  Do you have somewhere a large set of uncontrolled, unstructured, data that you are trying to fit into a RDBMS? ◦ Log Analysis ◦ Social Networking Feeds (many firms hooked in through Facebook or Twitter) ◦ External feeds from partners (EAI) ◦ Data that is not easily analyzed in a RDBMS such as time- based data ◦ Large data feeds that need to be massaged before entry into an RDBMS
  18. NoSQL Summary  NoSQL databases reject: ◦ Overhead of ACID

    transactions ◦ “Complexity” of SQL ◦ Burden of up-front schema design ◦ Declarative query expression ◦ Yesterday‟s technology  Programmer responsible for ◦ Step-by-step procedural language ◦ Navigating access path
  19. Summary  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