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

Making Sense of NoSQL

Making Sense of NoSQL

On 2023-06-15 for Slasscom Academy
Recorded Webinar: https://www.facebook.com/SLASSCOMLK/videos/making-sense-of-nosql/1421348925074702/

Avatar for amadoru

amadoru

June 15, 2023

Other Decks in Technology

Transcript

  1. “There were 5 exabytes of data created between the dawn

    of civilization through 2003. That much information is now created every two days” Eric Schmidt Former CEO at Google 2010
  2. What is SQL? - SQL = Structured Query Language -

    The key language to perform CRUD (Create, Retrieve, Update, Delete) operations in relational databases. - Adheres to ACID principles
  3. What is SQL? - ACID principles - Atomicity - Each

    transaction statement works as a single unit. Either the complete statement executes and persists, or nothing is persisted at all. - Consistency - Make changes through transactions only to predefined tables in a predictable way. - Isolation - When concurrent users are executing transactions, they are isolated to not interfere with each other. - Durability - Successfully executed transactional data are persisted in a manner that it allows data retrieval even after a system failure event.
  4. What is SQL? - Types of SQL Commands: - DDL

    (Data Definition Language) - CREATE | ALTER | TRUNCATE | DROP | RENAME - DML (Data Manipulation Language) - INSERT | UPDATE | DELETE - DQL (Data Query Language) - SELECT - TCL (Transaction Control Language) - COMMIT | ROLLBACK | SAVEPOINT - DCL (Data Control Language) - GRANT | REVOKE
  5. What NoSQL is NOT? - Not a standard! - Not

    a RDBMS replacement! - Doesn’t mean it says NO to SQL. - Not the best place to maintain financial data or business critical data
  6. What is NoSQL? - Non relational data model (No more

    data normalization) - Schemaless / Flexible Schema - Almost always Distributed and Replicated - Horizontally Scalable - Adheres to BASE model - Basic Availability - Soft-state - Eventual Consistency
  7. When to NoSQL? - Data requires a flexible schema -

    High throughput read-write operations - Temporal data - Temporary data - Logging data for analysis - Eventual consistency is not a deal breaker. Application is tolerance to data inconsistencies.
  8. Types of NoSQL Databases - Document Databases - Graph Databases

    - Column-Oriented Stores - Key-Value Stores
  9. MongoDB - Documents stored/accessed as JSON/BSON (Internally persisted as BSON)

    - Documents are stored as Collections as opposed to Tables - Documents are Polymorphic (Different documents in a collection may have varying set of fields) - Not required to define any schema (Schema validation is optional) - New fields can be added to documents without affecting other documents in the collection. No central catalog.
  10. Neo4j - Supports full ACID rules - Supports unique constraints

    - Flexible schema support - Data is stored as a property graph model - Ability to export data as JSON or XML
  11. Apache Cassandra - Column oriented data storage (in contrast to

    row oriented data in SQL Servers) - Multiple columns per key - Allows extremely fast writes - Consistency is tunable - Highly scalable horizontally - Supports SQL-Like query language - Better partitioning and replication support
  12. Redis - Run atomic operations - Works with an in-memory

    dataset - Can choose to persist to storage - Supports multiple data structures (strings, hashes, lists, streams, etc.) - Has built in replication, scripting, transactions