Design the Data Model
Explore how to design a data model that supports your web application's API by organizing tables and fields efficiently. Understand minimal and extended models, storage needs, and how to manage user and game data effectively for scalable full stack development.
The data model follows the API design. A good place to start is with one table per resource. In this case, we would have a table that lists the collection of games.
Games data model
Each game would also have its own properties to capture the game state. This might all fit into one table, called games, that has the following fields:
| Field Name | Description |
|---|---|
game_id |
A unique, non-guessable, ID for each game |
user_name |
The name of the user as submitted |
language |
The language that the game is using |
secret_word |
The secret word the user is trying to guess |
guessed |
Letters guessed so far by the user |
usage |
Usage example for the secret word |
reveal_word |
Blanks and revealed letters so far |