diff --git a/табл b/табл new file mode 100644 index 0000000..63507d6 --- /dev/null +++ b/табл @@ -0,0 +1,98 @@ +create table card_set ( +set_id int primary key, +set_name text unique not null, +set_code text unique not null, +set_total_cards int not null, +set_realese_date date not null, +set_logo_url text not null, +set_symbol_url text not null, +); + +create table energy_type ( +energy_type_id int primary key, +energy_type_name text unique not null, +energy_type_icon_url text not null, +); + +create table pokemon_sub_type ( +sub_type_id int primary key, +sub_type_name text unique not null, +sub_type_deafault_prize_count int <= +sub_type_global_rule_text text not null +); + +create table ability_type ( +ability_type_id int primary key, +ability_type_name text unique not null, +); + +create table attack_name ( +attack_name_id int primary key, +attack_name_title text unique not null, +); + +create table trainer_printed_type ( +printed_type_id int primary key, +printed_type_name text unique not null, +); + +create table game_mechanic ( +mechanic_id int primary key, +mechanic_name text unique not null, +); + +create table pokemon_species ( +species_pokedex_number int primary key, +species_eng_game text unique not null, +species_generation int not null, +species_heigth_m float not null, +species_weigth_m float not null, +); + +create table pokedex_entry ( +entry_id int primary key, +entry_pokedex_number int references pokemon_species (species_pokedex_number), +entry_source_game text not null, +entry_description text not null, +); + +create table card ( +card_id int primary key, +card_number text not null, +card_set_id int int references card_set (card_set_id), +card_name text not null, +card_rarity text not null, +card_type text not null <= +card_image_url text not null, +card_set_id <= +); + +create table pokemon_card ( +pokemon_card_id int primary key references card (card_id), +pokemon_pokedex_number int references pokemon_species (species_pokedex_number), +pokemon_pokedex_entry_id int references pokedex_entry (entry_id), +pokemon_hp int not null, +pokemon_stage text not null,<= +pokemon_evolves_from text not null, +pokemon_retreat_cost int not null, <= +pokemon_sub_type_id int references pokemon_sub_type (sub_type_id), +pokemon_category text not null, +pokemon_printed_height text not null +); + + + + + + + + + + + + + + + + +