1 / 1

PNO

Example. Schema : Employee (ENO, ENAME, TITLE) Works_On (ENO, PNO, RESP, DUR) Project (PNO, PNAME) Query : “Find the names of employees other than J. John who worked on the CAD/CAM project for either one or two years”. The SQL expression : SELECT ENAME

abeni
Download Presentation

PNO

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Example Schema: Employee (ENO, ENAME, TITLE) Works_On (ENO, PNO, RESP, DUR) Project (PNO, PNAME) Query: “Find the names of employees other than J. John who worked on the CAD/CAM project for either one or two years”. The SQL expression: SELECT ENAME FROM Project, Employee, Works_On WHERE Works_On.ENO = Employee.ENO AND Works_On.PNO = Project.PNO AND Employee.ENAME  ‘J. John’ AND Project.PNAME = ‘CAD/CAM’ AND (Project.DUR = 12 OR Project.DUR = 24) Project Select PNO Join ENO Project Works-On Employee Figure 1: Operator Tree PNO ENO Project Works-On Employee Employee Project Works-On Figure 2: Another Operator Tree Figure 3: Operator Tree after applying the restrictions

More Related