Question

In: Advanced Math

Given the below relational algebra expressions, use domain and tuple relational calculus to specify them: a....

Given the below relational algebra expressions, use domain and tuple relational calculus to specify them:

a. σx=z ( R(a,b,c) )


b. πx,y ( R(x,y,z) )


c. R(x, y) / S(x)


d. R(a,b,c) ∪  S(a,b,c)

e. R(a,b,c) – S(a,b,c)


f. R(d,e,f) ∩ S(d,e,f)


g. R(x,y,z) × S(f,g,t)

Solutions

Expert Solution

In Data Base Management System:

(a) σx=z ( R(a,b,c) ):

is the select operator, where:

Therefore, σx=z ( R(a,b,c) ) implies:

Select the tuple R(a,b,c) where x=z

(b) πx,y ( R(x,y,z) ):

is the project operator, where:

Therefore πx,y ( R(x,y,z) ) implies:

From a database take the columns x and y

(c) R(x, y) / S(x):

The division operator works as follows:

R(Z) / S(X), where . Let Y = Z - X (and hence Z
= X Y); that is, let Y be the set of attributes of R that are
not attributes of S.

Therefore R(x,y)/S(x) implies:


Where, T<-R(A,B)/S(A)

(d)R(a,b,c) ∪  S(a,b,c):

The result of , is a relation that includes all tuples that are either in R or in S or in both R and S

Duplicate tuples are eliminated

(e)R(a,b,c) - S(a,b,c):

The result of , is a relation that includes all tuples that are in R but not in S.

The attribute names in the result will be the same as the attribute names in R.

(f) R(d,e,f) ∩ S(d,e,f):

The result of the operation , is a relation that includes all tuples that are in both R and S

The attribute names in the result will be the same as the attribute names in R

(g) R(x,y,z) × S(f,g,t):

This operation is used to combine tuples from two relations in a combinatorial fashion.

Denoted by R(A1, A2, . . ., An) x S(B1, B2, . . ., Bm), The result is a relation Q with degree n + m attributes: Q(A1, A2, . . ., An, B1, B2, . . ., Bm), in that order.

Hence, if R has tuples (denoted as |R| = ), and S has tuples, then R x S will have tuples.


Related Solutions

Give the tuple calculus expressions for each using the below schema: Make a database up if...
Give the tuple calculus expressions for each using the below schema: Make a database up if needed SPERSON(EmpID, Name, Dept) TRIP(TripID, EmpID, ToCity, StartDate, EndDate) EXPENSE(ExpID, TripID, AccountID, Amount) a) List the names and employee ID of a salesperson. b) List employee ID and employee names that took a trip(s) to New York city. c) List the names of all employees who have spent more than $700 on their trip. d) List employees' names and their IDs that have never...
Use tuple relational calculus for the following problems Relational Model Motel(mID, mName, city) Guest(gNum, gName, gAddress)...
Use tuple relational calculus for the following problems Relational Model Motel(mID, mName, city) Guest(gNum, gName, gAddress) Room(mID, roomNum, price) Books(gId, mId, roomNum, startDate, endDate) 1. a)Select motels with at least 1 room with price > $500. b) Select the motel that has the most inexpensive room. c) Select guests who've booked a room in every motel.
1. Use Boolean algebra to simplify the following Boolean expressions to expressions containing a minimum number...
1. Use Boolean algebra to simplify the following Boolean expressions to expressions containing a minimum number of literals: (a) A’C’ + A’BC + B’C (b) (A + B + C)’(ABC)’ (c) ABC’ + AC (d) A’B’D + A’C’D + BD (e) (A’ + B)’(A’ + C’)’(AB’C)’ (f) (AE + A’B’)(C’D’ + CD) + (AC)’ 2. Obtain the truth table of the function F = (AB + C)(B + AC), express the function F in sum-of-minterms and product-of-maxterms forms, and express...
Write the following questions as queries in RELATIONAL ALGEBRA. Use only the operators discussed in class...
Write the following questions as queries in RELATIONAL ALGEBRA. Use only the operators discussed in class (select, project, Cartesian product, join, union, intersection, set difference and renaming). The following database schema is given: ATHLETE(name,age,height,weight,country) RACE(id,location,date,time-start,distance) COMPETES(aname,rid,time,position) where ATHLETE has information about runners (their name, age, height, weight, and nationality); RACE has information about races (id, location, date when it’s held, time it starts, and distance ran); and COMPETES keeps track of which runners run on with race, the time it...
Write the following questions as queries in Relational Algebra. Use only the operators discussed in class...
Write the following questions as queries in Relational Algebra. Use only the operators discussed in class (select, project, Cartesian product, join, union, intersection, set difference and renaming —in particular, no outer joins or aggregations). Type your answers. If you can’t find Greek letters in your word processor, you can simply write out the operator, all uppercase (i.e. ’SELECT’). Please use renaming consistently, as indicated in the handout. Before starting, make sure you understand the schema of the database. If you...
Differential Geometry (Mixed Use of Vector Calculus & Linear Algebra) 1A. Prove that if p=(x,y) is...
Differential Geometry (Mixed Use of Vector Calculus & Linear Algebra) 1A. Prove that if p=(x,y) is in the set where y<x and if r=distance from p to the line y=x then the ball about p of radius r does not intersect with the line y=x. 1B. Prove that the set where y<c is an open set.
In this assignment, we will explore some simple expressions and evaluate them. We will use an...
In this assignment, we will explore some simple expressions and evaluate them. We will use an unconventional approach and severely limit the expressions. The focus will be on operator precedence. The only operators we support are logical or (|), logical and (&), less than (<), equal to (=), greater than (>), add (+), subtract (-), multiply (*) and divide (/). Each has a precedence level from 1 to 5 where higher precedence operators are evaluated first, from left-to-right. For example,...
Consider the relational schemas given below and the respective sets of functional dependencies valid in the...
Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas. For each one of the relational schemas identify its highest normal form. Remember that the identification of a normal form requires analysis of the valid functional dependencies and the minimal keys. Provide justification of each answer. A solution with no comprehensive justification scores no marks. (iv) When a staff is required to undertake an inspection of properties, the staff is allocated a company...
A sample of human brain volumes is given below. Use the given data values to determine...
A sample of human brain volumes is given below. Use the given data values to determine if the sample form a population what is normally distributed (round the final answer to two decimal places). 1131 1131 1254 1089 1065 1016 1068 1199 Please show work thank you.
A sample of human brain volumes ​(cm3​) is given below. Use the given data values to...
A sample of human brain volumes ​(cm3​) is given below. Use the given data values to identify the corresponding z scores that are used for a normal quantile​ plot, then identify the coordinates of each point in the normal quantile plot. Construct the normal quantile​ plot, then determine whether the data appear to be from a population with a normal distribution. 1045 1417 1042 1079 1077 1079 1062 961 List the z scores for the normal quantile plot.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT