
DMDB 4

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

qzzxfns95h aus
Used 29+ 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
Similar Resources on Wayground
7 questions
Series Cuircuit

Quiz
•
10th Grade
15 questions
TEKNIK ELEKTRONIKA DASAR

Quiz
•
10th Grade
10 questions
Cultura do amendoim

Quiz
•
9th - 12th Grade
8 questions
RLC PARALLEL SERIES

Quiz
•
9th - 12th Grade
15 questions
CCNA 200-301 ACL + NAT

Quiz
•
1st - 12th Grade
10 questions
NE555 Astable

Quiz
•
5th Grade - University
10 questions
Circuito serie de resistencias

Quiz
•
11th Grade
10 questions
Stalne jednosmerne struje

Quiz
•
9th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Other
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade