BDNRAula02ModelagemNaoRelacional.pdf
TDC
The Dev Conference
https://docs.google.com/document/d/1BnqKoc96T-_X1e0tA6bmindTY8x5jKNI2Rioh8m4qDw/edit
https://astra.datastax.com/org/02033f3f-6ff3-4ca3-bda0-39e9a39e8fe4/database/612dcbc5-8146-4126-a953-fd85b8bd3d46/cqlconsole?fullscreen=true
DESC keyspace;
USE default_keyspace;
CREATE TABLE mercadoria (
categoria TEXT,
id_mercadoria UUID,
nome TEXT,
valor DECIMAL,
PRIMARY KEY (categoria, ID_MERCADORIA));
)
INSERT INTO mercadoria (categoria, nome, valor, id_mercadoria)
VALUES ('ALIMENTO','Presunto',15, now());
INSERT INTO mercadoria (categoria, nome, valor, id_mercadoria)
VALUES ('LIMPEZA','Desinfetante',5.5, now()); -- 2x
INSERT INTO mercadoria (categoria, nome, valor, id_mercadoria)
VALUES ('LIMPEZA','Pudim',5.5, now());