Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
5.5k views
in General by (29.8k points)

A School in Delhi uses database management system to store student details. The school maintains a database 'school_record' under which there are two tables. 

Student Table : Maintains general details about every student enrolled in school. 

StuLibrary Table : To store details of issued books. BookID is the unique identification number issued to each book. Minimum issue duration of a book is one Day.

                           Student
Field Type
StuID numeric
StuName Varchar[20]
StuAddress Varchar[50]
StuFatherName Varchar[20]
StuContact numeric
StuAadhar numeric
StuClass Varchar[5]
StuSection Varchar[1]
                 StuLibary
Field Type
BookID numeric
StuID numeric
Issued_date Date
Return_date Date

i. Identify the SQL Query which displays the data of StuLibrary table in ascending order of StudentID. 

(i) Select * from StuLibrary Order By BookID 

(ii) Select * from StuLibrary Order By StuID \

(iii) Select * from StuLibrary Order By StuID ASC 

(iv) Select * from StuLibrary Order By StuID DESC 

Choose the correct option: 

a. Both Query i) and iv) will display the desired data. 

b. Both Query i) and ii) will display the desired data. 

c. Both Query iii) and iv) will display the desired data. 

d. Both Query ii) and iii) will display the desired data. 

ii. The Primary Key for StuLibrary Table is/are ……. 

a. BookID 

b. BookID,StuID 

c. BookID,Issued_date 

d. Issued_date 

iii. Which of the following SQL Query will fetch ID of those issued books which have not been returned? 

a. SELECT BookID from StuLibrary where BookID is NULL;

b. SELECT BookID from StuLibrary where StuID is NULL; 

c. SELECT BookID from StuLibrary where Issued_date is NULL; 

d. SELECT BookID from StuLibrary where Return_date is NULL; 

iv. The Alternate Key for Student Table will be ………. 

a. StuName 

b. StuContact 

c. StuAadhar 

d. StuClass 

v. Which of the following SQL Query will display dates on which number ofissued books is greater than 5? 

a. SELECT Issued_date from StuLibrary GROUP BY Issued_datewhere COUNT(*)>5; 

b. SELECT Issued_date from StuLibrary GROUP BY Return_datehaving count(*)>5 

c. SELECT Issued_date from StuLibrary GROUP BY Issued_datehaving count(*)>5 

d. SELECT Issued_date from StuLibrary GROUP BY Return_datewhere COUNT(*)>5

Please log in or register to answer this question.

1 Answer

+1 vote
by (29.6k points)

I. d) Both Query ii) and iii) will display the desired data. 

II. c) BookID,Issued_date 

III. d) SELECT BookID from StuLibrary where Return_date is NULL; 

IV. c) StuAadhar 

V. c) SELECT Issued_date from StuLibrary GROUP BY Issued_datehaving count(*)>5

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...