Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment# 1 1 ) Let R ( A 1 , A 2 , A 3 ) be a relation schema such that: dom ( A

Assignment# 1
1) Let R(A1, A2, A3) be a relation schema such that:
dom(A1)={A,B,C}
dom(A2)={1,2}
dom(A3)={10,20}
1.1 Give an example of a valid 43-tuples relation state. (1 point)
1.2 Give an example of an invalid 33-tuples relation state. (1 point)
2) Consider the following schema and then answer the questions that follow:
EMPLOYEE:
EMP_CODE EMP_LNAME EMP_FNAME EMP_DOB EMP_PHONE EMP_SALARY STORE_CODE
1 Williamson John 12/29/1962(06)434-009525001
2 Ratula Nancy 3/12/1967(02)526-119235002
3 Greenboro Lottie 11/2/1959(03)231-629228002
4 Rumpersto Jennie 4/11/1964(06)224-112229003
5 Smith Robert 12/23/1960(06)599-040630001
6 Jones Rose 9/13/1965(06)111-626225003
7 Rosten Peter 10/25/1965(02)111-113327004
8 Smith Sherry 8/12/1967(02)796-112231001
9 Ron Frank 11/11/1960(03)432-135626502
10 Elain Roberts 2/23/1962(06)732-196728003
STORE:
STORE_CODE STORE_NAME STORE_YTD_SALES REGION_CODE
1 Access Jungle 20,000.651
2 Database Corner 55,000.002
3 PC Master 110,000.443
4 Computer City 82,000.114
REGION:
REGION_CODE REGION_DESCRIPT
1 East
2 West
3 North
4 South
2.1 For the EMPLOYEE relation, give an example of a superkey and an example of a key. (1 point)
2.2 Does the STORE relation satisfy the referential integrity constraint? If No explain why? (1 point)
2.3 Does the REGION relation satisfy the entity integrity constraint? If No explain why? (1 point)
3) Using the COMPANY database state, express the following queries in relational algebra:
2.1 Select all female employees. (0.5 point)
2.2 Select all the employees supervised by the employee whose Social Security Number (SSN) is 333445555.(0.5 point)
2.3 Select all female employees that work in department 5.(0.5 point)
2.4 Select all projects controlled by department 5.(0.5 point)
2.5 Select the dependent name and birth date of all dependents that belong to the employee whose SSN is 333445555.(1 point)
2.6 Produce a relation showing the employee first name, last name, name of his/her dependent, dependents birth date, and relationship to the employee. (1 point)
2.7 Find the first and last name of all non-managers. (1.5 point)
2.8 Use the natural join operation to find the social security number of the employee, the project number he/she works on, and the project name she/she works on.(1.5 point)
4) Draw the intermediate relations R1, R2 and the final RESULT relation produced by the following relational algebra expression: (3 points)
R1 DEPARTMENT PROJECT
Dnumber=Dnum
R2\sigma (R1)
Dname !=Research
RESULT (R2)
Dname, Dnumber, Pname, Pnumber

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago