You are on page 1of 8

13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Técnico+
+Conhecimento +Formação +Futuro

Painel do utilizador /Os meus módulos / SIBD - Avaliações (DEI) / Avaliações / Teste BD LETI 2021 - TE1 - Sessão 1

Iniciada Quarta, 28 de Abril de 2021 às 08:39


Estado Terminada
Terminada em Quarta, 28 de Abril de 2021 às 08:54
Tempo gasto 14 minutos 48 segundos

Pergunta 1
Correta

Nota: 1,00

Given the table 'professor' with the following structure:


id | name
1    Steve

Which of the following statements will insert a record in the table 'professor'?

Selecione uma opção:


a. INSERT VALUES (2, 'John') INTO TABLE professor;
b. INSERT VALUES(2, 'John') INTO professor;
c. INSERT INTO professor VALUES(2, 'John'); 
d. INSERT (2, 'John') INTO professor;

Resposta correta: INSERT INTO professor VALUES(2, 'John');

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 1/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 2
Correta

Nota: 1,00

From the following diagram we interpret that:

Selecione uma opção:


A. An employee can only work in one department; and one department can only have one worker

B. None of the other options is true


C. Not all employees work; and not all departments have employees

D. An employee can work in many departments; and one department can have many workers  Correct

A sua resposta está correta.


Resposta correta: An employee can work in many departments; and one department can have many workers

Pergunta 3
Correta

Nota: 1,00

The following query over the table employee

     SELECT name
     FROM employee;

 will return unique employee names if:

Selecione uma opção:


A. We add 'FROM DISTINCT employee'  to the query
B. There is a FOREIGN KEY constraint on the column 'employee.name' to another table

C. The column  'employee.name' is part of the PRIMARY KEY for the table 'employee'

D. There is a UNIQUE constraint on the column 'employee.name' 

A sua resposta está correta.


Resposta correta: There is a UNIQUE constraint on the column 'employee.name'

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 2/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 4
Correta

Nota: 1,00

A PRIMARY KEY constraint is used to:

Selecione uma opção:


A. Ensure that every row on a table can be identify identified 
B. Ensure that the values of every column on the table are unique
C. Limit data in a column (or columns) to values contained in another table
D. Ensure that every column on the table can be uniquely identified

Resposta correta: Ensure that every row on a table can be identify identified

Pergunta 5
Incorreta

Nota: 1,00

The most appropriate integrity constraints needed when translating the following diagram to SQL are:

Selecione uma opção:


A. Foreign keys and triggers
B. Primary keys, foreign keys, and CHECK constraints 
C. Primary keys, foreign keys, and stored procedures
D. Primary keys, foreign keys, and triggers

Resposta correta: Primary keys, foreign keys, and triggers

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 3/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 6
Correta

Nota: 1,00

Given the tables:


department[did | name | workcity]
employee[name | category | dept]

where every 'employee.dept' REFERENCES 'department.did'


Which of the following queries does not return the list of all employees of category 'M'?

Selecione uma opção:


A.
SELECT e.name, d.workcity 
FROM employee e INNER JOIN department d
    ON d.did = e.dept 
WHERE category = ‘M'
B.
SELECT e.name, d.workcity 
FROM employee e LEFT JOIN department d 
    ON d.did = e.dept
WHERE category = ‘M'

C.
SELECT e.name, d.workcity
FROM employee e, department d 
WHERE d.did = e.dept AND category = ‘M'

D.  Correct.
SELECT e.name, d.workcity 
FROM employee e NATURAL JOIN department d 
WHERE category = ‘M'

A sua resposta está correta.


Respostas corretas:
SELECT e.name, d.workcity 
FROM employee e INNER JOIN department d
    ON d.did = e.dept 
WHERE category = ‘M',
SELECT e.name, d.workcity 
FROM employee e NATURAL JOIN department d 
WHERE category = ‘M'

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 4/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 7
Correta

Nota: 1,00

In order to  obtain all customers who have deposited, but have not borrowed, we must complete the following query

SELECT customer_name
FROM depositor
___(a)___
SELECT customer_name
FROM borrower;

with: 

Selecione uma opção:


A. (a) DISTINCT

B. (a) EXCEPT 

C. (a) INTERSECT

D. (a) UNION

A sua resposta está correta.

Resposta correta: (a) EXCEPT

Pergunta 8
Correta

Nota: 1,00

The concept of a ‘centralized data repository‘ is advantageous because:

Selecione uma opção:


A.
Data should always be kept at a single place

B. Applications often share data organization and constraints 

C.
Applications must know where data is saved

D. Data must be stored near the hardware

A sua resposta está correta.

Resposta correta: Applications often share data organization and constraints

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 5/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 9
Correta

Nota: 1,00

Regarding the following diagram, we know that:

Selecione uma opção:


A. Every document is signed

B. Every Employee signs a document 

C. Signing documents is optional

D. Original documents can be signed only once

A sua resposta está correta.

Resposta correta: Every Employee signs a document

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 6/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 10
Correta

Nota: 1,00

Regarding the following diagram, 

which sentence is true:

Selecione uma opção:


A. A client can also be a supplier (and thus supply itself)

B.
A client can have many suppliers

C.
A supplier may supply distinct products 

D. A client can have only one supplier 

A sua resposta está correta.


Resposta correta: A client can have only one supplier

Pergunta 11
Correta

Nota: 1,00

What is the correct keyword _(a)_ that makes the following command valid:

UPDATE employee __(a)__ salary = salary * 1.05;

Selecione uma opção:


A. SELECT
B. WHERE
C. SET 
D. IN

Resposta correta: SET

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 7/8
13/05/2021 Teste BD LETI 2021 - TE1 - Sessão 1: Revisão da tentativa

Pergunta 12
Correta

Nota: 1,00

Which of the following is true about  PRIMARY KEY constraints?

Selecione uma opção:


A. A column of a primary key cannot be part of a foreign key

B. A column of a primary key cannot have repeated values (in distinct rows)

C. None of the other options is true

D. A column of a primary key cannot have NULL values 

A sua resposta está correta.

Resposta correta: A column of a primary key cannot have NULL values

Pergunta 13
Correta

Nota: 1,00

What is your CVV code (from the scratch sheet)?

Resposta: 0 

Resposta correta: 0

◄ Teste - Mini Demo

Ir para...

Teste BD LETI 2021 - TE1 - Sessão 2 ►

https://e.tecnicomais.pt/mod/quiz/review.php?attempt=10862&cmid=7680 8/8

You might also like