...

/

Design the Data Model

Design the Data Model

Learn how to design the data model.

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
bad_guesses Number of incorrect guesses so far

These fields contain enough ...

Access this course and 1400+ top-rated courses and projects.