HW 2 – Key-value data stores. Redis

(5 points)

  1. Design the data structures based on the analytical tasks (see HW 1) that are intended to be solved with Redis.
    • The structures must be designed so that the target queries are feasible.
    • Use native Redis data types (HASH/SET/ZSET/STREAM; BITMAP/HLL if needed). Avoid storing everything as plain strings/JSON.
  2. Insert the data into Redis from the dataset produced in HW 0 (CSV/JSON).
    • Select and import only the subset/fields strictly required to execute your Redis tasks (do not import unnecessary data).
    • Document the selection/transformation rules (filters, projections, denormalization) so the same subset can be reproduced.
    • The import script must be idempotent: repeated runs must not create duplicates.
  3. Implement and run the queries (see HW 1).
  4. Prepare a report and include:
    • the text from HW 0 and HW 1 (edited if necessary);
    • the structure-creation commands with explanations of why these structures were chosen;
    • the data import code;
    • the queries used to solve the analytical tasks. For each task, provide:
      • the task number (as in the HW 1);
      • the verbal description of the task;
      • the command(s) with a short explanation;
      • a screenshot of the query result.

Note. If some analytical tasks turn out to be infeasible under Redis’ data model or performance constraints, replace them with other meaningful tasks and propagate the corresponding changes to the earlier work (HW 0/HW 1).

Submit to the BRUTE system:

Submit a hw2_redis.txt file containing Redis commands with short comments to the NoSQL server nosql.felk.cvut.cz.