Files
db-sikuler/works/lab-01/lesson1_result.txt
T

41 lines
1.1 KiB
Plaintext

Сущность: card
- card_id: INT [primary key, auto_increment]
- card_name: TEXT UNIQUE NOT NULL
- stage: TEXT NOT NULL
- hp: INT or NUMERIC NOT NULL CHECK
- pokedex_number: INT UNIQUE NOT NULL
- category: TEXT NOT NULL
- height: numeric NOT NULL
- weight: numeric NOT NULL
- retreat_cost: INT or NUMERIC
- release_date: DATE NOT NULL
- illustrator_name: TEXT [foreign key references illustrator(illustrator_name)] NOT NULL
- set_id: INT [foreign key references card_set(set_id)] NOT NULL
CONSTRAINT check_hp CHECK (hp > 0)
CONSTAINT check_antropometrics CHECK (height > 0 AND weight > 0)
Сущность card_set
- set_id: INT [primary key, auto_increment]
- set_name: TEXT UNIQUE NOT NULL
- set_code: INT NOT NULL
- card_amount: INT NOT NULL
- release_date: DATE NOT NULL
Сущность: attack
- attack_id: INT [primary key, auto_increment]
- attack_name: TEXT NOT NULL
- base_damage: TEXT NOT NULL
- text_effect: TEXT
Сущность: element_type:
- element_id: INT [primary key, auto_increment]
- element_name: TEXT NOT NULL
Сущность: illustrator
- illustrator_id: INT [primary key, auto_increment]
- illustrator_name: TEXT NOT NULL UNIQUE