
DMDB 4
Quiz
•
Other
•
9th - 12th Grade
•
Practice Problem
•
Medium
qzzxfns95h aus
Used 32+ times
FREE Resource
Enhance your content in a minute
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.
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
15 questions
Library Orientation
Quiz
•
7th - 9th Grade
11 questions
Digital Video Production Vocab 1
Quiz
•
8th - 12th Grade
14 questions
Games
Quiz
•
KG - 12th Grade
16 questions
Social Media
Quiz
•
5th - 12th Grade
10 questions
Star Wars
Quiz
•
KG - Professional Dev...
11 questions
Star Wars
Quiz
•
KG - Professional Dev...
14 questions
MIDTERM - FABM 1
Quiz
•
11th Grade
15 questions
Quizz Réseaux Sociaux (SNT)
Quiz
•
10th Grade
Popular Resources on Wayground
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
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
20 questions
El Verbo IR Practice
Quiz
•
9th Grade
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
10 questions
Theme
Quiz
•
9th Grade
20 questions
Cell Organelles
Quiz
•
10th Grade
12 questions
Exponential Growth and Decay
Quiz
•
9th Grade
