Quando usare i database key-value

Concetti NoSQL

Miriam Antona

Software engineer

Casi adatti

  • Sessioni utente
    • key: ID sessione
    • value: informazioni di sessione

Immagine di un utente

Concetti NoSQL

Casi adatti

  • Profili e preferenze utente
    • key: ID utente
    • value: profilo/preferenze utente

Immagine di un utente con le sue preferenze

Concetti NoSQL

Casi adatti

  • Carrelli acquisti
    • key: ID utente
    • value: informazioni sul carrello

Immagine di un carrello

Concetti NoSQL

Casi adatti

  • Raccomandazioni in tempo reale

Immagine con il testo "You may also like" e tre magliette di colori diversi.

Concetti NoSQL

Casi adatti

  • Pubblicità

Immagine di uno schermo con un annuncio pubblicitario.

Concetti NoSQL

Casi adatti

  • Archivia le informazioni come value in un unico oggetto
  • I dati si salvano con un'operazione
      SET user:457:preferences {"language":"en_US","color":"green","timezone":"GTM-4"}
    
  • I dati si recuperano con un'operazione
      GET user:457:preferences
    
  • Veloce
Concetti NoSQL

Casi non adatti

  • Cercare dati in base al loro valore
Concetti NoSQL

Casi non adatti

  • Cercare dati in base al loro valore
key value
user:1:address {"street" : "123 Sesame Street" , "city" : "New York City"}
user:2:address {"street" : "742 Evergreen Terrace" , "city" : "Springfield"}
user:3:address {"street" : "221b Baker Street" , "city" : "London"}
user:4:address {"street" : "4 Privet Drive" , "city" : "Little Whinging"}
... ...

 

  • Dati correlati
Concetti NoSQL

Esercitiamoci!

Concetti NoSQL

Preparing Video For Download...