04 / 20Module 1: A Rell backend with FT4 accounts
Part 1: Database design, operations and queries
This lesson walks you through building the data model for a Tic-Tac-Toe decentralized app (dapp) around three concepts: Users, Games, and Moves. You implement the model in Rell, Chromia's programming language, working with entity attributes, mutability, efficient indexing, and unique constraints. The first section ends with a solid data model ready for your game.
Next, you move on to changing data on the Chromia blockchain platform. You write operations that create users, create games, and record moves, and you apply testing methods that keep your game correct and working as intended.
The third section covers reading game data back from the blockchain with queries. You begin with simple queries that return recent games, then build more involved ones that sort and filter by game status and player moves.
To finish, you test your queries by hand with the Chromia CLI.