What would a schema look like for setting up tables for RPG character creation restrictions? I'm trying to figure out how to layout tables for an RPG database where information such as character race, class, and deity have restrictions on what combination is permissible.
For example:
Race
-----------
id | name
1  | Human
2  | Elf
3  | Dwarf

Class
-----------
id | name
1  | Warrior
2  | Wizard
3  | Thief

Deity
-----------
id | name
1  | GodA
2  | GodB
3  | GodC

I want to limit certain combinations such as only humans and elves can be wizards, only humans and dwarves can be warriors, but all three can be thieves. But I also want to restrict the deity to certain race/class combinations. For example, humans can only worship GodA or GodB but NOT GodC; choosing to be a thief means you can't worship GodB so you end up only being able to choose GodA, etc.
What kind of schema can be used to map this information, is there a name for this type of relational data, and what would a query look like to retrieve the final mapping?
There's not a specific schema name for what you're trying to achieve but there are two ways you can go about achieving it depending on which database management system you end up using.

You can create one linking table for each combination of values. Every legal combination will get it's own row, and have a foreign key field of the id of each base table that it's linking together. This is generally known as a dimension combination table.

You can alternatively look into having a more denormalized table that stores each instance of the character that's been selected, with foreign key refencing fields to each id of the base tables, with a composite constraint on what value combinations can be entered in each field. (The availability of this kind of complex constraint feature will be dependent on the database system you use.)