diff --git a/works/lab-01/work2 b/works/lab-01/work2 index 15a7b9e..3555d4e 100644 --- a/works/lab-01/work2 +++ b/works/lab-01/work2 @@ -2,16 +2,14 @@ Table card { set_id int [pk, not null] element_id int [primary key] card_id int [primary key] - card_name text [NOT NULL] card_stage text [NOT NULL] - card_hp int [NOT NULL, check:`card_hp>0`] card_num_pokedeks int [NOT NULL] card_category text [NOT NULL] - card_weight numeric [NOT NULL, check:`card_weight>0`] - card_height numeric [NOT NULL, check:`card_height>0`] - card_retreat_cost int [NOT NULL] card_year date illustrator_id int [primary key] + card_rare text [not null] + card_type text + card_image_url text [not null] } Table card_set { set_id int [pk, not null] @@ -49,6 +47,36 @@ Table element_attack { element_attack_id int [pk] } +Table trainer { + trainer_id int [pk] + triner_name text + trainer_class text + illustrator_id int [pk] + +} +Table energy { + energy_id int [pk] + energy_name text [pk] + energy_give int + energy_type text + illustrator_id int [pk] +} +table pokemon { + card_id in [pk] + pokemon_category text + sub_type_id text + pokemon_evolution_for text + pokemon_id int [pk] + pokemon_name text [not null] + pokemon_stage text [NOT NULL] + pokemon_hp int [NOT NULL, check:`pokemon_hp>0`] + card_num_pokedeks int [NOT NULL] + pokemon_weight numeric [NOT NULL, check:`pokemon_weight>0`] + pokemon_height numeric [NOT NULL, check:`pokemon_height>0`] + pokemon_retreat_cost int + pokemon_pokedex_id int + illustrator_id int [pk] +} Ref: "card"."illustrator_id" -? "illustrator"."illustrator_id" @@ -70,4 +98,10 @@ Ref: "element_attack"."attack_id" > "attack"."attack_id" Ref: "element_attack"."element_id" ?> "element_type"."element_id" -Ref: "card"."set_id" - "card_set"."set_id" \ No newline at end of file +Ref: "card"."set_id" - "card_set"."set_id" + +Ref: "trainer"."illustrator_id" ?<>? "card"."illustrator_id" + +Ref: "energy"."illustrator_id" ?<>? "card"."illustrator_id" + +Ref: "pokemon"."illustrator_id" ?<>? "card"."illustrator_id" \ No newline at end of file