Relational Algebra (Select Operation)

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии • 78

  • @ismailfaridi
    @ismailfaridi Год назад +158

    Solution:
    1. σ Salary > 60000 (INSTRUCTOR)
    2. σ Salary ≥ 50000 ^ Salary ≤ 75000 (INSTRUCTOR)
    3. σ 1=1 (INSTRUCTOR)

    • @HugeCraziness
      @HugeCraziness 11 месяцев назад +44

      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.

    • @nigelthornberry007
      @nigelthornberry007 11 месяцев назад +5

      @@HugeCraziness Thank you for the explanation!!

    • @VimuThe5ifer
      @VimuThe5ifer 10 месяцев назад +10

      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
      @kharris274 10 месяцев назад +2

      @@VimuThe5ifer then the "Salary = 50000" and "Salary = 75000" won't be included

    • @VimuThe5ifer
      @VimuThe5ifer 10 месяцев назад +4

      @@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

  • @HugeCraziness
    @HugeCraziness 11 месяцев назад +23

    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.

    • @vaaipuillaraja3131
      @vaaipuillaraja3131 10 месяцев назад

      σ 1=1 (INSTRUCTOR) how?

    • @opengl-ve1bv
      @opengl-ve1bv 7 месяцев назад +1

      @@vaaipuillaraja3131 we deal with the subscript as a boolean condition whether it was about attributes in the relation or any other thing

    • @vaaipuillaraja3131
      @vaaipuillaraja3131 7 месяцев назад +1

      @@opengl-ve1bv Thank you

  • @VedangRaul
    @VedangRaul 9 месяцев назад +17

    1. sigma salary>60000(INSTRUCTOR)
    2. sigma salary >=50000 AND salary 1(INSTRUCTOR)

  • @AosrtyAosrty
    @AosrtyAosrty Год назад +74

    select Salary > 60000 (Instructor) , select Salary >= 50000 ^ Salary = 1 (Instructor)

    • @hecticgamings
      @hecticgamings 9 месяцев назад +1

      Wrong 1st me gretaer than equL to nhi likha h then why u written here >=

    • @hecticgamings
      @hecticgamings 9 месяцев назад +2

      Greater than means use bada naki uske equL

    • @archanavr8974
      @archanavr8974 9 месяцев назад

      1:39 1:39 1:39

  • @iamsherk2605
    @iamsherk2605 Год назад +4

    youre a better instructor than my instructor

  • @jeevar5424
    @jeevar5424 3 месяца назад +2

    1.Salary>60000(INSTRUCTOR)
    2.50000

  • @reviver_z
    @reviver_z Год назад +7

    I was preparing all summer for these exams . I hope it goes well .

  • @sttaseen5106
    @sttaseen5106 Год назад +20

    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.

  • @reverbism
    @reverbism 2 года назад +19

    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

    • @hbfl3x50
      @hbfl3x50 Год назад +2

      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".

    • @Ena_aysha
      @Ena_aysha Год назад

      can t we use -
      select true (instractor)

  • @diegoortega2374
    @diegoortega2374 7 месяцев назад +5

    My solution for the last one: σ name != null (INSTRUCTOR)

  • @clipstv6229
    @clipstv6229 Год назад +8

    15:51 Q3 σ ID=¬NULL (INSTRUCTOR) is this correct?

  • @jokishwieu1641
    @jokishwieu1641 Год назад +5

    Thanks a lot, this video has incredibly helped me a lot, you're legend man

  • @Robert-gr1cl
    @Robert-gr1cl 22 дня назад

    great video!

  • @dilshodusmanov1458
    @dilshodusmanov1458 23 дня назад

    very helpful , thanks brah

  • @shailendra_25
    @shailendra_25 Год назад +1

    Superb Explanation 👌

  • @kumarakalvamanjunath8353
    @kumarakalvamanjunath8353 2 года назад +2

    Superb class 👏👍

  • @katharinast06
    @katharinast06 Год назад +1

    you are amazing. thank you so much!

  • @NaveenSaiCremsiYadlapalli
    @NaveenSaiCremsiYadlapalli 4 месяца назад +1

    1) σ Salary>60000(INSTRUCTOR)
    2) σ Salary>=50000 ^ Salary

  • @aimanmehar9580
    @aimanmehar9580 Год назад +5

    Q3: select id≠0 (INSTRUCTOR)

  • @xMichi7
    @xMichi7 8 месяцев назад +1

    Thank you!

  • @jaganaanusha2001
    @jaganaanusha2001 2 года назад +2

    Super explanation 👍

  • @AbhishekLamba-yd3dq
    @AbhishekLamba-yd3dq Год назад +3

    question 3 condition is id != null

  • @olukayodepaul7070
    @olukayodepaul7070 7 месяцев назад

    σ salary>60000 (INSTRUCTOR)
    2. σ salary >=50000 ^ salary 1 (INSTRUCTOR)

  • @v.balajisai424
    @v.balajisai424 2 года назад +1

    Superb ✌️

  • @marshmelon7070
    @marshmelon7070 2 месяца назад

    You Are Goated TY

  • @geekdiver
    @geekdiver 2 месяца назад

    good videos

  • @patronerox
    @patronerox Год назад

    great work, butit would be awesome if you provided footprints of every course in pdf

  • @yabon87
    @yabon87 7 месяцев назад

    1. σ Salary >60000(INSTRUCTOR)
    2. σ Salary>=50000 AND Salary

  • @rheniuspaul389
    @rheniuspaul389 2 года назад +5

    Please cover dbms quicker so that it can be useful for exams

  • @ENagamani-yl1ub
    @ENagamani-yl1ub 4 месяца назад

    1.sigma salary>60000(INSTRUCTOR)
    2.sigma salary=50000 or salary=75000(INSTRUCTOR)
    3.sigma id>10000(INSTRUCTOR)

  • @jilyanzmeigh9132
    @jilyanzmeigh9132 9 месяцев назад

    THANK U SM

  • @rayyao9941
    @rayyao9941 10 месяцев назад

    you are my legend

  • @kamenpetkov8179
    @kamenpetkov8179 10 месяцев назад +1

    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.

  • @RedionMeta-n5r
    @RedionMeta-n5r 28 дней назад

    so if i write
    for eg find 2=1 its not goint to give me any tuples?

  • @Adrita-b4r
    @Adrita-b4r 2 месяца назад

    3) π ID,Name,Dept_Name,Salary (INSTRUCTOR) is this correct?

  • @custompixel3364
    @custompixel3364 11 месяцев назад +1

    select ID not equal to zero(Instructor) because ID never can be zero.

    • @theamazingtutorial.9019
      @theamazingtutorial.9019 10 месяцев назад

      ID is always in string. So we can not compare it with an integer value

  • @abdutruth548
    @abdutruth548 3 дня назад

    I didn't understand the 3rd question(home work)... can someone explain?

  • @ernestkeya-sq4sh
    @ernestkeya-sq4sh 7 месяцев назад

    What if someone talks about solving using sql is it tge same thing?

  • @SHIVESHKUMAR-q7i
    @SHIVESHKUMAR-q7i 4 месяца назад

    INSTRUCTOR
    OR
    Sigma ID > 0(INSTRUCTOR)

  • @vishalsisodiya28
    @vishalsisodiya28 2 года назад +2

    Can I get fuel?

  • @ummeed8821
    @ummeed8821 Год назад +1

    σ true (INSTRUCTOR)

  • @sophanithphon
    @sophanithphon Год назад +1

    I don't understand question number 3.

  • @PraisySanthaMalarP
    @PraisySanthaMalarP 3 месяца назад

    σ TRUE(INSTRUCTOR) is this correct for ques 3

  • @pibob7880
    @pibob7880 Год назад +1

    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.

  • @reviver_z
    @reviver_z Год назад

    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;

  • @frederickteye
    @frederickteye 9 месяцев назад

    1. Select Salary > 60000 (INSTRUCTOR)
    2. Select Salary > 50000 ^ Salary < 75000(INSTRUCTOR)
    3. Select ID > 1 (INSTRUCTOR)

  • @sarveshkilje405
    @sarveshkilje405 2 года назад +7

    Select = salary > 60000(INSTRUCTOR)
    Q2= Select = salary >50000 and salary

    • @tubakzgn1102
      @tubakzgn1102 2 года назад

      I did the same thing.

    • @Patrick-hb9dbj
      @Patrick-hb9dbj 2 года назад

      how about Q3 dude?

    • @Patrick-hb9dbj
      @Patrick-hb9dbj 2 года назад

      what can we write in the condition if we need to select all entries in a relation..???

    • @pravindhotre6405
      @pravindhotre6405 2 года назад +3

      Select= ID>0 ( INSTRUCTOR)……..3rd question ans😊

    • @Patrick-hb9dbj
      @Patrick-hb9dbj 2 года назад

      @@pravindhotre6405 many thanks pravin!