---
# System prepended metadata

title: session monkchat │react / analise / banco de dados

---

# session monkchat │react / analise / banco de dados

 ## Henrique Dias Costa

### `db designer DER`

![](https://i.imgur.com/No1A5Ci.png)



 ### `script sql`  

  
```sql=
CREATE TABLE TB_SALA (
  id_sala int AUTO_INCREMENT primary KEY,
  nm_sala varchar(100),
  nm_dono varchar(100),
  ds_senha int
 );
 
 CREATE table TB_USUARIO(
 id_usuario	int AUTO_INCREMENT PRIMARY key,
 ds_email	varchar(100),	 
 ds_senha	int,
 nm_nick	varchar(100),	 
 dt_inclusao	datetime
 );
 
 
 CREATE table TB_CHAT (
 id_chat int AUTO_INCREMENT PRIMARY KEY,
 id_sala int, 
 id_usuario int, 
 nm_mensagem	varchar(100),	 
 dt_mensagem	datetime,
   foreign key (id_sala) references TB_SALA(id_sala),
   foreign key (id_usuario) references TB_USUARIO(id_usuario)
 );
```

### `caso de uso`
 
 ![](https://i.imgur.com/ezA8r6a.png)


### `react`


![](https://i.imgur.com/UkB9PBT.png)

![](https://i.imgur.com/OHOP7Pd.png)

![](https://i.imgur.com/aLCdF5l.png)

![](https://i.imgur.com/58NFmA5.png)


