SlideShare a Scribd company logo
Key-Value Based Databases
1
Content
• Introduction to Key-Value Databases,
• Key Value Store,
• Essential Features, Consistency, Transactions, Partitioning, Scaling, Replicating Data, Versioning
Data,
• How to construct a Key, Using Keys to Locate Values, Hash Functions,
• Store data in Values, Use Cases.
Key-Value Based Databases
2
Introduction
• A key-value database is a type of
nonrelational database that uses a
simple key-value method to store
data.
• A key-value database stores data as
a collection of key-value pairs in
which a key serves as a unique
identifier. Both keys and values can
be anything, ranging from simple
objects to complex compound
objects.
• Key-value databases are highly
partitionable and allow horizontal
scaling at scales that other types of
Key-Value Based Databases
3
• Akey-value database also known as a key-value store and key-value store
database is a type of NoSQL database that uses a simple key/value method to
store data.
• The key-value pair is a well established concept in many programming
languages. Programming languages typically refers to a key-value as an
associative array or data structure.
• Akey-value is also commonly referred to as a dictionary or hash.
Introduction
4
• Flexible data modeling:
• key-value store does not enforce any structure on the data, it offers tremendous
flexibility for modeling data to match the requirements of the application.
• High performance:
• Key-value architecture can be more performant than relational databases in many
scenarios, because there is no need to perform lock, join, union, or other operations
when working with objects.
• Unlike traditional relational databases, a key-value store does not need to search
through columns or tables to find an object. Knowing the key will enable very fast
location of an object.
Key-value Database Benefits
5
• Massive scalability:
• Most key-value databases makes it easy to scale out on demand using commodity
hardware. They can grow to virtually any scale without significant redesign of the
database.
• High availability:
• Key-value databases may make it easier and less complex to provide high availability .
• Some key-value databases use a masterless, distributed architecture that eliminates
single points of failure to maximise resiliency.
• Operational simplicity:
• it is as easy as possible to add and remove capacity as needed and that any hardware or
network failures within the environment do not create downtime.
Benefits-
6
• popular key-value databases are Riak, Redis (often referred to as Data Structure
server), Memcached , Berkeley DB, upscale dB, Amazon DynamoDB (not open-source), Project
Voldemort and Couchbase.
• All key-value databases are not the same, there are major differences between these products, for
example: Memcached data is not persistent while in Riak it is, these features are important when
implementing certain solutions.
• Let us consider we need to implement caching of user preferences, implementing them in memcached
means, when the node goes down all the data is lost and needs to be refreshed from source system, if we store
the same data in Riak, we may not need to worry about losing data.
Benefits-
7
• Key-Value Stores are a type of data store that organise data differently from your
traditional SQL store.
• The fundamental data model of a key-value store is the associative array (a.k.a. a map, a
dictionary or
a hash). It is a collection of key-value pairs, where the key is unique in the collection.
• Akey can be an ID or a name or anything you want to use as an identifier.
• Rather than storing data into a variety of tables and columns like in SQL stores, key-value
stores split a data model into a collection of data structures such as, key-value strings,
lists, hashes, sets, etc.
• Redis focuses on high performance and a simple querying language that is just a set of
data retrieval commands.
Key Value Stores
8
• The nature of key-value stores makes them best suited to operate as caches or data structure
stores and in situations that are performance sensitive.
• We can build more advanced data structures on top of key-value pairs. You can also use the
high performance to build queues or publish-subscribe mechanisms.
• Key-value stores fall into the NoSQL family of databases, they do not use SQL and
have a flexible schema.
• Application defines the key-value pairs and can change the definition at any time. We
decide how to store your data.
Key Value Stores
9
• Delete( key ): Delete the data that was stored under the “key”.
Aquick overview of key-value stores
• Key-value stores are one of the simplest forms of database. Almost all programming languages
come with in-memory key-value stores. The map container from the C++ STL is a key-value store,
just like the HashMap of Java, and the dictionary type in Python. Key-value stores generally share
the following interface:
• Get( key ): Get some data previously saved under the identifier “key”, or fail if no data was stored
for “key”.
• Set( key, value ): Store the “value” in memory under the identifier “key”, so we can access it later
referencing the same “key”. If some data was already present under the “key”, this data will be
replaced.
Key Value Stores
14
• Most underlying implementations are using either hash tables or some kind of self-
balancing trees, like B- Trees or Red-black trees. Sometimes, the data is too big to fit
in memory, or the data must be persisted in case the system crashes for any reason. In
that case, using the file system becomes mandatory.
• Key-value stores are part of the NoSQL movement, which regroup all the database
systems that do not make use of all the concepts coined by relational databases.
• Do not use the SQL query language.
• May not provide full support of theACID paradigm (atomicity, consistency, isolation,
durability).
• May offer a distributed, fault-tolerant architecture.
Key Value Stores
11
• Unlike relational databases, key-value stores have no knowledge of the data in
the values, and do not have any schema like in MySQL or PostgreSQL.
• This also means that, it is impossible to query only part of the data by doing any
kind of filtering, as it can be done in SQL with the WHERE clause.
• If you do not know where to look for, you will have to iterate over all the keys, get
their corresponding values, apply whatever filtering that you need on those values,
and keep only the ones you need.
Key Value Stores Limitations
12
• Full performance can only be attained in the cases where the keys are
known, otherwise key-value stores turn up to be simply inadequate .
• Therefore, even if key-value stores often outperform relational database
systems, by several orders of magnitude in terms of sheer access speed, the
requirement to know the keys restricts the possible applications.
Key Value Stores Limitations
13
• Transactions:
• While it is possible to offer transaction guarantees in a key value store, those are
usually offered in the context of a single key put.
• It is possible to offer those on multiple keys, but that really does not work when
you start thinking about a distributed key value store, where different keys may
reside on different machines.
• Some data stores offer no transaction guarantees.
Essential Features
14
Scaling up
• Key-value stores scale out by implementing partitioning (storing data on more than one
node), replication and auto recovery.
• They can scale up by maintaining the database in RAM and minimise the effects of
ACID guarantees (a guarantee that committed transactions persist
somewhere) by avoiding locks, latches and low-overhead server calls.
• The simplest way for key-value stores to scale up is to shard the entire key space. This
means that keys starting inA, go to one server, while keys starting with B go to another
server.
• In this system, a key is only stored on a single server. This drastically simplify things like
transactions guarantees, but it exposes the system for data loss if a single server goes down.
Essential Features
26
• Storing multiple copies of the same data in other servers, or even racks of servers, helps to
ensure availability of data if one server fails. Server failure happens primarily in the same
cluster.
• operate replicas two main ways :
• Master-slave:
• All reads and writes happen to the master. Slaves take over and receive requests only
if the master fails. Master-slave replication is typically used on ACID-compliant
key-value stores.
• To enable maximum consistency, the primary store is written to and all replicas are
updated before the transaction completes. This mechanism is called a two-phase
commit and creates extra network and processing time on the replicas.
Replication
16
• Master-master:
• Reads and writes can happen on all nodes managing a key. There’s no concept of a
“primary” partition owner.
• Master-master replicas are typically eventually consistent, with the cluster
performing an automatic operation to determine the latest value for a key and
removing older, stale values.
• In most key-value stores, this happens slowly — at read time. Riak is the exception
here because it has an anti-entropy service checking for consistency during normal
operations.
Replication
17
• To enable automatic conflict resolution, you need a mechanism to indicate the latest
version of data. Eventually consistent key-value stores achieve conflict resolution in
different ways.
• Riak uses a vector-clock mechanism to predict which copy is the most recent one.
• Other key-value stores use simple timestamps to indicate staleness.
• When conflicts cannot be resolved automatically, both copies of data are sent to the client.
• Conflicting data being sent to the client can occur in the following situation:
• 1. Client 1 writes to replica A ‘Adam: {likes: Cheese}’.
• 2. Replica A copies data to replica B.
• 3. Client 1 updates data on replica A to ‘Adam: {likes: Cheese, hates: sunlight}’.
At this point, replica A doesn’t have enough time to copy the latest data to replica B
Versioning data
18
• 4. Client 2 updates data on replica B to ‘Adam: {likes: Dogs, hates: kangaroos}’.
• At this point, replica A and replica B are in conflict and the database cluster cannot
automatically resolve the differences.
An alternative mechanism is to use time stamps and trust them to indicate the latest data
In such a situation, it’s common sense for the application to check that the time stamps read
the latest value before updating the value. They are checking for the check and set mechanism,
which basically means ‘If the latest version is still version 2, then save my version 3’.
This mechanism is sometimes referred to as read match update (RMU) or read match write
(RMW).
This mechanism is the default mechanism employed by Oracle NoSQL, Redis, Riak, and
Voldemort.
Versioning data
19
What can a Key-Value Database be used for?
Key-value databases can be applied to many scenarios. For example, key-value stores can be useful
for storing things such as the following:
General Web/Computers
• User profiles
• Session information
• Article/blog comments
• Emails
• Status messages
Key-Value Based Databases
20
E-commerce
• Shopping cart contents
• Product categories
• Product details
• Product reviews
Networking/Data Maintenance
• Telecom directories
• Internet Protocol (IP) forwarding tables
• Data deduplication
• Key-value databases can even store whole webpages, by using the URL as the key and the web
page as the value.
Key-Value Based Databases
21
clones which feature eventual consistency.
Use Cases
• Complex transactions because you cannot afford to lose data or if you would like a simple transaction
programming model, then look at a relational or grid database.
• Example: An inventory system that might want full acid. I was very unhappy, when I bought a
product and they said later they were out of stock. I did not want a compensated transaction. I
wanted my item!
• To scale, then nosql or sql can work. Look for systems that support scale-out, partitioning, live
addition and removal of machines, load balancing, automatic sharding and rebalancing, and fault
tolerance.
• To always be able to write to a database because, you need high availability then look at bigtable
Key-Value Based Databases
39
• To handle lots of small continuous reads and writes, that may be volatile, then look at document or
key-value or databases offering fast in-memory access.Also consider SSD.
• To implement social network operations, then you first may want a graph database or second, a
database like riak that supports relationships.An in-memory relational database, with simple SQL
joins might suffice for small data sets. Redis' set and list operations could work too.
Key-Value Based Databases
23
1. Define Key Value and write a note on Key Based Database.
2. Explain the essential features in NoSQL.
3. Describe Partitioning and Scaleup.
4. How to construct KEY and Store Key Value.
5. Explain Hash Functions.
6. Explain the concept of Store in Data values
Assignment
General Instructions:
Please answer the below set of questions.
i. The answers should be clear, legible and well presented.
ii. Illustrate your answers with suitable examples wherever necessary.
iii. Please provide sources (if any) for data, images, facts, etc.
Key-Value Based Databases
66
Assignment (Cont…)
7. Does NoSQL Database Interact With Oracle Database?
8. When should I use a NoSQL database instead of a relational database?
9. Could you explain the transaction support by using BASE in NoSQL systems?
10. What is the difference between NoSQL and RDBMS?
11. Tell me the challenges of using NoSQL?
12. Difference with NOSQLVS Relational
Key-Value Based Databases
25
Ad

More Related Content

What's hot (20)

Nosql data models
Nosql data modelsNosql data models
Nosql data models
Viet-Trung TRAN
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
Krish_ver2
 
Machine Learning Algorithm - KNN
Machine Learning Algorithm - KNNMachine Learning Algorithm - KNN
Machine Learning Algorithm - KNN
Kush Kulshrestha
 
Temporal database
Temporal databaseTemporal database
Temporal database
District Administration
 
Big data unit i
Big data unit iBig data unit i
Big data unit i
Navjot Kaur
 
Object storage
Object storageObject storage
Object storage
akash tambakad
 
Cs6703 grid and cloud computing unit 5
Cs6703 grid and cloud computing unit 5Cs6703 grid and cloud computing unit 5
Cs6703 grid and cloud computing unit 5
RMK ENGINEERING COLLEGE, CHENNAI
 
Partitioning
PartitioningPartitioning
Partitioning
Reema Gajjar
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property Graphs
DATAVERSITY
 
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
Prashant Gupta
 
Optics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structureOptics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structure
Rajesh Piryani
 
Datamining - On What Kind of Data
Datamining - On What Kind of DataDatamining - On What Kind of Data
Datamining - On What Kind of Data
wina wulansari
 
Introduction to data warehousing
Introduction to data warehousing   Introduction to data warehousing
Introduction to data warehousing
Girish Dhareshwar
 
Apache Hadoop
Apache HadoopApache Hadoop
Apache Hadoop
Ajit Koti
 
Object Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object StorageObject Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object Storage
Hitachi Vantara
 
The Apache Spark File Format Ecosystem
The Apache Spark File Format EcosystemThe Apache Spark File Format Ecosystem
The Apache Spark File Format Ecosystem
Databricks
 
Streaming computing: architectures, and tchnologies
Streaming computing: architectures, and tchnologiesStreaming computing: architectures, and tchnologies
Streaming computing: architectures, and tchnologies
Natalino Busa
 
Data mining primitives
Data mining primitivesData mining primitives
Data mining primitives
lavanya marichamy
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data Mining
Valerii Klymchuk
 
Data mining an introduction
Data mining an introductionData mining an introduction
Data mining an introduction
Dr-Dipali Meher
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
Krish_ver2
 
Machine Learning Algorithm - KNN
Machine Learning Algorithm - KNNMachine Learning Algorithm - KNN
Machine Learning Algorithm - KNN
Kush Kulshrestha
 
Slides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property GraphsSlides: Knowledge Graphs vs. Property Graphs
Slides: Knowledge Graphs vs. Property Graphs
DATAVERSITY
 
Optics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structureOptics ordering points to identify the clustering structure
Optics ordering points to identify the clustering structure
Rajesh Piryani
 
Datamining - On What Kind of Data
Datamining - On What Kind of DataDatamining - On What Kind of Data
Datamining - On What Kind of Data
wina wulansari
 
Introduction to data warehousing
Introduction to data warehousing   Introduction to data warehousing
Introduction to data warehousing
Girish Dhareshwar
 
Apache Hadoop
Apache HadoopApache Hadoop
Apache Hadoop
Ajit Koti
 
Object Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object StorageObject Storage 1: The Fundamentals of Objects and Object Storage
Object Storage 1: The Fundamentals of Objects and Object Storage
Hitachi Vantara
 
The Apache Spark File Format Ecosystem
The Apache Spark File Format EcosystemThe Apache Spark File Format Ecosystem
The Apache Spark File Format Ecosystem
Databricks
 
Streaming computing: architectures, and tchnologies
Streaming computing: architectures, and tchnologiesStreaming computing: architectures, and tchnologies
Streaming computing: architectures, and tchnologies
Natalino Busa
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data Mining
Valerii Klymchuk
 
Data mining an introduction
Data mining an introductionData mining an introduction
Data mining an introduction
Dr-Dipali Meher
 

Similar to Unit III Key-Value Based Databases in nosql.pptx (20)

Module 2.2 Introduction to NoSQL Databases.pptx
Module 2.2 Introduction to NoSQL Databases.pptxModule 2.2 Introduction to NoSQL Databases.pptx
Module 2.2 Introduction to NoSQL Databases.pptx
NiramayKolalle
 
Introduction to Data Science NoSQL.pptx
Introduction to Data Science  NoSQL.pptxIntroduction to Data Science  NoSQL.pptx
Introduction to Data Science NoSQL.pptx
tarakesh7199
 
NoSQL.pptx
NoSQL.pptxNoSQL.pptx
NoSQL.pptx
RithikRaj25
 
cours database pour etudiant NoSQL (1).pptx
cours database pour etudiant NoSQL (1).pptxcours database pour etudiant NoSQL (1).pptx
cours database pour etudiant NoSQL (1).pptx
ssuser1fde9c
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
abdulrahmanhelan
 
Nosql databases
Nosql databasesNosql databases
Nosql databases
Fayez Shayeb
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
Rahul Borate
 
Chapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choicesChapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choices
Maynooth University
 
Chapter 5 design of keyvalue databses from nosql for mere mortals
Chapter 5 design of keyvalue databses from nosql for mere mortalsChapter 5 design of keyvalue databses from nosql for mere mortals
Chapter 5 design of keyvalue databses from nosql for mere mortals
nehabsairam
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
Rahul Borate
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
NoSql
NoSqlNoSql
NoSql
Girish Khanzode
 
25 snowflake
25 snowflake25 snowflake
25 snowflake
剑飞 陈
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
Andriy Zabavskyy
 
MySQL: Know more about open Source Database
MySQL: Know more about open Source DatabaseMySQL: Know more about open Source Database
MySQL: Know more about open Source Database
Mahesh Salaria
 
Cassandra an overview
Cassandra an overviewCassandra an overview
Cassandra an overview
PritamKathar
 
NOsql Presentation.pdf
NOsql Presentation.pdfNOsql Presentation.pdf
NOsql Presentation.pdf
AkshayDwivedi31
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data Architecture
Arthur Gimpel
 
BigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearchBigData, NoSQL & ElasticSearch
BigData, NoSQL & ElasticSearch
Sanura Hettiarachchi
 
Revision
RevisionRevision
Revision
David Sherlock
 
Module 2.2 Introduction to NoSQL Databases.pptx
Module 2.2 Introduction to NoSQL Databases.pptxModule 2.2 Introduction to NoSQL Databases.pptx
Module 2.2 Introduction to NoSQL Databases.pptx
NiramayKolalle
 
Introduction to Data Science NoSQL.pptx
Introduction to Data Science  NoSQL.pptxIntroduction to Data Science  NoSQL.pptx
Introduction to Data Science NoSQL.pptx
tarakesh7199
 
cours database pour etudiant NoSQL (1).pptx
cours database pour etudiant NoSQL (1).pptxcours database pour etudiant NoSQL (1).pptx
cours database pour etudiant NoSQL (1).pptx
ssuser1fde9c
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
abdulrahmanhelan
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
Rahul Borate
 
Chapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choicesChapter1: NoSQL: It’s about making intelligent choices
Chapter1: NoSQL: It’s about making intelligent choices
Maynooth University
 
Chapter 5 design of keyvalue databses from nosql for mere mortals
Chapter 5 design of keyvalue databses from nosql for mere mortalsChapter 5 design of keyvalue databses from nosql for mere mortals
Chapter 5 design of keyvalue databses from nosql for mere mortals
nehabsairam
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
Rahul Borate
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
SpringPeople
 
A Closer Look at Apache Kudu
A Closer Look at Apache KuduA Closer Look at Apache Kudu
A Closer Look at Apache Kudu
Andriy Zabavskyy
 
MySQL: Know more about open Source Database
MySQL: Know more about open Source DatabaseMySQL: Know more about open Source Database
MySQL: Know more about open Source Database
Mahesh Salaria
 
Cassandra an overview
Cassandra an overviewCassandra an overview
Cassandra an overview
PritamKathar
 
Oracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data ArchitectureOracle Week 2016 - Modern Data Architecture
Oracle Week 2016 - Modern Data Architecture
Arthur Gimpel
 
Ad

More from Rahul Borate (20)

ch7 powerpoint presentation introduction.ppt
ch7 powerpoint presentation  introduction.pptch7 powerpoint presentation  introduction.ppt
ch7 powerpoint presentation introduction.ppt
Rahul Borate
 
chapter 4 introduction to powerpoint .ppt
chapter 4 introduction to powerpoint .pptchapter 4 introduction to powerpoint .ppt
chapter 4 introduction to powerpoint .ppt
Rahul Borate
 
chapter ppt presentation engineering 1.ppt
chapter ppt presentation engineering 1.pptchapter ppt presentation engineering 1.ppt
chapter ppt presentation engineering 1.ppt
Rahul Borate
 
student t-test (new) distrutuin t test.ppt
student t-test (new) distrutuin t test.pptstudent t-test (new) distrutuin t test.ppt
student t-test (new) distrutuin t test.ppt
Rahul Borate
 
scatter plots and visualization concept.pptx
scatter plots and visualization concept.pptxscatter plots and visualization concept.pptx
scatter plots and visualization concept.pptx
Rahul Borate
 
Corelation and covariance and cocrrr.ppt
Corelation and covariance and cocrrr.pptCorelation and covariance and cocrrr.ppt
Corelation and covariance and cocrrr.ppt
Rahul Borate
 
Box Plot in stat using python hypothesis.pptx
Box Plot in stat using python hypothesis.pptxBox Plot in stat using python hypothesis.pptx
Box Plot in stat using python hypothesis.pptx
Rahul Borate
 
Data Visualization_pandas in hadoop.pptx
Data Visualization_pandas in hadoop.pptxData Visualization_pandas in hadoop.pptx
Data Visualization_pandas in hadoop.pptx
Rahul Borate
 
sampling for statistics and population.ppt
sampling for statistics and population.pptsampling for statistics and population.ppt
sampling for statistics and population.ppt
Rahul Borate
 
Software and Hardware for requirements.pptx
Software and Hardware for requirements.pptxSoftware and Hardware for requirements.pptx
Software and Hardware for requirements.pptx
Rahul Borate
 
Hadoop and their in big data analysis EcoSystem.pptx
Hadoop and their in big data analysis EcoSystem.pptxHadoop and their in big data analysis EcoSystem.pptx
Hadoop and their in big data analysis EcoSystem.pptx
Rahul Borate
 
UNIT II Evaluating NoSQL for various .pptx
UNIT II Evaluating NoSQL for various .pptxUNIT II Evaluating NoSQL for various .pptx
UNIT II Evaluating NoSQL for various .pptx
Rahul Borate
 
Syllabus presentation stastics for management
Syllabus presentation stastics for managementSyllabus presentation stastics for management
Syllabus presentation stastics for management
Rahul Borate
 
PigHive presentation and hive impor.pptx
PigHive presentation and hive impor.pptxPigHive presentation and hive impor.pptx
PigHive presentation and hive impor.pptx
Rahul Borate
 
Unit 4_Introduction to Server Farms.pptx
Unit 4_Introduction to Server Farms.pptxUnit 4_Introduction to Server Farms.pptx
Unit 4_Introduction to Server Farms.pptx
Rahul Borate
 
Unit 3_Data Center Design in storage.pptx
Unit  3_Data Center Design in storage.pptxUnit  3_Data Center Design in storage.pptx
Unit 3_Data Center Design in storage.pptx
Rahul Borate
 
Fundamentals of storage Unit III Backup and Recovery.ppt
Fundamentals of storage Unit III Backup and Recovery.pptFundamentals of storage Unit III Backup and Recovery.ppt
Fundamentals of storage Unit III Backup and Recovery.ppt
Rahul Borate
 
Confusion Matrix.pptx
Confusion Matrix.pptxConfusion Matrix.pptx
Confusion Matrix.pptx
Rahul Borate
 
Unit 4 SVM and AVR.ppt
Unit 4 SVM and AVR.pptUnit 4 SVM and AVR.ppt
Unit 4 SVM and AVR.ppt
Rahul Borate
 
Unit I Fundamentals of Cloud Computing.pptx
Unit I Fundamentals of Cloud Computing.pptxUnit I Fundamentals of Cloud Computing.pptx
Unit I Fundamentals of Cloud Computing.pptx
Rahul Borate
 
ch7 powerpoint presentation introduction.ppt
ch7 powerpoint presentation  introduction.pptch7 powerpoint presentation  introduction.ppt
ch7 powerpoint presentation introduction.ppt
Rahul Borate
 
chapter 4 introduction to powerpoint .ppt
chapter 4 introduction to powerpoint .pptchapter 4 introduction to powerpoint .ppt
chapter 4 introduction to powerpoint .ppt
Rahul Borate
 
chapter ppt presentation engineering 1.ppt
chapter ppt presentation engineering 1.pptchapter ppt presentation engineering 1.ppt
chapter ppt presentation engineering 1.ppt
Rahul Borate
 
student t-test (new) distrutuin t test.ppt
student t-test (new) distrutuin t test.pptstudent t-test (new) distrutuin t test.ppt
student t-test (new) distrutuin t test.ppt
Rahul Borate
 
scatter plots and visualization concept.pptx
scatter plots and visualization concept.pptxscatter plots and visualization concept.pptx
scatter plots and visualization concept.pptx
Rahul Borate
 
Corelation and covariance and cocrrr.ppt
Corelation and covariance and cocrrr.pptCorelation and covariance and cocrrr.ppt
Corelation and covariance and cocrrr.ppt
Rahul Borate
 
Box Plot in stat using python hypothesis.pptx
Box Plot in stat using python hypothesis.pptxBox Plot in stat using python hypothesis.pptx
Box Plot in stat using python hypothesis.pptx
Rahul Borate
 
Data Visualization_pandas in hadoop.pptx
Data Visualization_pandas in hadoop.pptxData Visualization_pandas in hadoop.pptx
Data Visualization_pandas in hadoop.pptx
Rahul Borate
 
sampling for statistics and population.ppt
sampling for statistics and population.pptsampling for statistics and population.ppt
sampling for statistics and population.ppt
Rahul Borate
 
Software and Hardware for requirements.pptx
Software and Hardware for requirements.pptxSoftware and Hardware for requirements.pptx
Software and Hardware for requirements.pptx
Rahul Borate
 
Hadoop and their in big data analysis EcoSystem.pptx
Hadoop and their in big data analysis EcoSystem.pptxHadoop and their in big data analysis EcoSystem.pptx
Hadoop and their in big data analysis EcoSystem.pptx
Rahul Borate
 
UNIT II Evaluating NoSQL for various .pptx
UNIT II Evaluating NoSQL for various .pptxUNIT II Evaluating NoSQL for various .pptx
UNIT II Evaluating NoSQL for various .pptx
Rahul Borate
 
Syllabus presentation stastics for management
Syllabus presentation stastics for managementSyllabus presentation stastics for management
Syllabus presentation stastics for management
Rahul Borate
 
PigHive presentation and hive impor.pptx
PigHive presentation and hive impor.pptxPigHive presentation and hive impor.pptx
PigHive presentation and hive impor.pptx
Rahul Borate
 
Unit 4_Introduction to Server Farms.pptx
Unit 4_Introduction to Server Farms.pptxUnit 4_Introduction to Server Farms.pptx
Unit 4_Introduction to Server Farms.pptx
Rahul Borate
 
Unit 3_Data Center Design in storage.pptx
Unit  3_Data Center Design in storage.pptxUnit  3_Data Center Design in storage.pptx
Unit 3_Data Center Design in storage.pptx
Rahul Borate
 
Fundamentals of storage Unit III Backup and Recovery.ppt
Fundamentals of storage Unit III Backup and Recovery.pptFundamentals of storage Unit III Backup and Recovery.ppt
Fundamentals of storage Unit III Backup and Recovery.ppt
Rahul Borate
 
Confusion Matrix.pptx
Confusion Matrix.pptxConfusion Matrix.pptx
Confusion Matrix.pptx
Rahul Borate
 
Unit 4 SVM and AVR.ppt
Unit 4 SVM and AVR.pptUnit 4 SVM and AVR.ppt
Unit 4 SVM and AVR.ppt
Rahul Borate
 
Unit I Fundamentals of Cloud Computing.pptx
Unit I Fundamentals of Cloud Computing.pptxUnit I Fundamentals of Cloud Computing.pptx
Unit I Fundamentals of Cloud Computing.pptx
Rahul Borate
 
Ad

Recently uploaded (20)

World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
P-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 finalP-glycoprotein pamphlet: iteration 4 of 4 final
P-glycoprotein pamphlet: iteration 4 of 4 final
bs22n2s
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 

Unit III Key-Value Based Databases in nosql.pptx

  • 2. Content • Introduction to Key-Value Databases, • Key Value Store, • Essential Features, Consistency, Transactions, Partitioning, Scaling, Replicating Data, Versioning Data, • How to construct a Key, Using Keys to Locate Values, Hash Functions, • Store data in Values, Use Cases. Key-Value Based Databases 2
  • 3. Introduction • A key-value database is a type of nonrelational database that uses a simple key-value method to store data. • A key-value database stores data as a collection of key-value pairs in which a key serves as a unique identifier. Both keys and values can be anything, ranging from simple objects to complex compound objects. • Key-value databases are highly partitionable and allow horizontal scaling at scales that other types of Key-Value Based Databases 3
  • 4. • Akey-value database also known as a key-value store and key-value store database is a type of NoSQL database that uses a simple key/value method to store data. • The key-value pair is a well established concept in many programming languages. Programming languages typically refers to a key-value as an associative array or data structure. • Akey-value is also commonly referred to as a dictionary or hash. Introduction 4
  • 5. • Flexible data modeling: • key-value store does not enforce any structure on the data, it offers tremendous flexibility for modeling data to match the requirements of the application. • High performance: • Key-value architecture can be more performant than relational databases in many scenarios, because there is no need to perform lock, join, union, or other operations when working with objects. • Unlike traditional relational databases, a key-value store does not need to search through columns or tables to find an object. Knowing the key will enable very fast location of an object. Key-value Database Benefits 5
  • 6. • Massive scalability: • Most key-value databases makes it easy to scale out on demand using commodity hardware. They can grow to virtually any scale without significant redesign of the database. • High availability: • Key-value databases may make it easier and less complex to provide high availability . • Some key-value databases use a masterless, distributed architecture that eliminates single points of failure to maximise resiliency. • Operational simplicity: • it is as easy as possible to add and remove capacity as needed and that any hardware or network failures within the environment do not create downtime. Benefits- 6
  • 7. • popular key-value databases are Riak, Redis (often referred to as Data Structure server), Memcached , Berkeley DB, upscale dB, Amazon DynamoDB (not open-source), Project Voldemort and Couchbase. • All key-value databases are not the same, there are major differences between these products, for example: Memcached data is not persistent while in Riak it is, these features are important when implementing certain solutions. • Let us consider we need to implement caching of user preferences, implementing them in memcached means, when the node goes down all the data is lost and needs to be refreshed from source system, if we store the same data in Riak, we may not need to worry about losing data. Benefits- 7
  • 8. • Key-Value Stores are a type of data store that organise data differently from your traditional SQL store. • The fundamental data model of a key-value store is the associative array (a.k.a. a map, a dictionary or a hash). It is a collection of key-value pairs, where the key is unique in the collection. • Akey can be an ID or a name or anything you want to use as an identifier. • Rather than storing data into a variety of tables and columns like in SQL stores, key-value stores split a data model into a collection of data structures such as, key-value strings, lists, hashes, sets, etc. • Redis focuses on high performance and a simple querying language that is just a set of data retrieval commands. Key Value Stores 8
  • 9. • The nature of key-value stores makes them best suited to operate as caches or data structure stores and in situations that are performance sensitive. • We can build more advanced data structures on top of key-value pairs. You can also use the high performance to build queues or publish-subscribe mechanisms. • Key-value stores fall into the NoSQL family of databases, they do not use SQL and have a flexible schema. • Application defines the key-value pairs and can change the definition at any time. We decide how to store your data. Key Value Stores 9
  • 10. • Delete( key ): Delete the data that was stored under the “key”. Aquick overview of key-value stores • Key-value stores are one of the simplest forms of database. Almost all programming languages come with in-memory key-value stores. The map container from the C++ STL is a key-value store, just like the HashMap of Java, and the dictionary type in Python. Key-value stores generally share the following interface: • Get( key ): Get some data previously saved under the identifier “key”, or fail if no data was stored for “key”. • Set( key, value ): Store the “value” in memory under the identifier “key”, so we can access it later referencing the same “key”. If some data was already present under the “key”, this data will be replaced. Key Value Stores 14
  • 11. • Most underlying implementations are using either hash tables or some kind of self- balancing trees, like B- Trees or Red-black trees. Sometimes, the data is too big to fit in memory, or the data must be persisted in case the system crashes for any reason. In that case, using the file system becomes mandatory. • Key-value stores are part of the NoSQL movement, which regroup all the database systems that do not make use of all the concepts coined by relational databases. • Do not use the SQL query language. • May not provide full support of theACID paradigm (atomicity, consistency, isolation, durability). • May offer a distributed, fault-tolerant architecture. Key Value Stores 11
  • 12. • Unlike relational databases, key-value stores have no knowledge of the data in the values, and do not have any schema like in MySQL or PostgreSQL. • This also means that, it is impossible to query only part of the data by doing any kind of filtering, as it can be done in SQL with the WHERE clause. • If you do not know where to look for, you will have to iterate over all the keys, get their corresponding values, apply whatever filtering that you need on those values, and keep only the ones you need. Key Value Stores Limitations 12
  • 13. • Full performance can only be attained in the cases where the keys are known, otherwise key-value stores turn up to be simply inadequate . • Therefore, even if key-value stores often outperform relational database systems, by several orders of magnitude in terms of sheer access speed, the requirement to know the keys restricts the possible applications. Key Value Stores Limitations 13
  • 14. • Transactions: • While it is possible to offer transaction guarantees in a key value store, those are usually offered in the context of a single key put. • It is possible to offer those on multiple keys, but that really does not work when you start thinking about a distributed key value store, where different keys may reside on different machines. • Some data stores offer no transaction guarantees. Essential Features 14
  • 15. Scaling up • Key-value stores scale out by implementing partitioning (storing data on more than one node), replication and auto recovery. • They can scale up by maintaining the database in RAM and minimise the effects of ACID guarantees (a guarantee that committed transactions persist somewhere) by avoiding locks, latches and low-overhead server calls. • The simplest way for key-value stores to scale up is to shard the entire key space. This means that keys starting inA, go to one server, while keys starting with B go to another server. • In this system, a key is only stored on a single server. This drastically simplify things like transactions guarantees, but it exposes the system for data loss if a single server goes down. Essential Features 26
  • 16. • Storing multiple copies of the same data in other servers, or even racks of servers, helps to ensure availability of data if one server fails. Server failure happens primarily in the same cluster. • operate replicas two main ways : • Master-slave: • All reads and writes happen to the master. Slaves take over and receive requests only if the master fails. Master-slave replication is typically used on ACID-compliant key-value stores. • To enable maximum consistency, the primary store is written to and all replicas are updated before the transaction completes. This mechanism is called a two-phase commit and creates extra network and processing time on the replicas. Replication 16
  • 17. • Master-master: • Reads and writes can happen on all nodes managing a key. There’s no concept of a “primary” partition owner. • Master-master replicas are typically eventually consistent, with the cluster performing an automatic operation to determine the latest value for a key and removing older, stale values. • In most key-value stores, this happens slowly — at read time. Riak is the exception here because it has an anti-entropy service checking for consistency during normal operations. Replication 17
  • 18. • To enable automatic conflict resolution, you need a mechanism to indicate the latest version of data. Eventually consistent key-value stores achieve conflict resolution in different ways. • Riak uses a vector-clock mechanism to predict which copy is the most recent one. • Other key-value stores use simple timestamps to indicate staleness. • When conflicts cannot be resolved automatically, both copies of data are sent to the client. • Conflicting data being sent to the client can occur in the following situation: • 1. Client 1 writes to replica A ‘Adam: {likes: Cheese}’. • 2. Replica A copies data to replica B. • 3. Client 1 updates data on replica A to ‘Adam: {likes: Cheese, hates: sunlight}’. At this point, replica A doesn’t have enough time to copy the latest data to replica B Versioning data 18
  • 19. • 4. Client 2 updates data on replica B to ‘Adam: {likes: Dogs, hates: kangaroos}’. • At this point, replica A and replica B are in conflict and the database cluster cannot automatically resolve the differences. An alternative mechanism is to use time stamps and trust them to indicate the latest data In such a situation, it’s common sense for the application to check that the time stamps read the latest value before updating the value. They are checking for the check and set mechanism, which basically means ‘If the latest version is still version 2, then save my version 3’. This mechanism is sometimes referred to as read match update (RMU) or read match write (RMW). This mechanism is the default mechanism employed by Oracle NoSQL, Redis, Riak, and Voldemort. Versioning data 19
  • 20. What can a Key-Value Database be used for? Key-value databases can be applied to many scenarios. For example, key-value stores can be useful for storing things such as the following: General Web/Computers • User profiles • Session information • Article/blog comments • Emails • Status messages Key-Value Based Databases 20
  • 21. E-commerce • Shopping cart contents • Product categories • Product details • Product reviews Networking/Data Maintenance • Telecom directories • Internet Protocol (IP) forwarding tables • Data deduplication • Key-value databases can even store whole webpages, by using the URL as the key and the web page as the value. Key-Value Based Databases 21
  • 22. clones which feature eventual consistency. Use Cases • Complex transactions because you cannot afford to lose data or if you would like a simple transaction programming model, then look at a relational or grid database. • Example: An inventory system that might want full acid. I was very unhappy, when I bought a product and they said later they were out of stock. I did not want a compensated transaction. I wanted my item! • To scale, then nosql or sql can work. Look for systems that support scale-out, partitioning, live addition and removal of machines, load balancing, automatic sharding and rebalancing, and fault tolerance. • To always be able to write to a database because, you need high availability then look at bigtable Key-Value Based Databases 39
  • 23. • To handle lots of small continuous reads and writes, that may be volatile, then look at document or key-value or databases offering fast in-memory access.Also consider SSD. • To implement social network operations, then you first may want a graph database or second, a database like riak that supports relationships.An in-memory relational database, with simple SQL joins might suffice for small data sets. Redis' set and list operations could work too. Key-Value Based Databases 23
  • 24. 1. Define Key Value and write a note on Key Based Database. 2. Explain the essential features in NoSQL. 3. Describe Partitioning and Scaleup. 4. How to construct KEY and Store Key Value. 5. Explain Hash Functions. 6. Explain the concept of Store in Data values Assignment General Instructions: Please answer the below set of questions. i. The answers should be clear, legible and well presented. ii. Illustrate your answers with suitable examples wherever necessary. iii. Please provide sources (if any) for data, images, facts, etc. Key-Value Based Databases 66
  • 25. Assignment (Cont…) 7. Does NoSQL Database Interact With Oracle Database? 8. When should I use a NoSQL database instead of a relational database? 9. Could you explain the transaction support by using BASE in NoSQL systems? 10. What is the difference between NoSQL and RDBMS? 11. Tell me the challenges of using NoSQL? 12. Difference with NOSQLVS Relational Key-Value Based Databases 25