The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
239 views

What is the difference between the following two expressions, conceptually and  in terms of relational algebra ?

1. names of girl students with more marks than some boy student
2. names of girl students with marks not less than some boy students

Can someone please give an example to illustrate the difference.

in Databases by Active (1.2k points) | 239 views

3 Answers

+1 vote
Just resolve the sentence using discrete maths...

x: Girl student

y: Boy student

f(z): marks of student z

then 1- {x|∃y(f(x)>f(y)}

2- {x|∄y(f(x)<f(y)}

thus the first query means select the girl whose mark is greater than any one of the the boy student( it has to be greater than minimum of the marks of boy students)

and second query means to select the girl whose marks are not less than any boy student (i.e. on negation it becomes that girls marks are greater than every boy student) thus the marks of girl should be greater than maximum marks of the boy students.
by Active (1.7k points)
0 votes
1ST MEANS name of those girls whose marks is more than at least one boy

2nd means name of those girls whose marks is not less than at least one boy.

both  are same  i guess  but 2nd can be more or equal marks . tat is  the difference  

relational algebra depends on the reltional schema
by Junior (757 points)
0
short and sweet answer
0 votes
after reading first two statement  
we can say both statements are same  , statement 2 is indirectly equal to first statement .
by Boss (19.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,830 questions
54,807 answers
189,530 comments
80,835 users