Many foreign keys are set up as “null”. Consider making “not null” if they need to always exist – for example, a villager may always need a job_id, even if 0 for unassigned.
Instead of having separate rows for each building cost in the catalog table, consider combining it to create a new column in the buildings table to display the cost, instead of having a separate catalog table
Rename “entitys” table to “entities” for correct spelling
Villagers and biomes are not connected. Consider adding a biome_id to villagers table to be able to track what biome the villager is in
Consider restricting nourishment from 0-100. Restricting the values could make it clearer
Consider renaming primary key, “inventory_pkey” from the buildings table to “buildings_pkey” for clarity
Consider restricting what values can be set for values like quantity, like only positive numbers
Consider adding a status column to villagers table to identify if a villager is alive, dead, or dying (if nourishment is too low or age is too high)
Consider adding a default biome for villagers to prevent incomplete values when creating a villager
Consider making important values such as biome_id in villagers set to “not null”
Consider setting restrictions on job types, so that only valid inputs can be passed
Consider setting default values in buildings, such as 0 for quantity so that you do not end up with null errors
Schema/API Design Comments