SlideShare a Scribd company logo
INTRODUCTION TO NOSQL
AHMED HELMY | SENIOR SOFTWARE DEVELOPER
AGENDA
 Why NoSQL?
 What is NoSQL?
 Distribution Models
 The CAP Theorem
 NoSQL Types
 NoSQL or Relational or Both?
 Demo!
WHY NOSQL
 Relational databases provides
 Default choice for serious data storage
 Concurrency
 Almost Standard
 Big data
 Websites tracking activities in a very detailed way
 Links, social networks, activity logs, etc…
 Require more computing resources
 Scaling up
 Scaling out (Clusters)
 Relational databases are not designed to be run on clusters
 Relational sharding has to be controlled by the application
 Relational on clusters has high license prices
 Google and Amazon (BigTable, Dynamo)
WHAT IS NOSQL
 NoSQL databases known by it’s characteristics
 Not using Relational Model
 No relations
 No normalization
 No joins
 No Grouping
 Not using SQL
 CQL
 Distributed (Run on Clusters)
 Open-source
 Schemaless
 BASE (Basically Available, Soft state, Eventual consistency) instead of ACID
DISTRIBUTION MODELS
 Single Server
 simplest
 No distribution at all
 Sharding
 Horizontal Scalability
 Putting different parts of the data onto different servers
 Each node does its own reads and writes
 Improve performance
 Can place the data close to where it’s being accessed
 Many NoSQL databases offers auto-sharding
 Replication
 One node is the master or primary
 Master used to update data
 Slave nodes used for scaling read requests horizontally
 If Master fails, the slaves can still handle read request
 Slave can act as a hot backup
THE CAP THEOREM
Distribute
d
System
Consistency
Partitioning
Availabilit
y
Node A Node B
Value 1 Value 1
Value 2
NOSQL TYPES
 Classified into four types
 Key-Value pair
 Document
 Column Family
 Graph
KEY-VALUE
 Hash table, used when all access to the database is via primary key
 Redis, the aggregate being stored does not have to be a domain object, it could be any data structure, Redis supports lists, sets,
hashes, and can do range, diff, union, and intersection operations
 Schema may differ from row to row
 Consistency: is applicable only for operations on a single key
 Newest write wins
 Both values are returned to the client to resolve the conflict
 Transactions: no guarantees on the writes
 Using w factor – replication factor – during the write API call
 The write is reported as successful only when it is written and reported as a success on at least three of the nodes
 Scaling:
 Sharding
 Replication
KEY-VALUE
 Use Cases
 Storing Session Information
 Caching (Redis)
 User Profiles, Preferences
 Shopping Cart Data
 When Not to Use
 Relationships among data
 Multi-operation Transactions
 Query by Data
 Workaround to use (Riak Search, Solr,..)
SQL Server Redis
Database instance Redis cluster
Table Namespace
Row Key-value pair
rowid Key
DEMO!
DOCUMENT
 Documents are the main concept in document databases
 Very geared towards JavaScript and JSON
 Documents are JSON, BSON objects
 CouchDB/MongoDB use javascript as native language
 Document databases store documents in the value part of the key-value store, think about document databases as key-value stores where the value is examinable
 Although MongoDB supports join via DBRef, Embedding child documents as sub-objects inside documents provides for easy access and better performance
 CouchDB supports full REST interface
 Consistency:
 MongoDB database is configured by using replica sets
 Every write can specify the number of servers the write has to be propagated to before it returns as successful
 You can increase the w value for stronger consistency but will suffer on write performance
 Transactions:
 Transactions involving more than one operation are not possible, although there are products such as RavenDB that do support transactions across multiple operations
 Availability: MongoDB implements replication, providing high availability using replica sets
 Scaling:
 Sharding
 Replication
DOCUMENT
 Use Cases
 Event Logging
 CMS, Blogs
 Web analytics
 E-commerce
 CouchDB get called “web database”, think of EverNote
 When Not to Use
 Complex Transactions
SQL Server MongoDB
Database instance MongoDB instance
Database database
Table collection
Row document
rowid _id
join DBRef
DEMO!
KEY FAMILY
 Store data with keys mapped to values, and the values grouped into multiple column families
 Use Cases
 Event Logging
 CMS, Blogs
SQL Server Cassandra
Database instance cluster
Database keyspace
Table Column family
Row row
Column same for all rows Column can be different per row
GRAPH
 Store entities and relations between these entities
 Use Cases
 Social Networks
 Routing, and location-based services
RELATIONAL IS GOOD
 Familiarity
 Stability
 Feature set
 Support
 Transactions
NOSQL OR RELATIONAL OR BOTH
 Type of App
 Consistency vs Massive Scale
 Internal system vs Public
 Below a certain threshold of concurrent usage, NoSQL may be slower than relational
 Productivity
 NoSQL db tooling still immature
 Queries require significant work, and testing
 Programming platforms, frameworks and components may support RDBMSes much more robustly
 If schema subject to frequent change then NoSQL may be more productive
 Skill Sets and Investment
 Does your staff have RDBMS skills already?
 Do you have significant investment in relational database hw/sw?
 Do you want to retool/support both?
 Startups can employ developers who possess NoSQL skills and prefer NoSQL?
 Recommendations
 Large, public, content-centric properties: NoSQL
 Internal, LOB supporting business operations: relational
QUESTIONS!
REFERENCES
 NoSQL Distilled
 https://martinfowler.com/books/nosql.html
 Understanding NoSQL
 https://www.pluralsight.com/courses/understanding-nosql
THANK YOU

More Related Content

What's hot

No sq lv2
No sq lv2No sq lv2
No sq lv2
Nusrat Sharmin
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
Antonios Chatzipavlis
 
Microsoft Azure BI Solutions in the Cloud
Microsoft Azure BI Solutions in the CloudMicrosoft Azure BI Solutions in the Cloud
Microsoft Azure BI Solutions in the Cloud
Mark Kromer
 
Thinking in a document centric world with RavenDB by Nick Josevski
Thinking in a document centric world with RavenDB by Nick JosevskiThinking in a document centric world with RavenDB by Nick Josevski
Thinking in a document centric world with RavenDB by Nick Josevski
Nick Josevski
 
Intro to Azure Data Factory v1
Intro to Azure Data Factory v1Intro to Azure Data Factory v1
Intro to Azure Data Factory v1
Eric Bragas
 
Database Choices
Database ChoicesDatabase Choices
Database Choices
Lynn Langit
 
Deep Dive on ArangoDB
Deep Dive on ArangoDBDeep Dive on ArangoDB
Deep Dive on ArangoDB
Max Neunhöffer
 
Azure document db/Cosmos DB
Azure document db/Cosmos DBAzure document db/Cosmos DB
Azure document db/Cosmos DB
Mohit Chhabra
 
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...DneprCiklumEvents
 
Introduction to RavenDB
Introduction to RavenDBIntroduction to RavenDB
Introduction to RavenDB
Sasha Goldshtein
 
RavenDB Presentation
RavenDB PresentationRavenDB Presentation
RavenDB PresentationMark Rodseth
 
Azure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosqlAzure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosql
Riccardo Cappello
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
Brian Ritchie
 
Tools and Tips For Data Warehouse Developers (SQLGLA)
Tools and Tips For Data Warehouse Developers (SQLGLA)Tools and Tips For Data Warehouse Developers (SQLGLA)
Tools and Tips For Data Warehouse Developers (SQLGLA)
Cathrine Wilhelmsen
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
Ashwani Kumar
 
RavenDB Overview
RavenDB OverviewRavenDB Overview
RavenDB Overview
Julie Lerman
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Kyle Banerjee
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
sameerfaizan
 
Extensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software ArchitectureExtensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software Architecture
Max Neunhöffer
 
SSIS: Flow tasks, containers and precedence constraints
SSIS: Flow tasks, containers and precedence constraintsSSIS: Flow tasks, containers and precedence constraints
SSIS: Flow tasks, containers and precedence constraints
Kiki Noviandi
 

What's hot (20)

No sq lv2
No sq lv2No sq lv2
No sq lv2
 
Introduction to azure document db
Introduction to azure document dbIntroduction to azure document db
Introduction to azure document db
 
Microsoft Azure BI Solutions in the Cloud
Microsoft Azure BI Solutions in the CloudMicrosoft Azure BI Solutions in the Cloud
Microsoft Azure BI Solutions in the Cloud
 
Thinking in a document centric world with RavenDB by Nick Josevski
Thinking in a document centric world with RavenDB by Nick JosevskiThinking in a document centric world with RavenDB by Nick Josevski
Thinking in a document centric world with RavenDB by Nick Josevski
 
Intro to Azure Data Factory v1
Intro to Azure Data Factory v1Intro to Azure Data Factory v1
Intro to Azure Data Factory v1
 
Database Choices
Database ChoicesDatabase Choices
Database Choices
 
Deep Dive on ArangoDB
Deep Dive on ArangoDBDeep Dive on ArangoDB
Deep Dive on ArangoDB
 
Azure document db/Cosmos DB
Azure document db/Cosmos DBAzure document db/Cosmos DB
Azure document db/Cosmos DB
 
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...03 net saturday anton samarskyy ''document oriented databases for the .net pl...
03 net saturday anton samarskyy ''document oriented databases for the .net pl...
 
Introduction to RavenDB
Introduction to RavenDBIntroduction to RavenDB
Introduction to RavenDB
 
RavenDB Presentation
RavenDB PresentationRavenDB Presentation
RavenDB Presentation
 
Azure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosqlAzure CosmosDB the new frontier of big data and nosql
Azure CosmosDB the new frontier of big data and nosql
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
Tools and Tips For Data Warehouse Developers (SQLGLA)
Tools and Tips For Data Warehouse Developers (SQLGLA)Tools and Tips For Data Warehouse Developers (SQLGLA)
Tools and Tips For Data Warehouse Developers (SQLGLA)
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
RavenDB Overview
RavenDB OverviewRavenDB Overview
RavenDB Overview
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
NoSql Data Management
NoSql Data ManagementNoSql Data Management
NoSql Data Management
 
Extensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software ArchitectureExtensible Database APIs and their role in Software Architecture
Extensible Database APIs and their role in Software Architecture
 
SSIS: Flow tasks, containers and precedence constraints
SSIS: Flow tasks, containers and precedence constraintsSSIS: Flow tasks, containers and precedence constraints
SSIS: Flow tasks, containers and precedence constraints
 

Similar to Introduction to NoSQL

Beyond Relational Databases
Beyond Relational DatabasesBeyond Relational Databases
Beyond Relational Databases
Gregory Boissinot
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
Mohammed Fazuluddin
 
NoSQL Options Compared
NoSQL Options ComparedNoSQL Options Compared
NoSQL Options ComparedSergey Bushik
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
James Serra
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
Rahul P
 
05 No SQL Sudarshan.ppt
05 No SQL Sudarshan.ppt05 No SQL Sudarshan.ppt
05 No SQL Sudarshan.ppt
AnandKonj1
 
No SQL Databases.ppt
No SQL Databases.pptNo SQL Databases.ppt
No SQL Databases.ppt
ssuser8c8fc1
 
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
sankarapu posibabu
 
Which no sql database
Which no sql databaseWhich no sql database
Which no sql database
Nitin KR
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
Folio3 Software
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
RojaT4
 
Nosql
NosqlNosql
Nosql
ROXTAD71
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
Ramakant Soni
 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdf
ajajkhan16
 
Vskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills Apache Cassandra sample material
Vskills Apache Cassandra sample material
Vskills
 
NO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloudNO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloud
Manu Cohen-Yashar
 
No sql databases
No sql databasesNo sql databases
No sql databases
Walaa Hamdy Assy
 

Similar to Introduction to NoSQL (20)

Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
Beyond Relational Databases
Beyond Relational DatabasesBeyond Relational Databases
Beyond Relational Databases
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
NoSQL Options Compared
NoSQL Options ComparedNoSQL Options Compared
NoSQL Options Compared
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
 
05 No SQL Sudarshan.ppt
05 No SQL Sudarshan.ppt05 No SQL Sudarshan.ppt
05 No SQL Sudarshan.ppt
 
No SQL Databases.ppt
No SQL Databases.pptNo SQL Databases.ppt
No SQL Databases.ppt
 
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
No SQL Databases sdfghjkl;sdfghjkl;sdfghjkl;'
 
Which no sql database
Which no sql databaseWhich no sql database
Which no sql database
 
No sql
No sqlNo sql
No sql
 
NOSQL Database: Apache Cassandra
NOSQL Database: Apache CassandraNOSQL Database: Apache Cassandra
NOSQL Database: Apache Cassandra
 
Big data technology unit 3
Big data technology unit 3Big data technology unit 3
Big data technology unit 3
 
Nosql
NosqlNosql
Nosql
 
Nosql
NosqlNosql
Nosql
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
NOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdfNOSQL in big data is the not only structure langua.pdf
NOSQL in big data is the not only structure langua.pdf
 
Vskills Apache Cassandra sample material
Vskills Apache Cassandra sample materialVskills Apache Cassandra sample material
Vskills Apache Cassandra sample material
 
NO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloudNO SQL Databases, Big Data and the cloud
NO SQL Databases, Big Data and the cloud
 
No sql databases
No sql databasesNo sql databases
No sql databases
 

Recently uploaded

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 

Recently uploaded (20)

LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 

Introduction to NoSQL

  • 1. INTRODUCTION TO NOSQL AHMED HELMY | SENIOR SOFTWARE DEVELOPER
  • 2. AGENDA  Why NoSQL?  What is NoSQL?  Distribution Models  The CAP Theorem  NoSQL Types  NoSQL or Relational or Both?  Demo!
  • 3. WHY NOSQL  Relational databases provides  Default choice for serious data storage  Concurrency  Almost Standard  Big data  Websites tracking activities in a very detailed way  Links, social networks, activity logs, etc…  Require more computing resources  Scaling up  Scaling out (Clusters)  Relational databases are not designed to be run on clusters  Relational sharding has to be controlled by the application  Relational on clusters has high license prices  Google and Amazon (BigTable, Dynamo)
  • 4. WHAT IS NOSQL  NoSQL databases known by it’s characteristics  Not using Relational Model  No relations  No normalization  No joins  No Grouping  Not using SQL  CQL  Distributed (Run on Clusters)  Open-source  Schemaless  BASE (Basically Available, Soft state, Eventual consistency) instead of ACID
  • 5. DISTRIBUTION MODELS  Single Server  simplest  No distribution at all  Sharding  Horizontal Scalability  Putting different parts of the data onto different servers  Each node does its own reads and writes  Improve performance  Can place the data close to where it’s being accessed  Many NoSQL databases offers auto-sharding  Replication  One node is the master or primary  Master used to update data  Slave nodes used for scaling read requests horizontally  If Master fails, the slaves can still handle read request  Slave can act as a hot backup
  • 7. NOSQL TYPES  Classified into four types  Key-Value pair  Document  Column Family  Graph
  • 8. KEY-VALUE  Hash table, used when all access to the database is via primary key  Redis, the aggregate being stored does not have to be a domain object, it could be any data structure, Redis supports lists, sets, hashes, and can do range, diff, union, and intersection operations  Schema may differ from row to row  Consistency: is applicable only for operations on a single key  Newest write wins  Both values are returned to the client to resolve the conflict  Transactions: no guarantees on the writes  Using w factor – replication factor – during the write API call  The write is reported as successful only when it is written and reported as a success on at least three of the nodes  Scaling:  Sharding  Replication
  • 9. KEY-VALUE  Use Cases  Storing Session Information  Caching (Redis)  User Profiles, Preferences  Shopping Cart Data  When Not to Use  Relationships among data  Multi-operation Transactions  Query by Data  Workaround to use (Riak Search, Solr,..) SQL Server Redis Database instance Redis cluster Table Namespace Row Key-value pair rowid Key
  • 10. DEMO!
  • 11. DOCUMENT  Documents are the main concept in document databases  Very geared towards JavaScript and JSON  Documents are JSON, BSON objects  CouchDB/MongoDB use javascript as native language  Document databases store documents in the value part of the key-value store, think about document databases as key-value stores where the value is examinable  Although MongoDB supports join via DBRef, Embedding child documents as sub-objects inside documents provides for easy access and better performance  CouchDB supports full REST interface  Consistency:  MongoDB database is configured by using replica sets  Every write can specify the number of servers the write has to be propagated to before it returns as successful  You can increase the w value for stronger consistency but will suffer on write performance  Transactions:  Transactions involving more than one operation are not possible, although there are products such as RavenDB that do support transactions across multiple operations  Availability: MongoDB implements replication, providing high availability using replica sets  Scaling:  Sharding  Replication
  • 12. DOCUMENT  Use Cases  Event Logging  CMS, Blogs  Web analytics  E-commerce  CouchDB get called “web database”, think of EverNote  When Not to Use  Complex Transactions SQL Server MongoDB Database instance MongoDB instance Database database Table collection Row document rowid _id join DBRef
  • 13. DEMO!
  • 14. KEY FAMILY  Store data with keys mapped to values, and the values grouped into multiple column families  Use Cases  Event Logging  CMS, Blogs SQL Server Cassandra Database instance cluster Database keyspace Table Column family Row row Column same for all rows Column can be different per row
  • 15. GRAPH  Store entities and relations between these entities  Use Cases  Social Networks  Routing, and location-based services
  • 16. RELATIONAL IS GOOD  Familiarity  Stability  Feature set  Support  Transactions
  • 17. NOSQL OR RELATIONAL OR BOTH  Type of App  Consistency vs Massive Scale  Internal system vs Public  Below a certain threshold of concurrent usage, NoSQL may be slower than relational  Productivity  NoSQL db tooling still immature  Queries require significant work, and testing  Programming platforms, frameworks and components may support RDBMSes much more robustly  If schema subject to frequent change then NoSQL may be more productive  Skill Sets and Investment  Does your staff have RDBMS skills already?  Do you have significant investment in relational database hw/sw?  Do you want to retool/support both?  Startups can employ developers who possess NoSQL skills and prefer NoSQL?  Recommendations  Large, public, content-centric properties: NoSQL  Internal, LOB supporting business operations: relational
  • 19. REFERENCES  NoSQL Distilled  https://martinfowler.com/books/nosql.html  Understanding NoSQL  https://www.pluralsight.com/courses/understanding-nosql

Editor's Notes

  1. To scale out, we have to partition. It leaves a choice between consistency and availability. (In almost all cases, we would choose availability over consistency)