Assignment-1 to 2 DBMS
Assignment-1 to 2 DBMS
1. Explain the difference between two-tier and three-tier architectures. Which is better suited for Web
applications? Why?
2. List at least two reasons why database systems support data manipulation using a declarative query
language such as SQL, instead of just providing a a library of C or C++ functions to carry out data
manipulation.
3. Consider the time slot relation. Given that a particular time slot can meet more than once in a week,
explain why day and start time are part of the primary key of this relation, while end time is not.
4. Consider a database used to record the marks that students get in different exams of different course
offerings (sections).
a. Construct an E-R diagram that models exams as entities, and uses a ternary relationship, for the
database.
b. Construct an alternative E-R diagram that uses only a binary relationship between student and
section. Make sure that only one relationship exists between a particular student and section pair,
yet you can represent the marks that a student gets in different exams.
5. Design a generalization–specialization hierarchy for a motor vehicle sales company. The company sells
motorcycles, passenger cars, vans, and buses. Justify your placement of attributes at each level of the
hierarchy. Explain why they should not be placed at a higher or lower level
Assignment-2
a. π A(r)
b. σ B = 17 (r)
c. r × s
d. π A,F (σ C = D(r × s))
2. Let R = (A, B, C), and let r1 and r2 both be relations on schema R. Give an expression in the domain
relational calculus that is equivalent to each of the following:
a. π A(r1)
c. r1 ∪ r2
b. σ B = 17 (r1)
d. r1 ∩ r2
e. r1 − r2
f. π A,B (r1) ⋈ π B,C (r2)