generated from admin/template
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
879f85936d | ||
|
|
594a7ba147 | ||
|
|
c9d79c0682 |
@@ -4,3 +4,4 @@
|
|||||||
|
|
||||||
## Список работ
|
## Список работ
|
||||||
* [Лабораторная работа №1](./works/lab-01)
|
* [Лабораторная работа №1](./works/lab-01)
|
||||||
|
* [Лабораторная работа №2](./works/lab-02)
|
||||||
@@ -51,6 +51,7 @@ Table illustrator {
|
|||||||
Ref: card_set.card_set_id < card.card_set_id
|
Ref: card_set.card_set_id < card.card_set_id
|
||||||
Ref: attack.attack_id < card.attack_id
|
Ref: attack.attack_id < card.attack_id
|
||||||
Ref: element_type.element_type_id < card.element_type_id
|
Ref: element_type.element_type_id < card.element_type_id
|
||||||
|
Ref: illustrator.illustrator_id < card.illustrator_id
|
||||||
|
|
||||||
// Записи(значения сделаны с помощью ИИ):
|
// Записи(значения сделаны с помощью ИИ):
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -1,3 +1,4 @@
|
|||||||
|
```csharp
|
||||||
Table card {
|
Table card {
|
||||||
card_id integer [primary key, not null, unique]
|
card_id integer [primary key, not null, unique]
|
||||||
card_name text [not null]
|
card_name text [not null]
|
||||||
@@ -43,4 +44,5 @@ Table illustrator {
|
|||||||
|
|
||||||
Ref: card_set.card_set_id < card.card_set_id
|
Ref: card_set.card_set_id < card.card_set_id
|
||||||
Ref: attack.attack_id < card.attack_id
|
Ref: attack.attack_id < card.attack_id
|
||||||
Ref: element_type.element_type_id < card.element_type_id
|
Ref: element_type.element_type_id < card.element_type_id
|
||||||
|
Ref: illustrator.illustrator_id < card.illustrator_id
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# Лабораторная работа №2
|
||||||
|
|
||||||
|
* **Студент:** Закиров Алим Альбертович
|
||||||
|
* **Вариант / Карточка:** Проектирование связей "Многие-ко-Многим"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Ключевой код
|
||||||
|
```csharp
|
||||||
|
Table card {
|
||||||
|
card_id integer [primary key, not null, unique]
|
||||||
|
card_name text [not null]
|
||||||
|
card_stage text [not null]
|
||||||
|
card_hp integer [not null, check: `card_hp > 0`]
|
||||||
|
card_num_in_pokedex integer [not null]
|
||||||
|
card_type text [not null]
|
||||||
|
card_height integer [not null, check: `card_height > 0`]
|
||||||
|
card_weight integer [not null, check: `card_weight > 0`]
|
||||||
|
card_retreat_cost integer [not null, check: `card_retreat_cost >= 0`]
|
||||||
|
card_release_date date [not null]
|
||||||
|
card_set_id integer [not null]
|
||||||
|
attack_id integer [not null]
|
||||||
|
element_type_id integer [not null]
|
||||||
|
illustrator_id integer [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Table card_set {
|
||||||
|
card_set_id integer [primary key, not null, unique]
|
||||||
|
card_set_name text [not null]
|
||||||
|
card_set_total_quantity integer [not null, check: `card_set_total_quantity > 0`]
|
||||||
|
card_set_release_date date [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table attack {
|
||||||
|
attack_id integer [primary key, not null, unique]
|
||||||
|
attack_name text [not null]
|
||||||
|
attack_base_damage integer [not null, check: `attack_base_damage >= 0`]
|
||||||
|
attack_damage_modifier text
|
||||||
|
attack_effect text
|
||||||
|
}
|
||||||
|
|
||||||
|
Table element_type {
|
||||||
|
element_type_id integer [primary key, not null, unique]
|
||||||
|
element_type_name text [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table illustrator {
|
||||||
|
illustrator_id integer [primary key, not null, unique]
|
||||||
|
illustrator_name text [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table attack_card {
|
||||||
|
attack_card_id int [pk, not null, unique]
|
||||||
|
card_id int [not null]
|
||||||
|
attack_id int [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
Table attack_card_prining {
|
||||||
|
attack_card_prining_id int [pk, not null, unique]
|
||||||
|
attack_card_prining_cost int [not null, check: `attack_card_pricing_cost >= 0`]
|
||||||
|
attack_card_id int [not null]
|
||||||
|
element_type_id int [not null]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Ref: card_set.card_set_id < card.card_set_id
|
||||||
|
Ref: attack.attack_id < card.attack_id
|
||||||
|
Ref: element_type.element_type_id < card.element_type_id
|
||||||
|
Ref: illustrator.illustrator_id < card.illustrator_id
|
||||||
|
Ref: card.card_id > attack_card.card_id
|
||||||
|
Ref: attack.attack_id > attack_card.attack_id
|
||||||
|
Ref: attack_card_prining.attack_card_id < attack_card.attack_card_id
|
||||||
|
Ref: element_type.element_type_id < attack_card_prining.element_type_id
|
||||||
Reference in New Issue
Block a user