Consider the following relations:
SELECT S. Student_Name, sum(P.Marks) FROM Student S, Performance P WHERE S.Roll_No = P.Roll_No GROUP BY S.Student_Name
The number of rows that will be returned by the SQL query is
The following are the properties of a database:
Which normal form is the database in?
Which of the following statements about specialization is true?
Which symbol is used to represent the supporting many-one relationships of a weak entity set in an entity-relationship diagram?
Consider a database that has the relation schema EMP (EmpId, EmpName, and DeptName). An instance of the schema EMP and a SQL query on it are given below.
SELECT AVG(EC, Num) FROM EC WHERE (DeptName, Num) IN (SELECT DeptName, COUNT(EmpId) AS EC(DeptName, Num) FROM EMP GROUP BY DeptName)
The output of executing the SQL query is (no leading zeros after the decimal will be in the answer)
Consider a relational database containing the following schemas.
The primary key of each table is indicated by underlining the constituent fields.
SELECT s.sno, s.sname FROM Suppliers s, Catalogue c WHERE s.sno=c.sno AND cost > (SELECT AVG (cost) FROM Catalogue WHERE pno = ‘P4’ GROUP BY pno) ;
The number of rows returned by the above SQL query is
Consider the following two statements about database transaction schedules:
Which of the above statements is/are TRUE?
In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in R and that the cardinality of E1 is greater that the cardinality of E2. Which one of the following is true about R?
Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following statements is TRUE?
A data file consisting of 1,50,000 student-records is stored on a hard disk with block size of 4096 bytes. The data file is sorted on the primary key RollNo. The size of a record pointer for this disk is 7 bytes. Each student-record has a candidate key attribute called ANum of size 12 bytes. Suppose an index file with records consisting of two fields, ANum value and the record pointer the corresponding student record, is built and stored on the same disk. Assume that the records of data file and index file are not split across disk blocks. The number of blocks in the index file is