From 5238b5a3aa292a66e396a8e44abd8341769f920e Mon Sep 17 00:00:00 2001 From: vlad1winstavki_1 Date: Mon, 7 Sep 2026 11:13:05 +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/sqllab1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/sqllab1 | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 works/sqllab1 diff --git a/works/sqllab1 b/works/sqllab1 new file mode 100644 index 0000000..c5d72c8 --- /dev/null +++ b/works/sqllab1 @@ -0,0 +1,55 @@ +table card { + card_name text [not null] + card_height numeric [not null, check: `card_height > 0`] + card_weight numeric [not null, check: `card_weight > 0`] + card_hp int [not null, check: `card_hp > 0`] + card_rarity text [null] + card_id int [pk, increment] + card_stage int [null] + card_attack_name text [null] + +} + +table card_set { + set_name text [not null, unique] + set_relaced_date date [null] + set_id int [pk, increment] + set_code int [not null, unique] + set_total_cards int [null, check: `set_total_cards > 0` ] + +} + +table attack { + attack_name text [not null] + attack_base_damage int [null, check: `attack_base_damge >= 0`] + attack_id int [pk, increment] + attack_decription text [null] + attack_retreat_cost int [null, check: `attack_retreat_cost >=0`] +} + +table element_type { + element_type_name text [not null, unique] + element_type_id int [pk, increment] + element_type_symbol text [null] +} + +table illustrtor { + illustrator_name text [not null, unique] + illustrator_id int [pk, increment] + illustrator_nationality text [null] + illustrator_website text [null] +} + +table card_attack { + card_id int [not null, ref: > card.card_id ] + card_attack_id int [pk, increment] + attack_id int [not null, ref: > attack.attack_id] + card_attack_position int [not null, check: `card_attack_position > 0`] +} + +table attack_energy_cost { + attack_energy_cost_id int [pk, increment] + attack_id int [not null, ref: > attack.attack_id] + element_type_id int [not null, ref: >element_type.element_type_id] + energy_quality int [not null, check: `energy_quality > 0`] +} \ No newline at end of file