Retrieve the following information by using a series of relational algebraic operations and also by using relational calculus statement:
Use tables given in fig. 1-2. The relational database notation of
tables is given below:
a. All employee names.
b. All employees working in department number 20.
c. All employees who are making $50,000 or more.
d. All employees who are working in department 20 and also making more
than $25,000.
e. Vendor who supplied parts for the project in Miami during the year
2000.
a. All employee names.
A = EMPLOYEE (Ename)
(r.Ename) : r in EMPLOYEE
b. All employees working in department number 20.
B = Sel (EMPLOYEE : DeptNo = 20)
C = B (Ename)
(r.Ename) : r in EMPLOYEE and r.DeptNo = 20
c. All employees who are making $50,000 or more.
D = Sel (EMPLOYEE : Salary >= 50000)
E = D (Ename, Salary, DeptNo)
(r.Ename, r.Salary, r.DeptNo) : r in EMPLOYEE
and r.Salary >= 50000
d. All employees who are working in department 20 and also making more
than $25,000.
F = Sel (EMPLOYEE : DeptNo = 20 and Salary > 25000)
G = F (Ename, Salary)
(r.Ename, E.Salary) : r in EMPLOYEEand r.DeptNo = 20
and r.Salary > 25000
e. Vendor who supplied parts for the project in Miami during the year
2000.
H = Sel (PROJ2000 : Loc = ‘Miami’)
I = join (H, PRJPARTS : ProjNo = ProjNo)
J = join (I, PARTS : PartNo = PartNo)
K = J (Vendor)
(c.Vendor) : a in PROJ2000 AND b in PRTPARTS
and c in PARTS
and a.ProjNo = b.ProjNo
and b.PartNo = c.PartNo
You might also like to view...
The Graphics class does not include a method for drawing
a) lines b) shapes c) images d) strings e) None of the above
Which widget would you use in a window where you want to give the user a choice between several options but they can only choose one?
What will be an ideal response?
Write a short script that tells you whether the permissions for two files, whose names are given as arguments to the script, are identical. If the per- missions for the two files are identical, output the common permission field. Otherwise, output each filename followed by its permission field. (Hint: Try using the cut utility.)
What will be an ideal response?
A range name
A) is a word or a string of characters that represent one or more cells. B) Indicates a cell's specific location and the reference does not change when you copy the formula. C) indicates a cells relative location from the cell containing the formula. D) creates an Equals (=) sign.