Excellent, The relational algebra expression σ 1=1 (INSTRUCTOR) is equivalent to σ True(INSTRUCTOR). Since the condition 1=1 is always true, the Selection operator returns all tuples in the INSTRUCTOR table 1.
in the second question, what if σ Salary > 50000 ^ Salary < 75000 (INSTRUCTOR) it's between 50000 and 75000, does it need to be "Salary ≥ 50000 ^ Salary ≤ 75000"🤔 Tell me if I'm wrong
@@kharris274 yeah I know, but in the question it doesn't mention that it should include 50000 and 75000. it says 'salary between 50K and 75K'. If you got this question for an exam or something, What should be the correct answer🤔🤔 these kind of questions confuses me
The relational algebra expression σ 1=1 (INSTRUCTOR) is equivalent to σ True(INSTRUCTOR). Since the condition 1=1 is always true, the Selection operator returns all tuples in the INSTRUCTOR table 1.
For q3, you can just use a tautology (a condition that is always true) instead of using id. It would look something like this: select 1=1 (INSTRUCTOR). Using id is a bit finicky because we don't know if it is a string, a number and if it is, can it be negative etc.
for no.3 we can also use this long way which i think is easy to understand but exhausting SELECT Dept_Name = "Biology" OR Dept_Name = "Computer Science" OR Dept_Name = "Electrical" OR Dept_Name = "Finance" OR Dept_Name = "Music" OR Dept_Name = "History".
I would argue that for question 3 you can simply write INSTRUCTOR (just the relation basically) which would output all of the rows and columns in the relation. I don't think it's necessary to use Selection for this one.
I wish it explained what relations are as well. so far, I know tuples, and tables are related to relations. In database theory, a relation, as originally defined by E. F. Codd,[1] is a set of tuples (d1, d2, ..., dn), where each element dj is a member of Dj, a data domain a tuple is a set of attribute values in which no two distinct elements have the same name In SQL, a database language for relational databases, relations are represented by tables, where each row of a table represents a single tuple, and where the values of each attribute form a column.
Because i'm confused.. How can we describe this SQL to Relational algebra? SELECT a.name,a.surname,b.LessonCode FROM student AS a LEFT JOIN StudentInLesson AS b ON a.ID=b.StudentID WHERE b.LessonCode=104;
Solution:
1. σ Salary > 60000 (INSTRUCTOR)
2. σ Salary ≥ 50000 ^ Salary ≤ 75000 (INSTRUCTOR)
3. σ 1=1 (INSTRUCTOR)
Excellent, The relational algebra expression σ 1=1 (INSTRUCTOR) is equivalent to σ True(INSTRUCTOR). Since the condition 1=1 is always true, the Selection operator returns all tuples in the INSTRUCTOR table 1.
@@HugeCraziness Thank you for the explanation!!
in the second question, what if
σ Salary > 50000 ^ Salary < 75000 (INSTRUCTOR)
it's between 50000 and 75000, does it need to be "Salary ≥ 50000 ^ Salary ≤ 75000"🤔 Tell me if I'm wrong
@@VimuThe5ifer then the "Salary = 50000" and "Salary = 75000" won't be included
@@kharris274 yeah I know, but in the question it doesn't mention that it should include 50000 and 75000. it says 'salary between 50K and 75K'. If you got this question for an exam or something, What should be the correct answer🤔🤔 these kind of questions confuses me
The relational algebra expression σ 1=1 (INSTRUCTOR) is equivalent to σ True(INSTRUCTOR). Since the condition 1=1 is always true, the Selection operator returns all tuples in the INSTRUCTOR table 1.
σ 1=1 (INSTRUCTOR) how?
@@vaaipuillaraja3131 we deal with the subscript as a boolean condition whether it was about attributes in the relation or any other thing
@@opengl-ve1bv Thank you
1. sigma salary>60000(INSTRUCTOR)
2. sigma salary >=50000 AND salary 1(INSTRUCTOR)
select Salary > 60000 (Instructor) , select Salary >= 50000 ^ Salary = 1 (Instructor)
Wrong 1st me gretaer than equL to nhi likha h then why u written here >=
Greater than means use bada naki uske equL
1:39 1:39 1:39
youre a better instructor than my instructor
1.Salary>60000(INSTRUCTOR)
2.50000
I was preparing all summer for these exams . I hope it goes well .
For q3, you can just use a tautology (a condition that is always true) instead of using id. It would look something like this: select 1=1 (INSTRUCTOR). Using id is a bit finicky because we don't know if it is a string, a number and if it is, can it be negative etc.
Noice.
Nice answer for Q3
Oh nice
1. SELECT Salary > 60,000 (Instructor)
2. SELECT Salary > 50,000 AND Salary < 75,000 (Instructor)
3. SELECT ID > 0 (Instructor)
3. SELECT (Instructor) //Not work coz no condition here
for no.3 we can also use this long way which i think is easy to understand but exhausting
SELECT Dept_Name = "Biology" OR Dept_Name = "Computer Science" OR Dept_Name = "Electrical" OR Dept_Name = "Finance" OR Dept_Name = "Music" OR Dept_Name = "History".
can t we use -
select true (instractor)
My solution for the last one: σ name != null (INSTRUCTOR)
15:51 Q3 σ ID=¬NULL (INSTRUCTOR) is this correct?
Thanks a lot, this video has incredibly helped me a lot, you're legend man
great video!
very helpful , thanks brah
Superb Explanation 👌
Superb class 👏👍
you are amazing. thank you so much!
1) σ Salary>60000(INSTRUCTOR)
2) σ Salary>=50000 ^ Salary
Q3: select id≠0 (INSTRUCTOR)
awesome 🤩
Thank you!
Super explanation 👍
question 3 condition is id != null
σ salary>60000 (INSTRUCTOR)
2. σ salary >=50000 ^ salary 1 (INSTRUCTOR)
Superb ✌️
You Are Goated TY
good videos
great work, butit would be awesome if you provided footprints of every course in pdf
1. σ Salary >60000(INSTRUCTOR)
2. σ Salary>=50000 AND Salary
Please cover dbms quicker so that it can be useful for exams
1.sigma salary>60000(INSTRUCTOR)
2.sigma salary=50000 or salary=75000(INSTRUCTOR)
3.sigma id>10000(INSTRUCTOR)
THANK U SM
you are my legend
I would argue that for question 3 you can simply write INSTRUCTOR (just the relation basically) which would output all of the rows and columns in the relation. I don't think it's necessary to use Selection for this one.
so if i write
for eg find 2=1 its not goint to give me any tuples?
3) π ID,Name,Dept_Name,Salary (INSTRUCTOR) is this correct?
select ID not equal to zero(Instructor) because ID never can be zero.
ID is always in string. So we can not compare it with an integer value
I didn't understand the 3rd question(home work)... can someone explain?
What if someone talks about solving using sql is it tge same thing?
INSTRUCTOR
OR
Sigma ID > 0(INSTRUCTOR)
Can I get fuel?
σ true (INSTRUCTOR)
I don't understand question number 3.
σ TRUE(INSTRUCTOR) is this correct for ques 3
I wish it explained what relations are as well. so far, I know tuples, and tables are related to relations.
In database theory, a relation, as originally defined by E. F. Codd,[1] is a set of tuples (d1, d2, ..., dn), where each element dj is a member of Dj, a data domain
a tuple is a set of attribute values in which no two distinct elements have the same name
In SQL, a database language for relational databases, relations are represented by tables, where each row of a table represents a single tuple, and where the values of each attribute form a column.
Because i'm confused.. How can we describe this SQL to Relational algebra?
SELECT a.name,a.surname,b.LessonCode FROM student AS a LEFT JOIN StudentInLesson AS b ON a.ID=b.StudentID WHERE b.LessonCode=104;
1. Select Salary > 60000 (INSTRUCTOR)
2. Select Salary > 50000 ^ Salary < 75000(INSTRUCTOR)
3. Select ID > 1 (INSTRUCTOR)
Select = salary > 60000(INSTRUCTOR)
Q2= Select = salary >50000 and salary
I did the same thing.
how about Q3 dude?
what can we write in the condition if we need to select all entries in a relation..???
Select= ID>0 ( INSTRUCTOR)……..3rd question ans😊
@@pravindhotre6405 many thanks pravin!