For each of the following SQL queries, for each relation involved,list the attributes that must be examined to compute the answer. All queries refer to the following relations:Emp(eid: integer, did: integer, sal: integer, hobby: char(20))Dept(did: integer, dname: char(20), floor: integer, budget: real)1. SELECT * FROM Emp E2. SELECT * FROM Emp E, Dept D3. SELECT * FROM Emp E, Dept D WHERE E.did = D.did4. SELECT E.eid, D.dname FROM Emp E, Dept D WHER

Respuesta :

Answer:

1. E.eid ,E.hobby, E.sal, E.did

2.E.eid , E.sal, E.hobby ,E.did , D.did, D.floor ,D.dname , D.budget.

3.E.eid , E.sal, E.hobby ,E.did , D.did, D.floor ,D.dname , D.budget.

4.E.eid , D.dname

Explanation:

The attributes that are examined for the query are the attributes of the table that are mentioned in the select statement and where clause.

So according to first query we are working on all attribues of Emp table so all of the attributes of Emp table are examined.In second query we selecting all attributes of both the tables hence all attributes of both the table and same in the next query.

In fourth query though the query is not complete where clause is missing but we have eid from Emp and dname from Dept tables for sure and the attributes mentioned in where clause will also be present.

ACCESS MORE
EDU ACCESS
Universidad de Mexico