Question: Consider the following relational database schema, which describes information about shares that can be owned by employees of companies. Specifically, the database schema consists of:
Consider the following relational database schema, which describes information about shares that can
be owned by employees of companies. Specifically, the database schema consists of: a the relational
schema Employee, in which the attribute cid is a foreign key to the relational schema Company, and
the managerid, which is a foreign key in the same schema, ie Employees; eid is the primary key of
Employees b the relational schema Company that holds information about companies, in which the
primary key is cid, and c the relational schema Shares that stores information about employees that
have shares of companies, as well as the number of these shares, sharenum; eid in Shares is a foreign
key to Employees, and cid in Shares is a foreign key to Company.
Employeeeid cid, salary, managerid
Company cid companyname, location
Shareseid cid, sharenum
Express in relational algebra the following queries:
A Find the eid of employees of the company named 'Google' that have more than shares
of the company named 'Facebook'.
B Find the eid of employees, the managers of whom have shares in the company that the
former ie the employees work for.
C Find the eid of employees that have shares from at least different companies.
D Find the employees that have shares from all the companies stored in the database.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
