Self Studies

Databases Test ...

TIME LEFT -
  • Question 1
    1 / -0

    Which of the following expressions should be used to find the name and address of all students who study in the ‘Science’ department?

    The relational schemas are:

    Student(Sno, name, address, age)

    Department(Dno, Dname, Snumber, building)

  • Question 2
    1 / -0

    Consider a database that has the relation schema Random(A, B, C). An instance of the schema Random is as given below.

    A

    B

    C

    10

    10

    7

    10

    7

    10

    7

    10

    7

    10

    7

    7

    10

    13

    7

    13

    10

    7

    10

    7

    13

    10

    2

    7

     

    Tuple calculus expression for the above instance is given as  {t.B | t ϵ r ∧ (t[A] = 10  ∧ t[C] = 7)}

    What is the sum of the elements in the output row of the given expression?

  • Question 3
    1 / -0

    Which of the following has the same expressive power with regard to relational query language?

    (a) Relational algebra and Domain relational calculus

    (b) Relational algebra and Tuple relational calculus

    (c) Relational algebra and Domain relational calculus restricted to safe expression

    (d) Relational algebra and Tuple relational calculus restricted to safe expression

  • Question 4
    1 / -0

    Let the database has two relations P(a, b) and Q(m, a, n) in which a is the primary key of the relation P and m is the primary of the relation Q. Instance of P has 70 Tuples and Instance of Q has 42. What is the maximum number of rows in the new instance produced by P ⨝ Q? (⨝ is natural join)

  • Question 5
    1 / -0

    Consider the following relation Demo:

    IDnamesalary
    1A65000
    2B90000
    3C40000
    4D95000
    5E60000
    6F87000
    7G75000
    8H62000
    9I80000
    10J72000
    11K92000
    12L80000

     

    The number of tuples returned for the query \(Π_{salary} (Demo)-Π_{Demo.salary} (σ_{Demo.salary<d.salary} (Demo×ρ_d (Demo)))\) is ____.

  • Question 6
    1 / -0

    Let the two-relation schema be R (A, B,) and S (A, B). which of the following is equivalent to R ∩ S

    I. R – (R – S)

    II. S – (S – R)

    III. R U S – ((S – R) – (R – S))

    IV. ((R U S – (S – R)) – (R – S)

  • Question 7
    1 / -0

    Consider the following relational schema for Employees (SME):

    Test ID

    TestSeries Name

    SME Age

    Ratings

    1

    GATE CS

    25

    9.5

    2

    GATE ME

    29

    9.6

    3

    GATE EE

    28

    9.3

    4

    RRB JE IT

    26

    9.0

    5

    RRB JE ME

    24

    9.1

    6

    RRB JE EE

    20

    9.2

    7

    ESE EC

    22

    8.9

    8

    ESE CE

    23

    9.3

    9

    SSC CGL

    31

    9.6

    10

    CIL Systems

    28

    9.4

    11TET259.2

    The following query is made on the database.

    D1 → \({{\rm{\Pi }}_{Test \;ID,\; TestSeries\;Name}}\left( {{\sigma _{SME\;age > 23 \wedge SME\; age < 26}}\left( {SME} \right)} \right)\)

    D2 → \({{\rm{\Pi }}_{Test\;ID,TestSeries\;Name}}\left( {{\sigma _{Ratings > 9.1 \wedge Ratings < 9.4}}\left( {SME} \right)} \right)\)

    D → D2 - D1

    The total no. of rows in D is ______. 

  • Question 8
    1 / -0

    Consider the following relation schema

    Sailors(sid, sname, rating, age)

    Reserve(sid, bid, day)

    Boats(bid, bname, color)

    What is the equivalent of following relational algebra query in SQL query.

    πsname((σcolor= ‘red’Boats) Reserves Sailors)  

  • Question 9
    1 / -0

    Consider the following relations:

    course:

    course_idtitledeptnamecredits
    E-101Digital logicElectrical3
    E-102Analog electronicsElectrical4
    CS-101AlgorithmsComputer Science4
    CS-102Data structureComputer Science2
    M-101Strength of materialsMechanical3
    CS-103Theory of computationComputer Science3
    F-101Financial managementFinance3
    M-102TurbomachinesMechanical4

     

    teaches:

    IDcourse_idsec_idsemesteryear
    101CS-1011Even2009
    102CS-1021Even2008
    103CS-1012Odd2010
    104E-1011Odd2012
    105CS-1031Even2011
    106M-1011Odd2014
    107E-1022Odd2011

     

    instructor:

    IDnamedeptnamesalary
    101PriyaComputerScience20000
    102ShikhaComputerScience30000
    103AnjaliComputerScience14000
    104RamElectrical24000
    105KritiComputer Science15000
    106ShamMechanical16000

     

    What is the number of tuples returned when the following query is executed:

    \(Π_{name,title} (σ_{deptname="Computer Science"}(instructor⋈teaches⋈course)) \)

     

  • Question 10
    1 / -0

    Consider a database that has the relation schema CR(StudentName. CourseName). An instance of the schema CR is as given below.

    Employee_Record

    Employee_Name

    Department_Name

    EA

    DA

    EA

    DB

    EA

    DC

    EADD

    EB

    DB

    EB

    DC

    EBDA

    EC

    DA

    EC

    DB

    EC

    DC

    EBDD

    ED

    DA

    ED

    DB

    ED

    DC

    ED

    DD

    ECDD

    EE

    DD

    EE

    DA

    EE

    DC

    EF

    DA

    EEDB

    EF

    DC

     

    The following query is made on the above instance in Database

    TEMP ← ΠDepartment_NameEmployee_Name = ''ED" (Employee_Record))

    RESULT ← Employee_Record ÷ TEMP
    The number of rows in RESULT is _______. 

Submit Test
Self Studies
User
Question Analysis
  • Answered - 0

  • Unanswered - 10

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Submit Test
Selfstudy
Selfstudy
Self Studies Get latest Exam Updates
& Study Material Alerts!
No, Thanks
Self Studies
Click on Allow to receive notifications
Allow Notification
Self Studies
Self Studies Self Studies
To enable notifications follow this 2 steps:
  • First Click on Secure Icon Self Studies
  • Second click on the toggle icon
Allow Notification
Get latest Exam Updates & FREE Study Material Alerts!
Self Studies ×
Open Now