From 24381f0eb98292cbefd8e6cf08ac89cd201ad1e1 Mon Sep 17 00:00:00 2001 From: nillkiggers <6996@gmail.com> Date: Mon, 7 Sep 2026 10:11:08 +0000 Subject: [PATCH] mysql lab done --- works/my-sql-lab-01/result.dbml | 55 +++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 works/my-sql-lab-01/result.dbml diff --git a/works/my-sql-lab-01/result.dbml b/works/my-sql-lab-01/result.dbml new file mode 100644 index 0000000..eb471f8 --- /dev/null +++ b/works/my-sql-lab-01/result.dbml @@ -0,0 +1,55 @@ +Table illustrator { + illustrator_id int [pk, increment] + illustrator_name text [not null, unique] + illustrator_nationality text [null] + illustrator_website text [null] +} + +Table card_set { + card_set_id int [pk, increment] + card_set_name text [not null, unique] + card_set_code text [not null, unique] + card_set_release_date date [null] + card_set_total_cards int [null, check: `card_set_total_cards > 0`] +} + +Table element_type { + element_type_id int [pk, increment] + element_type_name text [not null, unique] + element_type_symbol text [null] +} + +Table attack { + attack_id int [pk, increment] + attack_name text [not null] + attack_description text [null] + attack_base_damage int [null, check: `attack_base_damage >= 0`] + attack_retreat_cost int [null, check: `attack_retreat_cost >= 0`] +} + +Table card { + card_id int [pk, increment] + card_name text [not null] + card_hp int [not null, check: `card_hp > 0`] + card_number text [not null] + card_rarity text [null] + card_artist text [null] + card_release_date date [null] + card_image_url text [null] + illustrator_id int [not null, ref: > illustrator.illustrator_id] + card_set_id int [not null, ref: > card_set.card_set_id] +} + +Table card_attack { + card_attack_id int [pk, increment] + 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 attack_energy_cost { + attack_energy_cost_id int [pk, increment] + attack_id int [not null, ref: > attack.attack_id] + element_type_id int [not null, ref: > element_type.element_type_id] + energy_quantity int [not null, check: `energy_quantity > 0`] +} \ No newline at end of file