
DMDB 4
Quiz
•
Other
•
9th - 12th Grade
•
Medium

qzzxfns95h aus
Used 32+ times
FREE Resource
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Relational algebra has Bag semantics
True
False
Answer explanation
Relational algebra has set semantics, while SQL has bag semantics. However, standard set operations like UNION follow set semantics in SQL.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Assume |app| = 10. Then SELECT * FROM app, app as a has ... tuples
10
100
20
1000
Cannot be said unless the schema is known
Answer explanation
SELECT * FROM a,b in SQL behaves like the cross product in RA. Thus, you can just multiply the size of both tables (here it's just one of size 10. Thus we have 100 tuples).
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following constraints are set for PRIMARY KEYs in SQL?
UNIQUE
NOT NULL
SERIAL
FOREIGN KEY
NONE
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To load the file /tmp/users.csv into the users table, you need to execute...
COPY users FROM '/tmp/users.csv' USING FORMAT csv;
INSERT users FROM '/tmp/users.csv' USING FORMAT csv;
COPY users FROM '/tmp/users.csv' WITH FORMAT csv;
LOAD users FROM '/tmp/users.csv' WITH FORMAT csv;
Answer explanation
5.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which are reasons that creating views are beneficial?
Privacy
Usability
Performance
Cost
6.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
How many tuples does the following query return:
SELECT * FROM app WHERE bytes_received < ALL (SELECT bytes_sent FROM app)?
0
2
7
10
Answer explanation
We're interested in tuples, which have less bytes_received then all bytes_sent from the table. The smallest bytes_sent is 29. Thus, only the tuples with bytes_received = 10 are selected. NULL is excluded (since NULL < 29 is unknown).
7.
MULTIPLE CHOICE QUESTION
2 mins • 2 pts
How many tuples does the following query return (empty entries are NULL) :
SELECT * FROM app WHERE bytes_received < ALL (SELECT bytes_received FROM app)
0
2
7
10
Answer explanation
First of all, we have a strict inequality --> nothing is smaller than the minimum in the first place. Only NULLs might matter however NULL < 10 is unknown which means that we also don't select the NULLs giving 0 tuples. Alternatively: You see that there are 3 groups: NULL, 30 and 10 - 10 is the smallest value. None of those groups has bytes_received < 10. Especially NULL < 10 is unknown.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
ICT Quiz
Quiz
•
10th Grade
10 questions
Globalization and Media Quiz
Quiz
•
7th Grade - University
15 questions
Circuitos electricos 2
Quiz
•
9th Grade
10 questions
Lilly's tiktok quiz
Quiz
•
5th - 12th Grade
15 questions
Media and Information Sources
Quiz
•
9th Grade - University
11 questions
4.3 - More System Software
Quiz
•
9th - 12th Grade
15 questions
Empowerment Technologies Module 1 - Pre-Test
Quiz
•
11th - 12th Grade
14 questions
Digital Media Quiz
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade
Discover more resources for Other
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
17 questions
Afro Latinos: Una Historia Breve Examen
Quiz
•
9th - 12th Grade
13 questions
Halloween Trivia
Quiz
•
9th Grade
17 questions
Hispanic Heritage Month Trivia
Quiz
•
9th - 12th Grade
12 questions
Graphing Inequalities on a Number Line
Quiz
•
9th Grade