From 8896d6dedc0706d3c9d6cbd4ae813aa10ae43477 Mon Sep 17 00:00:00 2001 From: andrix7777777 Date: Mon, 21 Sep 2026 09:19:06 +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/lab-01/dbdiagram=5Flesson1.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-01/dbdiagram_lesson1.txt | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 works/lab-01/dbdiagram_lesson1.txt diff --git a/works/lab-01/dbdiagram_lesson1.txt b/works/lab-01/dbdiagram_lesson1.txt new file mode 100644 index 0000000..fa0998d --- /dev/null +++ b/works/lab-01/dbdiagram_lesson1.txt @@ -0,0 +1,62 @@ +Table card { + card_id int [pk] + card_pokemon_id int + card_description text + + // данные, не влияющие на игру + card_number_in_set text // пример: "42/146" + card_rarity text // пример: "Common", "Ultra Rare" + card_set_id int [not null] + card_illustrator_id int [not null] + card_height_m numeric + card_weight_kg numeric + + // игровые данные + card_hp int + card_attack_id int + card_retreat_cost int +} + +Table card_set { + card_set_id int [pk] + card_set_name text + card_set_year int // именно год же, не дата? год можно и числом записать... +} + +Table attack { + attack_id int [pk] + attack_name text + attack_base_damage text // "20+", "30x" +} + +Table element_type { + element_type_id int [pk] + element_type_name text +} + +Table card_attack { + card_attack_id int [pk] + card_id int [not null] + attack_id int [not null] +} + +Table attack_energy_cost { + attack_energy_cost_id int [pk] + attack_id int [not null] + element_type_id int [not null] + energy_quantity int // комбинированная стоимость атак / атрибут количества требуемой энергии +} + +Table illustrator { + illustrator_id int [pk] + illustrator_name text +} + +Ref: card.card_illustrator_id > illustrator.illustrator_id +Ref: card.card_set_id > card_set.card_set_id + +Ref: card_attack.card_id > card.card_id +Ref: card_attack.attack_id > attack.attack_id + +Ref: attack_energy_cost.attack_id > attack.attack_id +Ref: attack_energy_cost.element_type_id > element_type.element_type_id \ No newline at end of file