From 98a052f18e8a0a14352ca41194e2b4e936a80449 Mon Sep 17 00:00:00 2001 From: Fan Date: Mon, 7 Sep 2026 11:13:07 +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/sql-lab1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/sql-lab1 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 works/sql-lab1 diff --git a/works/sql-lab1 b/works/sql-lab1 new file mode 100644 index 0000000..401953d --- /dev/null +++ b/works/sql-lab1 @@ -0,0 +1,46 @@ +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_rarity text + card_number text [not null] + card_artist text + card_release_date date + 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] +} +Table card_set { + card_set_id int [primary key, not null] + card_set_releaced_date date + card_set_name text [not null, unique] + card_set_code int [not null, unique] + card_set_total_cards int [not null, unique] +} + +Table attack { + attack_id int [primary key, not null] + attack_name text [not null] + attack_base_damage text [null, check: `attack_base_damege >= 0`] + attack_effect text +} + +Table card_attack { + card_attack_id int [primary key] + card_id int [not null, ref: > card.card_id] + attack_id int [not null, ref: > attack.attack_id] + card_attack_position int [null, check: `card_attack_position > 0`] +} + +Table energy_type { + energy_quantily text [null] + element_type_id int [primary key, not null] + element_type_name text [not null, unique] +} +Table illustrator { + illustrator_name text + illustrator_id int [primary key, not null] + illustrator_nationality text [null] +} \ No newline at end of file