diff --git a/works/sqllab 0 b/works/sqllab 0 new file mode 100644 index 0000000..74a5bdc --- /dev/null +++ b/works/sqllab 0 @@ -0,0 +1,42 @@ +Table attack { + attack_id int [primary key, not null] + attack_base_damage int + attack_damage_modifier text + attack_text_effect text +} + +Table illustrator { + illustrator_id int [primary key, not null] + illustrator_name text [not null] +} + +Table card { + card_id int [primary key, not null] + card_name text [not null] + card_stage text + card_hp int [check: `card_hp > 0`] + card_number_in_set text [not null] + card_category text [not null] + card_height_m numeric [check: `height_m >= 0.1`] + card_weight_kg numeric [check: `weight_m >= 0.1`] + card_retreat_cost int [not null] + card_release_date date [check: `card_release_date > 1996-10-20`] + illustrator_id int + card_set_id int +} +Table element_type { + element_type_id int [primary key, not null] + element_type_name text [not null] +} +Table card_set { + card_set_id int [primary key, not null] + card_set_name text [not null] + card_set_quanity int [not null] + card_set_release_date date [check: `card_release_date > 1996-10-20`] +} + + +Ref: illustrator.illustrator_id > card.illustrator_id +Ref: card.card_set_id > card_set.card_set_id +Ref: attack.attack_id > element_type.element_type_id +Ref: card.card_id > attack.attack_id \ No newline at end of file