diff --git a/works/lab-01/lesson1_result_07.09_2nd_class.md b/works/lab-01/lesson1_result_07.09_2nd_class.md index 214f1d2..7f09837 100644 --- a/works/lab-01/lesson1_result_07.09_2nd_class.md +++ b/works/lab-01/lesson1_result_07.09_2nd_class.md @@ -11,7 +11,6 @@ Table card { card_retreat_cost integer [not null, check: `card_retreat_cost >= 0`] card_release_date date [not null] card_set_id integer [not null] - attack_id integer [not null] element_type_id integer [not null] illustrator_id integer [not null] } @@ -46,6 +45,10 @@ Table attack_card { attack_card_id int [pk, not null, unique] card_id int [not null] attack_id int [not null] + + indexes { + (card_id, attack_id) [unique] + } } Table attack_card_pricing { @@ -53,14 +56,17 @@ Table attack_card_pricing { attack_card_pricing_cost int [not null, check: `attack_card_pricing_cost >= 0`] attack_card_id int [not null] element_type_id int [not null] + + indexes { + (attack_card_id, element_type_id) [unique] + } } Ref: card_set.card_set_id < card.card_set_id -Ref: attack.attack_id < card.attack_id Ref: element_type.element_type_id < card.element_type_id Ref: illustrator.illustrator_id < card.illustrator_id -Ref: card.card_id > attack_card.card_id +Ref: card.card_id < attack_card.card_id Ref: attack.attack_id > attack_card.attack_id Ref: attack_card_pricing.attack_card_id < attack_card.attack_card_id Ref: element_type.element_type_id < attack_card_pricing.element_type_id \ No newline at end of file