DBMS CT1
DBMS CT1
2.12 Consider the relational database of Figure 2.14. Give an expression in the
CT – 01 (Chapter 2)
a.
**Explanation**: Selects courses from 2009 onwards, then
shows which students took those courses.
b.
**Explanation**: Joins student and course data, then filters for
courses from 2009 onwards.
c.
**Explanation**: Joins student and course data, then shows
student ID, name, and course ID.
employee (person name,street,city)
works (person name,company name,salary)
company (company name,city)
Q : Give an expression in the relational algebra to express each of the following queries:
a. Find the names of all employees who work for “First Bank Corpora-
tion”
b. Find the names and cities of residence of all employees who work for
“First Bank Corporation”.
c. Find the names, street address, and cities of residence of all employees
who work for “First Bank Corporation” and earn more than $10,000.
=>
Answer:
.13 Consider the bank database of Figure 2.15. Give an expression in the
rela-
Q : Give an expression in the relational algebra for each of the following
queries:
a. Find all loan numbers with a loan value greater than $10,000.
b. Find the names of all depositors who have an account with a value
greater than $6,000.
c. Find the names of all depositors who have an account with a value
greater than $6,000 at the “Uptown” branch.
Answer:
2.14 List two reasons why null values might be introduced into the database.
Answer: Nulls may be introduced into the database because the actual