# 22 - the names of those students who should be considered for a prize and so we select those candidates who got A in the exam Starting from the

This preview shows page 1. Sign up to view the full content.

We might wish to modify Student Exam by hiding the number informa- tion to get a new relation Results . This can be done by the operation projec- tion , to yield the following result: name address grade . . . . . . . . . Brown, B 5 Lawn Rd. A Smith, J 9 Elm St. A Walker, S 4 Ash Gr. C . . . . . . . . . In our logical notation, we may write: Results (n,a,g) if and only if no. Student Name (n,a,no,g) In database notation, this would be written in the style project Student Exam over ( name , address , grade ) Notice that Results is obtained from Student and Exam by a sort of gen- eralised composition. In fact, composition of binary relations can be con- structed by a join followed by a projection. Another operation we might wish to do is to select a part of a relation table which is of interest. Suppose in our registry example we wish to have
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the names of those students who should be considered for a prize, and so we select those candidates who got A in the exam. Starting from the relation Results , we obtain a relation A-Results : name address grade . . . . . . . . . Brown, B 5 Lawn Rd. A Smith, J 9 Elm St. A . . . . . . . . . In logical notation, we could write A-Results (n,a,g) if and only if Results (n,a,g) g = A In database notation we have select results where grade = A The relation A-Results gives us the names we want, but we could reduce further to get the relation PrizeCands with the single attribute: 23...
View Full Document

## This note was uploaded on 01/02/2010 for the course MATH Math2009 taught by Professor Koskesh during the Spring '09 term at SUNY Empire State.

Ask a homework question - tutors are online