SlideShare a Scribd company logo
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

More Related Content

PPTX
Introduction to Redis Data Structures: Sorted Sets
PPTX
Introduction to Redis Data Structures: Hashes
PPTX
ORCID and RDM
PPTX
ORCID at Crossref LIVE Indonesia
PPTX
Data science - big data hadoop course
PDF
ORCID for DSpace
ODP
Chlorine
PPTX
Tree in Discrete structure
Introduction to Redis Data Structures: Sorted Sets
Introduction to Redis Data Structures: Hashes
ORCID and RDM
ORCID at Crossref LIVE Indonesia
Data science - big data hadoop course
ORCID for DSpace
Chlorine
Tree in Discrete structure

What's hot (20)

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

Viewers also liked (7)

PDF
Redis for search - Dvir Volk, Redis Labs
PDF
Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...
PDF
Cloud Connect 2013- Lock Stock and x Smoking EC2's
PDF
Aws 201:Advanced Breakout Track on HA and DR
PDF
The art of infrastructure elasticity
PDF
Auto scaling using Amazon Web Services ( AWS )
PDF
Architecting an Highly Available and Scalable WordPress Site in AWS
Redis for search - Dvir Volk, Redis Labs
Cloud Developer Conference May 2011 SiliconIndia : Design for Failure - High ...
Cloud Connect 2013- Lock Stock and x Smoking EC2's
Aws 201:Advanced Breakout Track on HA and DR
The art of infrastructure elasticity
Auto scaling using Amazon Web Services ( AWS )
Architecting an Highly Available and Scalable WordPress Site in AWS
Ad

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

PPTX
Introduction to Redis Data Structures
PDF
Use Redis in Odd and Unusual Ways
PPTX
Redis Functions, Data Structures for Web Scale Apps
PPTX
2_Redis.pptx very useful for begginers yes
PDF
Redis — The AK-47 of Post-relational Databases
PDF
Redis basics
ODP
Redis overview
PPTX
Redis data structure and Performance Optimization
PDF
An Introduction to Redis for Developers.pdf
PPTX
PPTX
Redis/Lessons learned
PPTX
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
PDF
An Introduction to Redis for .NET Developers.pdf
PPTX
Redis. Seattle Data Science and Data Engineering Meetup
PPTX
05 integrate redis
PPT
Introduction to redis
PPTX
10 Ways to Scale with Redis - LA Redis Meetup 2019
PPTX
Redis database
PPTX
REDIS327
PPTX
Redis_Presentation.pptx ppt on redis and
Introduction to Redis Data Structures
Use Redis in Odd and Unusual Ways
Redis Functions, Data Structures for Web Scale Apps
2_Redis.pptx very useful for begginers yes
Redis — The AK-47 of Post-relational Databases
Redis basics
Redis overview
Redis data structure and Performance Optimization
An Introduction to Redis for Developers.pdf
Redis/Lessons learned
10 Ways to Scale Your Website Silicon Valley Code Camp 2019
An Introduction to Redis for .NET Developers.pdf
Redis. Seattle Data Science and Data Engineering Meetup
05 integrate redis
Introduction to redis
10 Ways to Scale with Redis - LA Redis Meetup 2019
Redis database
REDIS327
Redis_Presentation.pptx ppt on redis and

Recently uploaded (20)

PDF
PPT on Performance Review to get promotions
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
additive manufacturing of ss316l using mig welding
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
web development for engineering and engineering
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
Welding lecture in detail for understanding
PDF
Well-logging-methods_new................
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Construction Project Organization Group 2.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPT on Performance Review to get promotions
Automation-in-Manufacturing-Chapter-Introduction.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems
additive manufacturing of ss316l using mig welding
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
web development for engineering and engineering
Model Code of Practice - Construction Work - 21102022 .pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Lecture Notes Electrical Wiring System Components
Welding lecture in detail for understanding
Well-logging-methods_new................
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Construction Project Organization Group 2.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
bas. eng. economics group 4 presentation 1.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

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