From a0c193d2b3a6bb2b8d873a8d469d500811b51f1a Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 28 Sep 2026 12:53:25 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20lesson2.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson2.sql | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lesson2.sql b/lesson2.sql index 691ef42..4b8edd6 100644 --- a/lesson2.sql +++ b/lesson2.sql @@ -1,6 +1,6 @@ Table illustrator { illustrator_id int [pk, increment, unique, note: 'CHECK (illustrator_id > 0)'] - illustrator name text [not null, unique] + illustrator_name text [not null, unique] } Table element_type { @@ -8,7 +8,7 @@ Table element_type { element_type_name text [not null, unique] } -Table card set { +Table card_set { set_id int [pk, increment, unique, note: 'CHECK (set_id > 0)'] set_name text [not null, unique] set_code text [not null, unique] @@ -30,10 +30,11 @@ Table attack { attack_name text [not null] attack_base_damage int [not null, note: 'CHECK (attack_base_damage >= 0)'] attack_damage_modifier text [note: 'CHECK (attack_damage_modifier in ["+", "x"])'] - attack card id int [not null] + attack_card_id int [not null] } -Ref: card.card illustrator_id > illustrator.illustrator id -Ref: card.card_element_type_id > element_type.element type id -Ref: card.card_set_id > card_set.set_id -Ref: attack.attack_card_id > card.card_id \ No newline at end of file +Ref: "card"."card_illustrator_id" ?> "illustrator"."illustrator_id" + +Ref: "card"."card_set_id" ?> "card_set"."set_id" + +Ref: "card"."card_element_type_id" ?> "element_type"."element_type_id" \ No newline at end of file