generated from admin/template
Обновить works/sql-lab1
This commit is contained in:
+43
-5
@@ -1,9 +1,6 @@
|
||||
Table card {
|
||||
card_id int [primary key,not null]
|
||||
card_name text [not null]
|
||||
card_hp int [not null, check: `card_hp > 0`]
|
||||
card_hieght numeric
|
||||
card_weight numeric
|
||||
card_name text [not null]
|
||||
card_rarity text
|
||||
card_number text [not null]
|
||||
card_artist text
|
||||
@@ -11,7 +8,28 @@ Table card {
|
||||
card_image_url text
|
||||
card_set_id int [not null, ref: > card_set.card_set_id]
|
||||
illustrator_id int [not null, ref: > illustrator.illustrator_id]
|
||||
card_pokemon_id int [not null, ref: - card_pokemon.card_pokemon_id]
|
||||
attack_energy_cost_id int [not null, ref: > attack_energy_cost.attack_energy_cost_id]
|
||||
energy_type_id int [not null, ref: > energy_type.element_type_id]
|
||||
coach_id int [not null, ref: > coach.coach_id]
|
||||
}
|
||||
|
||||
Table card_pokemon {
|
||||
card_pokemon_id int [primary key, not null]
|
||||
card_pokemon_hp int [not null, check: `card_hp > 0`]
|
||||
card_pokemon_hieght numeric
|
||||
card_pokemon_weight numeric
|
||||
card_pokemon_name text [not null]
|
||||
card_card_id int [primary key, not null]
|
||||
card_pokemon_stage text [not null]
|
||||
card_pokemon_evloves_from text
|
||||
card_pokemon_category text
|
||||
entrgy_type_id int [not null, ref: > energy_type.energy_type_id]
|
||||
attack_energy_cost_id int [not null, ref: > attack_energy_cost.attack_energy_cost_id]
|
||||
attack_id int [not null, ref: > attack.attack_id]
|
||||
coach_id int [not null, ref: > coach.coach_id]
|
||||
}
|
||||
|
||||
Table card_set {
|
||||
card_set_id int [primary key, not null]
|
||||
card_set_releaced_date date
|
||||
@@ -25,6 +43,7 @@ Table attack {
|
||||
attack_name text [not null]
|
||||
attack_base_damage text [null, check: `attack_base_damege >= 0`]
|
||||
attack_effect text
|
||||
attack_retreat_cost int [null, check: `attack_retreat_cost >= 0`]
|
||||
}
|
||||
|
||||
Table card_attack {
|
||||
@@ -38,9 +57,28 @@ Table energy_type {
|
||||
energy_quantily text [null]
|
||||
element_type_id int [primary key, not null]
|
||||
element_type_name text [not null, unique]
|
||||
energy_type_id int [not null, primary key]
|
||||
}
|
||||
|
||||
Table illustrator {
|
||||
illustrator_name text
|
||||
illustrator_name text [not null, unique]
|
||||
illustrator_id int [primary key, not null]
|
||||
illustrator_nationality text [null]
|
||||
illustrator_natinality twxt [null]
|
||||
}
|
||||
|
||||
Table attack_energy_cost {
|
||||
attack_energy_cost_id int [primary key]
|
||||
attack_id int [not null]
|
||||
element_type_id int [not null]
|
||||
}
|
||||
Table coach {
|
||||
coach_id int [primary key, not null]
|
||||
coach_name text [not null, unique]
|
||||
coach_type int [not null]
|
||||
coach_releaced_date date [not null]
|
||||
coach_skill text [not null]
|
||||
coach_description text [not null]
|
||||
coach_rarity text [not null]
|
||||
coach_image_url text [not null]
|
||||
}
|
||||
Reference in New Issue
Block a user