Get the App
SLTechnology News&Howtos  ›  Database  › 

Application scenarios corresponding to various data types of reds

Shulou Source: shulou.com Published: 2022-06-01 11:17:46 10月03日 Update

Application scenarios of 1.String type

String is the most commonly used data type, ordinary key/value storage.

Application scenarios of 2.list type

It is more suitable for list storage and the order is relatively fixed, such as: province, city list brand, manufacturer, car system, model and so on.

Application scenarios of 3.set type

The function provided by Set is similar to that of list. When you need to store a list of data and do not want to duplicate data, you can choose set.

Application scenarios of 4.zset (sorted set) type

The usage scenario of zset is similar to that of set, except that set is not automatically ordered, while zset can use the

The user provides an additional score parameter to sort the members, and the insertion order is ordered.

, that is, automatic sorting. When you need an ordered and non-repetitive list of collections, you can choose

Choose zset data structure. For example: a list of popular cars sorted by PV, a news list sorted by time

Application scenarios of 5.hash type

Storage similar to table records

Storage of data required for page view

Tags: Scene type data application storage sorting order model car system ordinary hot topic priority function manufacturer parameter can pass brand city commonly used Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info vpn Apple Huawei