Consider the following relations EMP (EID #: int, ENAME: char (50), ESALARY: real, DID: int) DEP (DID #: int, DNAME: char (20), DLOCATION: char (30)) which are located at the nodes T1, T2, respectively. Each integer (int) has size 4 bytes each actual (real) 8 bytes, and each character (char) 1 byte. OR relation EMP has 5 entries with keys EID1 DID1, EID2 DID1, EID3 DID3, EID4 DID3, EID5 DID3. The relationship DEP has 6 entries with keys DID1 ATHENS, DID2 ROME, DID3 ATHENS, DID4 PARIS, DID5 MUNICH, DID6 LONDON. Let\'s say that transport costs are equal to the size of the transferred data. 1) Determine the optimal plan and the execution cost Question EMP JOIN DLOCATION = \"ATHENS\" DEP to have the result at junction T3. 2) Find the optimal plan and costs for executing the query EMP JOIN DEP to have the result at node T3. Solution Assuming that your structure would be as follows presenting the query as below, It would be better if you could mention your table structures a bit more clearly about the entries of DEP.Here, Declare the two table EMP,DEP with there corresponding entries. DECLARE @Emp TABLE(EID int, ENAME Varchar(50), ESALARY real, DID int ) DECLARE @Dep TABLE(DID int, DNAME Varchar(50), DLOCATION Varchar(30) ) INSERT INTO @Emp(EID, DID) VALUES ((EID1, DID1),(EID2, DID2), (EID3, DID3), (EID4, DID3), (EID5, DID3)) INSERT INTO @Dep ((DID1, ATHENS), (DID2, ROME), (DID3, ATHENS), (DID4, PARIS), (DID5, MUNICH), (DID6, LONDON)) SELECT * FROM @Emp SELECT * FROM @Dep /* Query to print results as EMP, DLOCATION */ SELECT em.eid,e1.edid as DID,e2.edlocation as DLOCATION FROM @DEP JOIN @Emp e1 ON em.eid=e1.eid JOIN @Emp e2 ON em.dloaction=e2.eid above query explains the insertion of the EMP entries and afterwards DEP entries. JOIN keyword merge/join the query which will be shoe the in the located node. .