Question 41
MediumR has 4 tuples and S has 6 tuples. What is the largest number of tuples R ⋈ S (natural join) can have?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
R has 4 tuples and S has 6 tuples. What is the largest number of tuples R ⋈ S (natural join) can have?
4
24
10
6
Sign up free to see the answer and a step-by-step explanation.
R(A, B) has 5 tuples and S(B, C) has 3 tuples. B is the primary key of S and a foreign key in R (not NULL). How many tuples does R ⋈ S have?
15
8
5
3
Sign up free to see the answer and a step-by-step explanation.
R and S are union-compatible, with 7 and 5 tuples, and 3 tuples are common. How many tuples are in R ∪ S?
9
15
12
7
Sign up free to see the answer and a step-by-step explanation.
R and S are union-compatible, with 7 and 5 tuples, and 3 tuples are common. How many tuples are in R − S?
7
2
4
3
Sign up free to see the answer and a step-by-step explanation.
Which relational algebra expression gives the names of employees in department 10?
Employee × Department
π name (σ dept = 10 (Employee))
π dept (Employee)
σ name (π dept = 10 (Employee))
Sign up free to see the answer and a step-by-step explanation.
What is the main difference between a theta join and an equi-join?
An equi-join removes all columns
A theta join needs no condition
A theta join may use any comparison (<, >, ≠ …); an equi-join uses only equality
They are the same
Sign up free to see the answer and a step-by-step explanation.
Which relational algebra operation needs no condition and pairs every tuple of R with every tuple of S?
Selection
Cartesian product (×)
Natural join
Division
Sign up free to see the answer and a step-by-step explanation.
Why does the relational model not allow two identical tuples in a relation?
Keys would be too long
It would use too much disk
A relation is a set, so its tuples must be distinct
SQL forbids SELECT on duplicates
Sign up free to see the answer and a step-by-step explanation.
What does the entity integrity rule say?
Every foreign key must be NULL
Every column must be unique
Every table needs an index
No part of a primary key may be NULL
Sign up free to see the answer and a step-by-step explanation.
Which relational algebra operation is used to rename a relation so it can be joined with itself?
÷ (divide)
π (project)
σ (select)
ρ (rename)
Sign up free to see the answer and a step-by-step explanation.