The project consists of a database for RPG tokens (D & D and similar). It looks like this:
Database
tabTables
- character
- system
- raca
- class
- attribute
- character_atribution
Relationships
- CHARACTER = N ======== 1 = SYSTEM
- CHARACTER = N ======== 1 = RACE
- CHARACTER = N ======== 1 = CLASS
- CHARACTER = N ======== N = ATTRIBUTE == CHARACTER_ATRIBUTE
In the "attribute" table there are attributes that can contain texts (ex: Background), numbers (ex: Strength points = 15), texts and numbers (ex: Arc, 2D6 distance damage, 1D6 melee damage) .
How do I create this in the personagem_atributo
table?
I thought of creating a column (attribute) with the name valor
with type varchar
, but this way I get stuck to just type varchar
. How can I assign a type to the value according to the information given ( int
, text
, varchar
)?