Skip to content

Commit

Permalink
Update: DDL && DML
Browse files Browse the repository at this point in the history
  • Loading branch information
kauaneiras committed Aug 27, 2024
1 parent f628c17 commit c9bbce6
Show file tree
Hide file tree
Showing 3 changed files with 1,024 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/entrega1/dicionario_de_dados.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Descrição: A entidade **End** descreve os possíveis finais de uma aventura.
| id_end | INT | Identificador do fim | 1-5000 | não | PK | |
| cause | VARCHAR(150) | Causa do fim da aventura | a-z, A-Z | não | | |
| title | VARCHAR(150) | Título do fim | a-z, A-Z | não | | |
| about | VARCHAR(300) | Título do fim | a-z, A-Z | não | | |

## **Entidade: Deck (Baralho)**

Expand Down
10 changes: 7 additions & 3 deletions docs/entrega2/assets/DDL.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ CREATE TABLE PC (
CREATE TABLE End (
id_end SERIAL PRIMARY KEY,
cause VARCHAR(255) NOT NULL,
title VARCHAR(100) NOT NULL
title VARCHAR(100) NOT NULL,
about VARCHAR(255) NOT NULL,
image BYTEA
);

CREATE TABLE Adventure (
Expand Down Expand Up @@ -56,6 +58,8 @@ CREATE TABLE Card (
id_card SERIAL PRIMARY KEY,
id_npc INT,
id_dialogue INT,
answer_right VARCHAR(255),
answer_left VARCHAR(255),
FOREIGN KEY (id_npc) REFERENCES NPC(id_npc),
FOREIGN KEY (id_dialogue) REFERENCES Dialogue(id_dialogue)
);
Expand All @@ -80,8 +84,8 @@ CREATE TABLE Card_Action (
FOREIGN KEY (id_item) REFERENCES Item(id_item)
);

CREATE TABLE NPC (
id_npc SERIAL PRIMARY KEY,
CREATE TABLE Plot (
id_plot SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
image BYTEA
);
Expand Down
Loading

0 comments on commit c9bbce6

Please sign in to comment.