
BDD 2023
Authored by NICOLAS Ternay
Science
KG - 1st Grade
Used 9+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
42 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following word pairs are synonyms:
A) table and relation.
В) table and tuple.
C) column and tuple
D). Attribute and row
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following statements are true regarding the comparison between primary key and unique key?
A) unique key attribute can be null, a primary key attribute cannot
B) There can be more than one unique key in a table, but there can only be one primary key
C) A primary key attribute can be null, a unique key attribute cannot
D) That can be multiple primary keys in a table, but there can only be one unique key
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4)
Wich of the following SQL statements allows you to drop table T?
A. drop table T
B. delete from T
C. delete from T where true
D. truncate table T
Answer explanation
The DROP TABLE statement is used to permanently delete a table from a database. It removes all data, indexes, triggers, and constraints associated with the table. Once a table is dropped, it cannot be recovered.
The other options are not correct:
DELETE FROM T deletes all rows from the table T, but the table itself remains.
DELETE FROM T WHERE TRUE is equivalent to DELETE FROM T, as the WHERE TRUE clause always evaluates to true.
TRUNCATE TABLE T deletes all rows from the table T, but the table itself remains and the table ID is reset to 0.
Therefore, the only statement that allows you to drop table T is DROP TABLE T.
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Consider table R(A, B, C). With (A,B) Primary Key The query "select A, B from R" returns the same result as:
A) select distinct A, B from R
B) select A, B from R where A <> null
C) select distinct A, B from R where B <> null
D) select A, B from R where A <> null and B <> null
Answer explanation
SELECT Name, Family_Name FROM Students;
A) SELECT DISTINCT Name, Family_Name FROM Students;
B) SELECT Name, Family_Name FROM Students WHERE Name IS NOT NULL;
C) SELECT DISTINCT Name, Family_Name FROM Students WHERE Family_Name IS NOT NULL;
D) SELECT Name, Family_Name FROM Students WHERE Name IS NOT NULL AND Family_Name IS NOT NULL;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the table T (A: int, B: int). Which query below can produce duplicates?
A) select * from T
B) select B from T
C) select * from T
Where A = 0
D) select * from T where B = 0
Answer explanation
A) SELECT * FROM T;
B) SELECT B FROM T; ✅
C) SELECT * FROM T WHERE A = 0;
D) SELECT * FROM T WHERE B = 0;
B ) can produce duplicate
proof of answere D on the image, the rest is obviou
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Consider tables R(A, B) and S(B, C). The query "select A from R natural join S" returns the same result as:
A) select A from R cross join S
B) select A from R, S
D) select A from R, S where R.B = S.B
D)
select A from R cross join S where R.B = S.B
Answer explanation
C) SELECT A FROM R, S WHERE R.B = S.B ✅
Explanation: This query performs an inner join between tables R and S based on the common column B (R.B = S.B). This is equivalent to the natural join condition, where the join is automatically performed based on common columns between the two tables.
D) La requête D utilise un cross join pour combiner toutes les lignes des tables R et S, puis utilise une clause WHERE pour filtrer les résultats pour n'inclure que les lignes où les valeurs des colonnes B sont égales.
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Consider tables R(A, B, C) and S(B, D). Then:
A) "R natural inner join S" contains more tuples than "R natural join S".
B) "R natural outer join S" contains at least as many tuples as "R natural join S".
C) "R natural outer join S" contains at least as many tuples as "R natural left outer join S"
D) "R natural left outer join S" contains at least as many tuples as "R natural right outer join S".
Answer explanation
Natural inner join combines two tables based on their common columns and includes only the rows where the values in the common columns match. In this case, the natural inner join of tables R and S would include only the rows where the values in column B of R match the values in column B of S.
Natural join also combines two tables based on their common columns but includes all rows from both tables, regardless of whether the values in the common columns match. This means that the natural join of tables R and S would include all rows from table R, along with all rows from table S that have a matching value in column B.
Natural outer join combines two tables based on their common columns and includes all rows from both tables, even if there is no matching value in the common columns. This means that the natural outer join of tables R and S would include all rows from table R, along with all rows from table S, regardless of whether the values in column B match.
Now, let's compare the statements:
A) "R natural inner join S" contains more tuplesthan "R natural join S".
This statement is incorrect because the natural inner join of two tables always contains fewer tuples or rows than the natural join of the same tables. The natural inner join only includes rows where the values in the common columns match, while the natural join includes all rows from both tables, regardless of whether the values in the common columns match.
B) "R natural outer join S" contains at least as many tuples as "R natural join S".
This statement is correct. The natural outer join of two tables always contains at least as many tuples or rows as the natural join of the same tables. The natural outer join includes all rows from both tables, regardless of whether the values in the common columns match, while the natural join only includes rows where the values in the common columns match.
C) "R natural outer join S" contains at least as many tuples as "R natural left outer join S"
This statement is also correct. The natural outer join of two tables always contains at least as many tuples or rows as the natural left outer join of the same tables. The natural outer join includes all rows from both tables, regardless of whether the values in the common columns match, while the natural left outer join only includes all rows from the left table and matching rows from the right table.
D. "R natural left outer join S" contains at least as many tuples as "R natural right outer join S".
This statement is incorrect because the natural left outer join of two tables always contains at least as many tuples or rows as the natural right outer join of the same tables. The natural left outer join includes all rows from the left table and matching rows from the right table, while the natural right outer join only includes matching rows from the left table and all rows from the right table.
Therefore, the correct statements are:
B) "R natural outer join S" contains at least as many tuples as "R natural join S".
C) "R natural outer join S" contains at least as many tuples as "R natural left outer join S".
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
40 questions
rolnik-R.03-06.2018
Quiz
•
KG
39 questions
Light, shadow & reflection
Quiz
•
6th Grade
41 questions
Yazied 7 Science ( k) unit #1 lesson #2 ( Gravity & friction
Quiz
•
7th Grade
40 questions
Revisão capítulo 01, 02, 03 e 04 -Marista
Quiz
•
7th Grade
40 questions
K1 2023 SELANGOR
Quiz
•
1st Grade
39 questions
7OFE
Quiz
•
University
40 questions
ôn tập chương este - lipit - 2023-2024
Quiz
•
12th Grade
41 questions
B-TOURNAMENT US IPA SD
Quiz
•
6th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Science
11 questions
FOREST Growth Mindset
Lesson
•
KG
10 questions
Identifying Physical and Chemical Changes
Interactive video
•
1st - 5th Grade
10 questions
Exploring the 11 Human Body Systems
Interactive video
•
1st - 5th Grade
10 questions
Exploring Food Chains and Webs in Ecosystems
Interactive video
•
1st - 5th Grade
10 questions
Exploring the Conservation of Mass in Everyday Life
Interactive video
•
1st - 5th Grade
12 questions
Earthquakes, Landslides, and Volcanoes
Quiz
•
1st - 5th Grade
35 questions
4.2 Plant and Animal Life
Quiz
•
KG
12 questions
Reduce, Reuse, and Recycle
Quiz
•
1st - 8th Grade