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. Key to represent the relationship between tables is called
    • filter_dramaExplanation
      Answer is : C

      The correct answer is option 3.

      Concept:

      Foreign Key is to represent the relationship between tables.

      Foreign Key:

      A column or set of columns in a relational database table known as a foreign key serves as a connection between the data in two different databases. It refers to the primary key of another table, creating a link between the two tables and serving as a cross-reference between them.

      Primary key :

      A primary key is a column in a table that is used as a unique identifier for each row. It functions a bit like the row’s address and is used for the table’s primary index.

      • The primary key cannot be null on the other hand foreign key can be null.
      • The primary key is always unique while the foreign key can be duplicated.
      • A table's primary key uniquely identifies a record, but a foreign key is a field that serves as the main key in another table.

      Hence the correct answer is Foreign Key.

    • 2. ______method is used to smoothing data or to handle noisy data.
    • filter_dramaExplanation
      Answer is : C

      The correct answer is binning.


      • Data binning is the process of grouping individual data values into specific bins or groups according to defined criteria.
      • Data binning is a data pre-processing technique used to reduce the effects of minor observation errors.
      • Binning method is used to smoothing data or to handle noisy data.
      • In this method, the data is first sorted and then the sorted values are distributed into a number of buckets or bins. As binning methods consult the neighborhood of values, they perform local smoothing.


      • Grouped data are data formed by aggregating individual observations of a variable into groups so that a frequency distribution of these groups serves as a convenient means of summarizing or analyzing the data
      • Data isolation is a property that determines when and how changes made by one operation become visible to other concurrent users and systems. This issue occurs in a concurrency situation.
    • 3.

      In one of the pairs of protocols given below, both the protocols can use multiple TCP connections between the same client and the server. Which one is that? 

    • filter_dramaExplanation
      Answer is : A

      HTTP: Multiple TCP connections can be used at client and server end.

      FTP: For FTP also multiple connections can be used at the same time.

      TELENT: Only one TCP connection is allowed at a time.

      SMTP: SMTP also allows only one TCP connection at a time.

    • 4. Point out the correct statement. ?
    • filter_dramaExplanation
      Answer is : D

      The correct option is (4)

      Explanation:- 

      • Documents can contain many different key-value pairs, or key-array pairs, or even nested documents, because of these advantages, document databases are general-purpose databases that can be used in a variety of use cases and industries.
      • When compared to relational databases, NoSQL databases are more scalable and provide superior performance. Most SQL databases are vertically scalable, Which means that you can increase the load on a single server by increasing components like RAM, SSD, or CPU.
      • NoSQL databases are horizontally scalable, which means that they can handle increased traffic simply by adding more servers to the database.
      • MongoDB has official drivers for a variety of popular programming languages and development environments. Language supported by MongoDB: js, Perl, PHP, Python, Ruby, Scala, Go, and Erlang.
      • MongoDB is written in C++, JavaScript, Python programming languages.
    • 5. An IP packet has arrived with the first 8 bits as 0100 0010. Which of the following is correct?
    • filter_dramaExplanation
      Answer is : B

      The correct answer is option 2.

      Concept:

      Minimum header size of IPv4 = 20-byte

      The maximum header size of IPv4 = 60 bytes

      The header length field in the IPv4 header is 4 bits.

      Maximum possible value (1111) = 15.

      Explanation:

      The given data,  the first 8 bits is 0100 0010,
      The First 4 bits represent version IPV4 (0100).
      And another 4 bits represent header length ( bits decimal value x 4) which should range between 20 to 60 bytes. This means that these 4 bits must represent the decimal number between 5 and 15. 

      Which is 2 × 4 = 8 bytes which is not possible since the minimum header length for IPv4 is 20 bytes. 

      Here (0010=2)

      Here are the last bits of decimal value=2.
      Hence Receiver will reject the packet.

      Hence the correct answer is The receiver rejects the packet.

    Programmer DBMSTopics

    leaderboardLeaderboard
    • Rahul Kumar

      191 Points

    • VIKRAM JEET

      54 Points

    • GEETHIKA CHOWDARY

      53 Points

    • sunita saini

      52 Points

    • Zain

      49 Points