Обновить works/laba1bd.md

This commit is contained in:
2026-09-22 13:40:27 +00:00
parent 0b988bc61e
commit ce9e5387bb
+36 -37
View File
@@ -1,39 +1,38 @@
Table illustrator { Table illustrator {<br>
illustrator_id int [pk, increment, unique, note: 'CHECK (illustrator_id > 0)'] illustrator_id int [pk, increment, unique, note: 'CHECK (illustrator_id > 0)']<br>
illustrator_name text [not null, unique] illustrator_name text [not null, unique]<br>
} }
<br>
Table element_type { Table element_type {<br>
element_type_id int [pk, increment, unique, note: 'CHECK (element_type_id > 0)'] element_type_id int [pk, increment, unique, note: 'CHECK (element_type_id > 0)']<br>
element_type_name text [not null, unique] element_type_name text [not null, unique]<br>
} <br>
Table card_set {<br>
Table card_set { set_id int [pk, increment, unique, note: 'CHECK (set_id > 0)']<br>
set_id int [pk, increment, unique, note: 'CHECK (set_id > 0)'] set_name text [not null, unique]<br>
set_name text [not null, unique] set_code text [not null, unique]<br><br>
set_code text [not null, unique] set_total_cards int [not null, note: 'CHECK (set_total_cards > 0)']<br>
set_total_cards int [not null, note: 'CHECK (set_total_cards > 0)'] }<br>
} <br>
Table card { Table card {
card_id int [pk, increment, unique, note: 'CHECK (card_id > 0)'] card_id int [pk, increment, unique, note: 'CHECK (card_id > 0)']<br>
card_name text [not null] card_name text [not null]<br>
card_hp int [not null] card_hp int [not null]<br>
card_number text [not null, note: 'CHECK (card_number > 0)'] card_number text [not null, note: 'CHECK (card_number > 0)']<br><br>
card_illustrator_id int [not null] card_illustrator_id int [not null]<br>
card_element_type_id int [not null] card_element_type_id int [not null]<br>
card_set_id int [not null] card_set_id int [not null]<br>
} }<br>
<br>
Table attack { Table attack {<br>
attack_id int [pk, increment, note: 'CHECK (attack_id > 0)'] attack_id int [pk, increment, note: 'CHECK (attack_id > 0)']<br>
attack_name text [not null] attack_name text [not null]<br>
attack_base_damage int [not null, note: 'CHECK (attack_base_damage >= 0)'] attack_base_damage int [not null, note: 'CHECK (attack_base_damage >= 0)']<br>
attack_damage_modifier text [note: 'CHECK (attack_damage_modifier in ["+", "x"])'] attack_damage_modifier text [note: 'CHECK (attack_damage_modifier in ["+", "x"])']<br>
attack_card_id int [not null] attack_card_id int [not null]<br>
} }<br>
<br>
Ref: card.card_illustrator_id > illustrator.illustrator_id Ref: card.card_illustrator_id > illustrator.illustrator_id<br>
Ref: card.card_element_type_id > element_type.element_type_id Ref: card.card_element_type_id > element_type.element_type_id<br>
Ref: card.card_set_id > card_set.set_id Ref: card.card_set_id > card_set.set_id<br>
Ref: attack.attack_card_id > card.card_id Ref: attack.attack_card_id > card.card_id<br>