SlideShare una empresa de Scribd logo
1 de 9
Sets
Introduction to Redis Data Structures:
What is Redis?
Open Source, NoSQL Database
Used by: Twitter, Pinterest, GitHub
Stores Advanced Data Structures
Client Support: Java, C, Node.js etc
Introduction to Redis Data Structures: Sets
What are Redis Sets?
Unordered collection of Strings
Provides constant time addition, removal and membership checks
Supports reasonably fast union, intersection, subtraction operations between
sets
Does not allow repeated values
Introduction to Redis Data Structures: Sets
Common Use Cases for Sets
Used to track unique items
Can be used to denote as “belongs to” or
similar relationship
Sets can only be used to combine
relationships, i.e.
union/intersection/subtraction of sets
Introduction to Redis Data Structures: Sets
Set Operations in Redis
SADD SMEMBERS
SCARD SMOVES
SDIFF SPOP
SINTER SUNION
The complete list of set related Redis commands can be found here.
Introduction to Redis Data Structures: Sets
Internal Implementation
Redis internally stores Sets as dictionaries
Certain small sets (radix 10 in the range #
of 64 bit signed integers) called IntSets
Searches within the array are performed
through binary search
Introduction to Redis Data Structures: Sets
Redis Sets vs Redis Bitmaps
Sets are easier to manage,
program & debug
Work well for most apps
Small to medium size data
structures
> 232 Bits Domain SizeIntroduction to Redis Data Structures: Sets
Bitmaps are suitable over a large
number of keys
Depends on size & performance
of keys
Summary
The in-memory store will lead to really fast access so that the front-end feels
snappy
Redis set operations are either constant time or linear
Great for creating sets for other things you may wish to expose as filters in your
Visual Profiler like tags, price ranges, etc
Introduction to Redis Data Structures: Sets
Sign Up for a free 30 day Trial
Thanks for reading! Full Article here
Hosting & management for MongoDB® and Redis®. NoSQL management Simplified.
Click here for more information on Redis Hosting

Más contenido relacionado

La actualidad más candente

How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
4Science
 

La actualidad más candente (20)

Indexing, searching, and aggregation with redi search and .net
Indexing, searching, and aggregation with redi search and .netIndexing, searching, and aggregation with redi search and .net
Indexing, searching, and aggregation with redi search and .net
 
What is SEND?
What is SEND?What is SEND?
What is SEND?
 
Built in data structures in python
Built in data structures in pythonBuilt in data structures in python
Built in data structures in python
 
Data storage and indexing
Data storage and indexingData storage and indexing
Data storage and indexing
 
DSpace-CRIS & OpenAIRE
DSpace-CRIS & OpenAIREDSpace-CRIS & OpenAIRE
DSpace-CRIS & OpenAIRE
 
Enhancing Interoperability: The Implementation of OpenAIRE Guidelines and COA...
Enhancing Interoperability: The Implementation of OpenAIRE Guidelines and COA...Enhancing Interoperability: The Implementation of OpenAIRE Guidelines and COA...
Enhancing Interoperability: The Implementation of OpenAIRE Guidelines and COA...
 
Collecting and using funding data in your publications
Collecting and using funding data in your publicationsCollecting and using funding data in your publications
Collecting and using funding data in your publications
 
News about DSpace-CRIS Anwendertreffen 2020
News about DSpace-CRIS Anwendertreffen 2020News about DSpace-CRIS Anwendertreffen 2020
News about DSpace-CRIS Anwendertreffen 2020
 
Extending DSpace 7: DSpace-CRIS and DSpace-GLAM for empowered repositories an...
Extending DSpace 7: DSpace-CRIS and DSpace-GLAM for empowered repositories an...Extending DSpace 7: DSpace-CRIS and DSpace-GLAM for empowered repositories an...
Extending DSpace 7: DSpace-CRIS and DSpace-GLAM for empowered repositories an...
 
DSpace-CRIS 7: What is Coming? OR2020
DSpace-CRIS 7: What is Coming? OR2020DSpace-CRIS 7: What is Coming? OR2020
DSpace-CRIS 7: What is Coming? OR2020
 
ICIC 2014 New Product Introduction Minesoft
ICIC 2014 New Product Introduction MinesoftICIC 2014 New Product Introduction Minesoft
ICIC 2014 New Product Introduction Minesoft
 
NoSQL
NoSQLNoSQL
NoSQL
 
Nosql Introduction, Basics
Nosql Introduction, BasicsNosql Introduction, Basics
Nosql Introduction, Basics
 
How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
How to enhance your DSpace repository: use cases for DSpace-CRIS, DSpace-RDM,...
 
Overview of Oracle Database 18c Express Edition (XE)
Overview of Oracle Database 18c Express Edition (XE)Overview of Oracle Database 18c Express Edition (XE)
Overview of Oracle Database 18c Express Edition (XE)
 
Collecting and analyzing sensor data with hadoop or other no sql databases
Collecting and analyzing sensor data with hadoop or other no sql databasesCollecting and analyzing sensor data with hadoop or other no sql databases
Collecting and analyzing sensor data with hadoop or other no sql databases
 
DSpace-CRIS ORCID Integration
DSpace-CRIS ORCID IntegrationDSpace-CRIS ORCID Integration
DSpace-CRIS ORCID Integration
 
4Science presentes: ORCiD API Tutorial
4Science presentes: ORCiD API Tutorial4Science presentes: ORCiD API Tutorial
4Science presentes: ORCiD API Tutorial
 
Data structures
Data structuresData structures
Data structures
 
The Global reach of Crossref metadata
The Global reach of Crossref metadataThe Global reach of Crossref metadata
The Global reach of Crossref metadata
 

Destacado

Aws 201:Advanced Breakout Track on HA and DR
Aws 201:Advanced Breakout Track on HA and DRAws 201:Advanced Breakout Track on HA and DR
Aws 201:Advanced Breakout Track on HA and DR
Harish Ganesan
 
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish GanesanScale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Amazon Web Services
 

Destacado (8)

Redis for search - Dvir Volk, Redis Labs
Redis for search - Dvir Volk, Redis LabsRedis for search - Dvir Volk, Redis Labs
Redis for search - Dvir Volk, Redis Labs
 
Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...
Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...
Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...
 
Cloud Connect 2013- Lock Stock and x Smoking EC2's
Cloud Connect 2013- Lock Stock and x Smoking EC2'sCloud Connect 2013- Lock Stock and x Smoking EC2's
Cloud Connect 2013- Lock Stock and x Smoking EC2's
 
Aws 201:Advanced Breakout Track on HA and DR
Aws 201:Advanced Breakout Track on HA and DRAws 201:Advanced Breakout Track on HA and DR
Aws 201:Advanced Breakout Track on HA and DR
 
The art of infrastructure elasticity
The art of infrastructure elasticityThe art of infrastructure elasticity
The art of infrastructure elasticity
 
Auto scaling using Amazon Web Services ( AWS )
Auto scaling using Amazon Web Services ( AWS )Auto scaling using Amazon Web Services ( AWS )
Auto scaling using Amazon Web Services ( AWS )
 
Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS Architecting an Highly Available and Scalable WordPress Site in AWS
Architecting an Highly Available and Scalable WordPress Site in AWS
 
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish GanesanScale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
 

Similar a Introduction to Redis Data Structures: Sets

Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...
Dinh Pham
 
quickguide-einnovator-9-redis
quickguide-einnovator-9-redisquickguide-einnovator-9-redis
quickguide-einnovator-9-redis
jorgesimao71
 
REDIculouS: Introduction to Redis
REDIculouS: Introduction to RedisREDIculouS: Introduction to Redis
REDIculouS: Introduction to Redis
pootsbook
 

Similar a Introduction to Redis Data Structures: Sets (20)

2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yes2_Redis.pptx very useful for begginers yes
2_Redis.pptx very useful for begginers yes
 
Redis database
Redis databaseRedis database
Redis database
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Introduction to Redis Data Structures
Introduction to Redis Data Structures Introduction to Redis Data Structures
Introduction to Redis Data Structures
 
NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)NoSQL(NOT ONLY SQL)
NoSQL(NOT ONLY SQL)
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Redis overview
Redis overviewRedis overview
Redis overview
 
Rails meets no sql
Rails meets no sqlRails meets no sql
Rails meets no sql
 
Redis data structure and Performance Optimization
Redis data structure and Performance OptimizationRedis data structure and Performance Optimization
Redis data structure and Performance Optimization
 
Which no sql database
Which no sql databaseWhich no sql database
Which no sql database
 
Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...Beyond relational database - Building high performance websites using Redis a...
Beyond relational database - Building high performance websites using Redis a...
 
Cs437 lecture 14_15
Cs437 lecture 14_15Cs437 lecture 14_15
Cs437 lecture 14_15
 
quickguide-einnovator-9-redis
quickguide-einnovator-9-redisquickguide-einnovator-9-redis
quickguide-einnovator-9-redis
 
IRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description FrameworkIRJET- Data Retrieval using Master Resource Description Framework
IRJET- Data Retrieval using Master Resource Description Framework
 
Datastores
DatastoresDatastores
Datastores
 
Beyond Relational Databases
Beyond Relational DatabasesBeyond Relational Databases
Beyond Relational Databases
 
Introduction of Redis as NoSQL Database
Introduction of Redis as NoSQL DatabaseIntroduction of Redis as NoSQL Database
Introduction of Redis as NoSQL Database
 
REDIculouS: Introduction to Redis
REDIculouS: Introduction to RedisREDIculouS: Introduction to Redis
REDIculouS: Introduction to Redis
 
Redis introduction
Redis introductionRedis introduction
Redis introduction
 
Annotating search results from web databases-IEEE Transaction Paper 2013
Annotating search results from web databases-IEEE Transaction Paper 2013Annotating search results from web databases-IEEE Transaction Paper 2013
Annotating search results from web databases-IEEE Transaction Paper 2013
 

Último

Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

Introduction to Redis Data Structures: Sets

  • 1. Sets Introduction to Redis Data Structures:
  • 2. What is Redis? Open Source, NoSQL Database Used by: Twitter, Pinterest, GitHub Stores Advanced Data Structures Client Support: Java, C, Node.js etc Introduction to Redis Data Structures: Sets
  • 3. What are Redis Sets? Unordered collection of Strings Provides constant time addition, removal and membership checks Supports reasonably fast union, intersection, subtraction operations between sets Does not allow repeated values Introduction to Redis Data Structures: Sets
  • 4. Common Use Cases for Sets Used to track unique items Can be used to denote as “belongs to” or similar relationship Sets can only be used to combine relationships, i.e. union/intersection/subtraction of sets Introduction to Redis Data Structures: Sets
  • 5. Set Operations in Redis SADD SMEMBERS SCARD SMOVES SDIFF SPOP SINTER SUNION The complete list of set related Redis commands can be found here. Introduction to Redis Data Structures: Sets
  • 6. Internal Implementation Redis internally stores Sets as dictionaries Certain small sets (radix 10 in the range # of 64 bit signed integers) called IntSets Searches within the array are performed through binary search Introduction to Redis Data Structures: Sets
  • 7. Redis Sets vs Redis Bitmaps Sets are easier to manage, program & debug Work well for most apps Small to medium size data structures > 232 Bits Domain SizeIntroduction to Redis Data Structures: Sets Bitmaps are suitable over a large number of keys Depends on size & performance of keys
  • 8. Summary The in-memory store will lead to really fast access so that the front-end feels snappy Redis set operations are either constant time or linear Great for creating sets for other things you may wish to expose as filters in your Visual Profiler like tags, price ranges, etc Introduction to Redis Data Structures: Sets
  • 9. Sign Up for a free 30 day Trial Thanks for reading! Full Article here Hosting & management for MongoDB® and Redis®. NoSQL management Simplified. Click here for more information on Redis Hosting