CA2 assessment (Term paper +
assignment)
Assignment-
1. Consider a database with the following schema:
Person ( name, age, gender ) name is a key
Frequents ( name, pizzeria ) (name, pizzeria) is a key
Eats ( name, pizza ) (name, pizza) is a key
Serves ( pizzeria, pizza, price ) (pizzeria, pizza) is a key
Write relational algebra expressions for the following nine queries.
(Warning: some of the later queries are a bit challenging.)
If you already know SQL, you can try running SQL queries to match your
relational algebra expressions. We've created a file for download with
schema declarations and sample data. (See our quick guide for SQL system
instructions.) To check your queries, the correct results are found in the
answers section below.
a. Find all pizzerias frequented by at least one person under the age of 18.
b. Find the names of all females who eat either mushroom or pepperoni pizza (or both).
c. Find the names of all females who eat both mushroom and pepperoni pizza.
d. Find all pizzerias that serve at least one pizza that Amy eats for less than $10.00.
e. Find all pizzerias that are frequented by only females or only males.
f. For each person, find all pizzas the person eats that are not served by any pizzeria the person frequents.
such person (name) / pizza pairs.
g. Find the names of all people who frequent only pizzerias serving at least one pizza they eat.
h. Find the names of all people who frequent every pizzeria serving at least one pizza they eat.
i. Find the pizzeria serving the cheapest pepperoni pizza. In the case of ties, return all of the cheapest-pep
pizzerias.
Term paper - group Mapping
Group Topic
Transaction model,
1 serializability and lock
base protocols
Dynamic Multilevel
2
Indexes using B tree
Cardinality and keys
3
and E-R diagram
4 Concurrency control
Weak entity and
5
strong entity
Logical
databases, Web
6
databases,
Distributed databases
Relational algebra
7 and Relational
Calculus
Constraints and
8 Anomalies in
designing a Database
Functional
9 dependency and
attribute closure
4NF, 5NF and Multi
valued Dependency,
10
Lossless and lossy
decomposition
Database
11 Languages:DDL,
DML, DCL, TCL, DCL
12 1NF, 2 NF, 3 NF
13 B Tree indexing
14 B+Tree indexing
15 Indexing
2 Phase locking
16
protocal
17 Hashing in DBMS