Buscar

What are the CONSTRAINTS used to maintain data integrity in a database? NOT NULL UNIQUE KEY PRIMARY KEY FOREIGN KEY CHECK NOT NULL guarantees that ...

What are the CONSTRAINTS used to maintain data integrity in a database?
NOT NULL
UNIQUE KEY
PRIMARY KEY
FOREIGN KEY
CHECK
NOT NULL guarantees that a field in the table must be filled in when inserting a record.
UNIQUE KEY guarantees that the values in a column cannot be repeated.
PRIMARY KEY guarantees that the information contained in the column that is part of this key is unique.
FOREIGN KEY guarantees the integrity between two tables.
CHECK is used to criticize a certain value that is being inserted into a table field or to force this field to be filled in.
a) I, II, III, IV and V are correct.
b) I, II, III and IV are correct.
c) II, III, IV and V are correct.
d) I, III, IV and V are correct.

Essa pergunta também está no material:

SQL - Uma abordagem para bancos de dados Oracle - Casa do Codigo
356 pág.

Português Escola Colegio Estadual Barao Do Rio BrancoEscola Colegio Estadual Barao Do Rio Branco

💡 1 Resposta

User badge image

Ed Verified user icon

A resposta correta é a alternativa d) I, III, IV e V estão corretas. Explicação: - NOT NULL garante que um campo na tabela deve ser preenchido ao inserir um registro. - UNIQUE KEY garante que os valores em uma coluna não podem ser repetidos. - PRIMARY KEY garante que as informações contidas na coluna que faz parte dessa chave são únicas. - FOREIGN KEY garante a integridade entre duas tabelas. - CHECK é usado para criticar um determinado valor que está sendo inserido em um campo de tabela ou para forçar o preenchimento deste campo. A alternativa II está incorreta, pois UNIQUE KEY não garante que todos os valores em uma tabela sejam únicos, apenas os valores em uma coluna específica.

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais