Загрузить файлы в «/»
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
Table pokemon_card {
|
||||||
|
pokemon_card_id int [primary key, not null]
|
||||||
|
pokemon_card_name text [not null]
|
||||||
|
pokemon_card_hp int [not null, check: `card_hp > 0`]
|
||||||
|
pokemon_card_stage text [not null]
|
||||||
|
pokemon_card_number_in_pokedex int [not null]
|
||||||
|
pokemon_card_release_date date [not null]
|
||||||
|
pokemon_card_height_m numeruc [not null, check: `card_height_m > 0`]
|
||||||
|
pokemon_card_weight_kg numeric [not null, check: `card_weight_kg > 0`]
|
||||||
|
pokemon_card_number_in_set text [not null, unique]
|
||||||
|
pokemon_card_illustrator_id int
|
||||||
|
pokemon_card_element_id int [not null]
|
||||||
|
pokemon_card_attack_id int [not null]
|
||||||
|
pokemon_card_set_id int [not null]
|
||||||
|
pokemon_card_attack_energy_cost_id int
|
||||||
|
}
|
||||||
|
|
||||||
|
Table card_set {
|
||||||
|
set_id int [primary key, not null]
|
||||||
|
set_name text [not null]
|
||||||
|
set_max_card int [not null]
|
||||||
|
set_release_date date [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table attack {
|
||||||
|
attack_id int [primary key, not null]
|
||||||
|
attack_name text [not null]
|
||||||
|
attack_base_damage int [not null]
|
||||||
|
attack_modifer text [not null]
|
||||||
|
attack_effect text [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table pokemon_card_attack {
|
||||||
|
pokemon_card_attack_id int [primary key, not null]
|
||||||
|
pokemon_card_id int
|
||||||
|
attack_id int
|
||||||
|
}
|
||||||
|
|
||||||
|
Table attack_element_cost {
|
||||||
|
attack_energy_cost_id int [primary key, not null]
|
||||||
|
attack_id int
|
||||||
|
element_type_id int
|
||||||
|
energy_quanity int
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Table element_type {
|
||||||
|
element_type_id int [primary key, not null]
|
||||||
|
element_type text [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table illustrator {
|
||||||
|
illustrator_id int [primary key, not null]
|
||||||
|
illustratror_name text
|
||||||
|
}
|
||||||
|
|
||||||
|
Table energy_card {
|
||||||
|
energy_card_id int [primary key, not null]
|
||||||
|
energy_element_type int
|
||||||
|
energy_card_release_date date
|
||||||
|
energy_card_number_in_set text [not null, unique]
|
||||||
|
energy_card_set_id int
|
||||||
|
energy_card_illustrator_id int
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref pokemon_card_illustrator_id: pokemon_card.pokemon_card_illustrator_id > illustrator.illustrator_id
|
||||||
|
Ref pokemon_card_element_id: pokemon_card.pokemon_card_element_id > element_type.element_type_id
|
||||||
|
Ref pokemon_card_attack_id: pokemon_card.pokemon_card_attack_id > pokemon_card_attack.pokemon_card_attack_id
|
||||||
|
Ref pokemon_card_attack_id: attack.attack_id < pokemon_card_attack.pokemon_card_attack_id
|
||||||
|
Ref pokemon_card_set_id: pokemon_card.pokemon_card_set_id > card_set.set_id
|
||||||
|
Ref attack_energy_cost: element_type.element_type_id < attack_element_cost.element_type_id
|
||||||
|
Ref attack_energy_cost: attack.attack_id < attack_element_cost.attack_id
|
||||||
|
Ref pokemon_card_attack_energy_cost: attack_element_cost.attack_energy_cost_id < pokemon_card.pokemon_card_attack_energy_cost_id
|
||||||
|
Ref energy_card_illustrator_id: energy_card.energy_card_illustrator_id > illustrator.illustrator_id
|
||||||
|
Ref energy_card_set_id: energy_card.energy_card_set_id > card_set.set_id
|
||||||
|
Ref energy_element_type: energy_card.energy_element_type > element_type.element_type_id
|
||||||
Reference in New Issue
Block a user