Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Let R(D,E,F) be a relational schema. Determine for each of the following equalit

ID: 3677828 • Letter: L

Question

Let R(D,E,F) be a relational schema. Determine for each of the following equalities whether both sides have the same result. Justify the reply. i. _D,E(SIGMA_(D) 10 AND F=7)(_D,E,F (SIGMA_D > 15 (R)))) = _D,E(sigma_(D> 15 AND F=7)(R)) ii. _D,E(sigma_(D> 10 OR F=7)(_D,E,F (sigma_D> 15 (R)))) = _D,E(sigma_(D> 15 OR F=7) (R)) 2. Consider the following relational schema; the schema describes a database containing data about theses carried out by students of a master degree. Theses have supervisors and co-supervisors. The underlined attributes denote the primary keys of the relations. Students(S#, FName, LName, Street, City, Phone#) Theses(T#, Title,Topic,Profit, S#,Evaluation) Professors(Prof#, LName, Rank,Phone#, Dept#) Theses-Co-Supervisors(T#,Prof#) a. Determine for each relation, the foreign keys. b. Based on the primary and foreign keys of the relations, answer the following questions (justify your answers): Can a professor supervise more than one thesis? Can a thesis have multiple supervisors? Can a thesis have multiple co-supervisors? 3. Consider the relational schema in question (2) above. Discuss if and when _titleTheses _title(Theses Theses-Co-Supervisors) 4. Express the following queries in relational algebra a. Determine the topic of the thesis by student Bob Rossi. b. Determine the name of the co-supervisor(s) of the thesis by student Bob Rossi. c. Determine if there is any professor that has supervised no thesis.

Explanation / Answer

1)

SELECT

The SELECT opeartor is (sigma) symbol and used as an expression to choose tuples that meet the selection condition…

<Selection condition>(R)

PROJECT

The PROJECT operator in RA is (pi) symbol used to choose attributes from a relation.

<attribute list>(R )

i. In the given relation, there are two parts. Right Hand Side Expression and Left Hand Side expression.

In the L.H.S first select the values of D, E, F where D>15 and it is the input to the remaining part of the relation. The R.H.S is the relation in a single expression i.e D>15 AND F=7. Both L.H.S and R.H.S produce the same results.

ii. In the L.H.S first select the values of D, E, F where D>15 and it is the input to the remaining part of the relation. The R.H.S is the relation in a single expression i.e D>15 OR F=7. Both L.H.S and R.H.S produce the same results.

2)

i.

S# is the Primary Key in Student table and Foreign key in These table.

T# is the Primary key in These table and Foreign key in Theses-Co-Supervisors table.

Prof# is the Primary key in Professor table and Foreign key in Theses-Co-Supervisors table.

ii.

Prof# is the Primary key in Professor table and Foreign key in Theses-Co-Supervisors table.

T# is the Primary key in These table and Foreign key in Theses-Co-Supervisors table.

Therefore it may be possible to handle multiple theses by professors.

Every theses have professor but not multiple professors.

Theses does not have multiple Co-supervisors.

3)

Joins are used to join the tables depends on the given condition.

The given relation is true when the Thesis handles multiple Supervisors. Other wise both relations are equal.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote