31.07.2013 Views

Relational Model Introduction - E-Courses

Relational Model Introduction - E-Courses

Relational Model Introduction - E-Courses

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Foreign Key – Examples(2/2)<br />

It is possible for a foreign key in a relation<br />

to refer to the primary key of the relation itself<br />

An Example:<br />

univEmployee ( empNo, name, sex, salary, dept, reportsTo)<br />

reportsTo is a foreign key referring to empNo of the same relation<br />

Every employee in the university reports to some other<br />

employee for administrative purposes<br />

- except the vice-chancellor, of course!<br />

Prof P Sreenivasa Kumar<br />

Department of CS&E, IITM<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!