Subido por Ayazhan Baltabaeva

2 DB lab

Anuncio
Answer 1:
1) Π ID,
2) Π ID,
person_name
(σcompany_name = “BigBank” (works))
person_name, city (
employee ⋈(σcompany_name = “BigBank” (works)))
3) Π ID,person_name, street, city (σcompany_name = “BigBank” ∧ salary >
employee)
4) Π ID, person-name (employee⋈works⋈ company)
10000
) ⋈ works ⋈
Answer 2:
1. Π ID,
2. Π
ID,
“BigBank”(works))
(σcompany_name =“BigBank”)(works))
person_name(employee) – Πperson_name
person_name
(σcompany_name
̸≠
Answer 3:
ID
name
dept_name salary
22222 Almaty History
12212 Karina Biology
34452 Crick
History
96000
180000
89000
Insert:
(03659, Ayazhan, IT, 500000)
It is error ,because department table does not have the IT department.
Delete:
(03659, Ayazhan, IT, 500000)
Well delete (IT, Asan ,400000) from department . But , it would give an error
cause instructor’s department referencing to the department with no ‘IT’.
Answer 4: underline primary key
employee (ID, person_name , street , city)
works (ID , person_name , compamy_name ,salary)
company (company_name, city)
Descargar