Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Spring Data

You're reading from  Spring Data

Product type Book
Published in Nov 2012
Publisher Packt
ISBN-13 9781849519045
Pages 160 pages
Edition 1st Edition
Languages
Author (1):
Petri Kainulainen Petri Kainulainen
Profile icon Petri Kainulainen
Toc

Designing a Redis data model


The most important rules of designing a Redis data model are: Redis does not support ad hoc queries and it does not support relations in the same way than relational databases. Thus, designing a Redis data model is a total different ballgame than designing the data model of a relational database. The basic guidelines of a Redis data model design are given as follows:

  • Instead of simply modeling the information stored in our data model, we have to also think how we want to search information from it. This often leads to a situation where we have to duplicate data in order to fulfill the requirements given to us. Don't be afraid to do this.

  • We should not concentrate on normalizing our data model. Instead, we should combine the data that we need to handle as an unit into an aggregate.

  • Since Redis does not support relations, we have to design and implement these relations by using the supported data structures. This means that we have to maintain these relations manually...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime}