From 0c33ec27bc4af3e74c6065b2d04925c0ecf52ee2 Mon Sep 17 00:00:00 2001 From: Arf <10+arf@noreply.localhost> Date: Mon, 7 Sep 2026 10:53:19 +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=20works/lab-01/work2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/work2 | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/works/lab-01/work2 b/works/lab-01/work2 index fbdeb64..15a7b9e 100644 --- a/works/lab-01/work2 +++ b/works/lab-01/work2 @@ -1,5 +1,6 @@ Table card { - + set_id int [pk, not null] + element_id int [primary key] card_id int [primary key] card_name text [NOT NULL] card_stage text [NOT NULL] @@ -13,11 +14,13 @@ Table card { illustrator_id int [primary key] } Table card_set { + set_id int [pk, not null] card_code_set int [ primary key] card_set_name text [NOT NULL] card_date date } Table attack { + element_id int [primary key] attack_id int [primary key] attack_name text [NOT NULL] damage int [NOT NULL, check:`damage>0`] @@ -33,3 +36,38 @@ Table illustrator { illustrator_name text [NOT NULL] } +Table card_attack { + attack_id int [NOT NULL] + card_id int [NOT NULL] + card_attack_id int [pk] + +} +Table element_attack { + attack_id int [NOT NULL] + element_id int [NOT NULL] + cost int [NOT NULL] + element_attack_id int [pk] + +} + + +Ref: "card"."illustrator_id" -? "illustrator"."illustrator_id" + +Ref: "element_type"."element_id" - "attack"."element_id" + +Ref: "element_type"."element_id" - "card"."element_id" + +Ref: "card_attack"."attack_id" > "attack"."attack_id" + + +Ref: "card_attack"."card_id" ?> "card"."card_id" + + + +Ref: "element_attack"."attack_id" > "attack"."attack_id" + + + +Ref: "element_attack"."element_id" ?> "element_type"."element_id" + +Ref: "card"."set_id" - "card_set"."set_id" \ No newline at end of file