Mudanças entre as edições de "Comparação entre Banco de dados relacional e Elastic Search"
De Basef
(9 revisões intermediárias pelo mesmo usuário não estão sendo mostradas) | |||
Linha 19: | Linha 19: | ||
|Coluna | |Coluna | ||
|Atributo | |Atributo | ||
+ | |- | ||
+ | |Partição | ||
+ | |Shard | ||
|} | |} | ||
+ | |||
'''Dados''' | '''Dados''' | ||
Linha 27: | Linha 31: | ||
!Elastic Search | !Elastic Search | ||
|- | |- | ||
− | |Verificando se registro existe | + | |Verificando se registro/documento existe |
− | | | + | |select 1 from TYPE where exists id = ID; |
− | | | + | |HEAD /index/type/id |
|- | |- | ||
− | |Lendo registro | + | |Lendo um registro |
− | |GET | + | |select * from TYPE where id = ID; |
− | | | + | |GET /index/type/id |
+ | |- | ||
+ | |Inserção | ||
+ | Atualização de registros/documentos inteiros | ||
+ | |insert into TYPE (id, atributo1, atributo2) values (ID, valor1, valor2); | ||
+ | update TYPE set atributo1 = valor1, atributo2 = valor2 where id = ID; | ||
+ | |PUT /index/type/id | ||
+ | |- | ||
+ | | | ||
+ | * Inserção | ||
+ | * Inserção com geração automática de ID | ||
+ | * Atualização parcial de registros/documentos | ||
+ | | | ||
+ | * insert into TYPE (id, atributo1, atributo2) values (ID, valor1, valor2); | ||
+ | * insert into TYPE (atributo1, atributo2) values (valor1, valor2); | ||
+ | * update TYPE set atributo1 = valor1 where id = ID; | ||
+ | | | ||
+ | * POST /index/type/id | ||
+ | * POST /index/type | ||
+ | * POST /index/type/id/_update | ||
|} | |} | ||
− | |||
[[Category: Elastic Search]] | [[Category: Elastic Search]] |
Edição atual tal como às 11h55min de 26 de julho de 2017
Termos
BD Relacional | Elastic Search |
---|---|
Instância | Index |
Tabela | Type |
Schema | Mapping |
Tupla (Registro) | Documento |
Coluna | Atributo |
Partição | Shard |
Dados
Ação | BD Relacional | Elastic Search |
---|---|---|
Verificando se registro/documento existe | select 1 from TYPE where exists id = ID; | HEAD /index/type/id |
Lendo um registro | select * from TYPE where id = ID; | GET /index/type/id |
Inserção
Atualização de registros/documentos inteiros |
insert into TYPE (id, atributo1, atributo2) values (ID, valor1, valor2);
update TYPE set atributo1 = valor1, atributo2 = valor2 where id = ID; |
PUT /index/type/id |
|
|
|