From 672a5f4de422748b00b69f10b2dc56bccbed58f3 Mon Sep 17 00:00:00 2001 From: vlad1winstavki_1 Date: Thu, 17 Sep 2026 06:35:31 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20works/sqllab=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/sqllab 1 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 works/sqllab 1 diff --git a/works/sqllab 1 b/works/sqllab 1 new file mode 100644 index 0000000..4e497a4 --- /dev/null +++ b/works/sqllab 1 @@ -0,0 +1,60 @@ +Table illustrator { + illustrator_id int [primary key, not null] + illustrator_name text [not null] +} + +Table card { + card_id int [primary key, not null] + card_name text [not null] + card_stage text + card_hp int [check: `card_hp > 0`] + card_number_in_set text [not null] + card_category text [not null] + card_height_m numeric [check: `height_m >= 0.1`] + card_weight_kg numeric [check: `weight_m >= 0.1`] + card_retreat_cost int [not null] + card_release_date date [check: `card_release_date > 1996-10-20`] + illustrator_id int + card_set_id int +} + +Table card_set { + card_set_id int [primary key, not null] + card_set_name text [not null] + card_set_quanity int [not null] + card_set_release_date date [check: `card_release_date > 1996-10-20`] +} + +Table attack { + attack_id int [primary key, not null] + attack_base_damage int + attack_damage_modifier text + attack_text_effect text +} + +Table card_attack { + card_attack_id int [primary key, not null] + card_attack_name text [not null] + card_id int [not null] + attack_id int [not null] +} + +Table element_type { + element_type_id int [primary key, not null] + element_type_name text [not null] +} + +Table attack_energy_cost { + attack_energy_cost_id int [primary key, not null] + attack_energy_cost_name text [not null] + attack_id int [not null] + element_type_id int [not null] + energy_quantity int [not null, check: `energy_quantity > 0`] +} + +Ref: illustrator.illustrator_id > card.illustrator_id +Ref: card.card_set_id > card_set.card_set_id +Ref: attack.attack_id > element_type.element_type_id +Ref: element_type.element_type_id > attack_energy_cost.attack_energy_cost_id +Ref: card_attack.card_id > card.card_id +Ref: card_attack.attack_id > attack.attack_id