Consider the following relational schema:
Which of the following options is/are correct SQL query/queries to retrieve the names of the students enrolled in course number (i.e., courseno) 1470?
EXISTS
, which efficiently verifies if a student is enrolled. This is correct because the EXISTS
clause checks for the existence of records that match the condition, in this case, enrollment in course 1470.SIZEOF
, which is not a valid SQL function. This is incorrect because SIZEOF
is not recognized in SQL; the correct function would be something like COUNT(*)
or using EXISTS
for verifying record existence.COUNT(*)
, which returns a positive value when a student is enrolled. Since it checks for a positive count of records, it is correct. This approach counts the number of rows where the student is enrolled in course 1470, and if the count is greater than zero, it confirms enrollment.NATURAL JOIN
between Students
and Enrolled
, which implicitly joins on rollno
and filters by courseno = 1470
. This is also correct because a NATURAL JOIN
automatically matches columns with the same name, and the query will filter students who are enrolled in the specified course.Each of these options uses a different SQL approach to achieve the same result, but only Options (A), (C), and (D) are correct, while Option (B) is incorrect due to the use of an invalid function.
According to the map shown in the figure, which one of the following statements is correct?
Note: The figure shown is representative.
In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and the line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?
Note: The figure shown is representative
A disk of size 512M bytes is divided into blocks of 64K bytes. A file is stored in the disk using linked allocation. In linked allocation, each data block reserves 4 bytes to store the pointer to the next data block. The link part of the last data block contains a NULL pointer (also of 4 bytes). Suppose a file of 1M bytes needs to be stored in the disk. Assume, 1K = \(2^{10}\) and 1M = \(2^{20}\). The amount of space in bytes that will be wasted due to internal fragmentation is ___________. (Answer in integer)