Homechevron_rightEngineeringchevron_rightRPSC Programmerchevron_rightProgrammer DBMSchevron_right<p class="MsoNormal" style="margin left:0in;text ind...

...

  • Q.

    Consider a relational database containing the following schemes.

    Catalogue

    sno

    pno

    Cost

    S1

    P1

    150

    S1

    P2

    50

    S1

    P3

    100

    S2

    P4

    200

    S2

    P5

    250

    S3

    P1

    250

    S3

    P2

    150

    S3

    P5

    300

    S3

    P4

    250

     

    Suppliers

    sno

    sname

    location

    S1

    M/s Royal furniture

    Delhi

    S2

    M/s Balaji furniture

    Bangalore

    S3

    M/s Premium furniture

    Chennai

     

    Parts

    pno

    Pname

    Part_spec

    P1

    Table

    Wood

    P2

    Chair

    Wood

    P3

    Table

    Steel

    P4

    Almirah

    • filter_dramaExplanation
      Answer is : A

      Inner Query: SELECT AVG (cost) FROM Cataloque WHERE pno = ‘P4’ GROUP BY pno

      The execution of the inner query gives the average of the cost of parts with part-id P4

      Output:

      Avg (cost)

      225

       

      Outer Query:

      SELECT s.sno, s.sname FROM Suppliers s, Cataloque c WHERE s.sno = c.sno AND Cost > (225)

      The execution of the entire query output the following table:

      sno

      sname

      S2

      M/s Balaji furniture

      S3

      M/s Premium furniture

      S3

      M/s Premium furniture

      S3

      M/s Premium furniture

       

      Hence, there are 4 rows in the resultant table. 

    Discussion

      No one started the discussion yet. Break the ice and start the conversation.
      Please Login to be part of the discussion.

    Similar Questions

    • 1. Which is the most reliable topology
    • filter_dramaExplanation
      Answer is : C

      the correct answer is option 3

      CONCEPT:

      Mesh topology:

      A mesh topology provides a connection from each node to every other node on the network. This provides a fully redundant network and it is the most reliable of all networks. If any link or node in the network fails, then there will be another path that will allow network traffic to continue.

      What is Mesh Topology?

      Additional Information

      Ring topology:

      A ring topology is a in which each node connects to exactly two other nodes, forming a single continuous pathway for signals through each node that makes a ring. Data travels from node to node, with each node along the way handling every packet.

      Star topology:

      A star topology is a topology for a Local Area Network(LAN) in which all nodes are individually connected to a central connection point, like a hub or a switch. A star takes more cable than bus topology, but the benefit is that if a cable fails, only one node will be brought down.

      Bus topology:

      A bus topology is a topology for a LAN in which all the nodes are connected to a single cable. The cable to which the nodes connected is called a backbone. if the backbone is broken, the entire segment fails. Bus topology is easy to install and doesn't require much cabling compared to the alternatives.

    • 2. A satellite link with bandwidth 20 kbps has a propagation time of 300 ms. The transmitter employs Go-back-3 ARQ scheme and each frame is assumed to be of 500 bytes. What is the possible throughput?
    • filter_dramaExplanation
      Answer is : C

      The answer to the question is 15 Kbps

      • It uses the sliding window protocol for the transmission of data. 
      • The question takes into consideration the variant of sliding window protocol namely GO BACK N ARQ. In this protocol, the sender can have up to N packets unacknowledged that are still remaining in the pipeline.
      • The receiver only sends cumulative acknowledgments. In case of encountering an error, the sender has to resend all the data frames following the error.
         

      According to the question:

      • The data rate of the link is 20 Kbps and the propagation delay = 300 ms

      So, the time required to transmit 500 bytes long data will be given by

      • Transmission Time \( t = {Number \,of \,bits \,to\, be\, transmitted \over data\, rate\, of\, the\, link }\)

                                                   = \((500~* ~8 ~bits) \over 20 Kbps\) =  200 ms

      • Now, the propagation delay is given as d = 300 ms

      So the efficiency of the link is given by:

      Efficiency

      Where N = window size

      • \(E = {3 ~* ~200ms \over (200~ms~+~2~*~300ms)}\) = 0.75

      So, the maximum data rate attainable = 0.75 * 20 Kbps = 15 Kbps
      So, the answer will be 15Kbps.

    • 3. Relational Algebra is a ________ language.
    • filter_dramaExplanation
      Answer is : B

      The correct answer is option 2.

      Concept:

      Relational algebra is a procedural query language, which takes instances of relations as input and yields instances of relations as output.

      It uses operators to perform queries. An operator can be either unary or binary. They accept relations as their input and yield relations as their output. Relational algebra is performed recursively on relation and intermediate results are also considered relations.

      The fundamental operations of relational algebra are as follows:

      • Select (σ)
      • Project (∏)
      • Union (∪)
      • Set different (−)
      • Cartesian product (Χ)
      • Rename (ρ)

      Hence the correct answer is procedural.

    • 4. In which of the topology, each device has a dedicated point-to-point link to a central controller?
    • filter_dramaExplanation
      Answer is : D

      Concept:

      A multipoint connection is one in which more than two specific devices share a single link

      A point-to-point connection provides a dedicated link between two devices

      In mesh, star and ring topologies are point-to-point connection

      Mesh topology

      In a mesh topology, every device has a dedicated point-to-point link to every other device

      Bus Topology

      In Bus Topology, one long cable acts as a backbone to link all the devices in a network

      Ring topology

      In a ring topology, each device has a dedicated point-to-point connection with only the two devices on either side of it; Each device is connected to its corresponding repeater

      Star topology

      In a star topology, each device needs only one link and one I/O port to connect it to any number of other devices

      Each device has a dedicated point-to-point link to a central controller known as a hub or switch

      Therefore star topology is the correct answer

    • 5.

      Consider the relation Emp-Dept with SSn as key

      Ename

      SSn

      EAddr

      Dept.

      No

      Dept.

      Name

      Dept.

      Manager

      SSn

       

      Which of the following is (are) invalid operation(s)?

      a) Inserting an employee without name and address

      b) Inserting an employee with only SSn

      c) Inserting a department with no employee

      d) Inserting an employee without SSn

    • filter_dramaExplanation
      Answer is : B

      Concept:

      • Here employee and department both table are merged into one table so right most SSn id is foreign key and second entry from left side is key of employee table.


      Statement a:

       Inserting an employee without name and address, is a valid statement because only SSn which is key should not be NULL other entries can be NULL.

      Statement b:

      Inserting an employee with only SSn, is a valid statement because only SSn which is key should not be NULL and here SSn is not NULL so valid statement

      Statement c:

      Inserting a department with no employee is a valid statement because foreign key can have NULL value.

      Statement d:

      Inserting an employee without SSn is not a valid statement because SSn employee id cannot be NULL

      So option 2 is the correct answer.

    Programmer DBMSTopics

    leaderboardLeaderboard
    • Rahul Kumar

      191 Points

    • VIKRAM JEET

      54 Points

    • GEETHIKA CHOWDARY

      53 Points

    • sunita saini

      52 Points

    • Zain

      49 Points