From 9f8d761a58d16bf8aee6d1ccee600f8cb85408cc Mon Sep 17 00:00:00 2001 From: BimBom Date: Mon, 7 Sep 2026 11:19:06 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cod1.txt | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 cod1.txt diff --git a/cod1.txt b/cod1.txt new file mode 100644 index 0000000..3a3b42f --- /dev/null +++ b/cod1.txt @@ -0,0 +1,76 @@ +Table pokemon_card { + pokemon_card_id int [primary key, not null] + pokemon_card_name text [not null] + pokemon_card_hp int [not null, check: `card_hp > 0`] + pokemon_card_stage text [not null] + pokemon_card_number_in_pokedex int [not null] + pokemon_card_release_date date [not null] + pokemon_card_height_m numeruc [not null, check: `card_height_m > 0`] + pokemon_card_weight_kg numeric [not null, check: `card_weight_kg > 0`] + pokemon_card_number_in_set text [not null, unique] + pokemon_card_illustrator_id int + pokemon_card_element_id int [not null] + pokemon_card_attack_id int [not null] + pokemon_card_set_id int [not null] + pokemon_card_attack_energy_cost_id int +} + +Table card_set { + set_id int [primary key, not null] + set_name text [not null] + set_max_card int [not null] + set_release_date date [not null] +} + +Table attack { + attack_id int [primary key, not null] + attack_name text [not null] + attack_base_damage int [not null] + attack_modifer text [not null] + attack_effect text [not null] +} + +Table pokemon_card_attack { + pokemon_card_attack_id int [primary key, not null] + pokemon_card_id int + attack_id int +} + +Table attack_element_cost { + attack_energy_cost_id int [primary key, not null] + attack_id int + element_type_id int + energy_quanity int +} + + +Table element_type { + element_type_id int [primary key, not null] + element_type text [not null] +} + +Table illustrator { + illustrator_id int [primary key, not null] + illustratror_name text +} + +Table energy_card { + energy_card_id int [primary key, not null] + energy_element_type int + energy_card_release_date date + energy_card_number_in_set text [not null, unique] + energy_card_set_id int + energy_card_illustrator_id int +} + +Ref pokemon_card_illustrator_id: pokemon_card.pokemon_card_illustrator_id > illustrator.illustrator_id +Ref pokemon_card_element_id: pokemon_card.pokemon_card_element_id > element_type.element_type_id +Ref pokemon_card_attack_id: pokemon_card.pokemon_card_attack_id > pokemon_card_attack.pokemon_card_attack_id +Ref pokemon_card_attack_id: attack.attack_id < pokemon_card_attack.pokemon_card_attack_id +Ref pokemon_card_set_id: pokemon_card.pokemon_card_set_id > card_set.set_id +Ref attack_energy_cost: element_type.element_type_id < attack_element_cost.element_type_id +Ref attack_energy_cost: attack.attack_id < attack_element_cost.attack_id +Ref pokemon_card_attack_energy_cost: attack_element_cost.attack_energy_cost_id < pokemon_card.pokemon_card_attack_energy_cost_id +Ref energy_card_illustrator_id: energy_card.energy_card_illustrator_id > illustrator.illustrator_id +Ref energy_card_set_id: energy_card.energy_card_set_id > card_set.set_id +Ref energy_element_type: energy_card.energy_element_type > element_type.element_type_id \ No newline at end of file