Question bank

Filter questions by subject, topic and difficulty. Open any question to answer it and see the explanation.

Clear
255 questions found · practise this subject as a set Show 20 · 50 per page
#QuestionSubject and topicDifficulty
1 In which situation does the problem of data inconsistency arise? Computer Science/Informatics Practices
Database and file systems
Easy
2 What is a database schema? Computer Science/Informatics Practices
Database and file systems
Easy
3 A school stores a student's phone number in the fee file, library file and transport file. Which limitation o… Computer Science/Informatics Practices
Database and file systems
Medium
4 In a file system, adding a new field to a file forces changes in every program that reads it. This limitation… Computer Science/Informatics Practices
Database and file systems
Medium
5 Which statement about a DBMS is correct? Computer Science/Informatics Practices
Database and file systems
Hard
6 A relation STUDENT has 5 attributes and 32 tuples. What is its degree? Computer Science/Informatics Practices
Relational data model
Easy
7 In the relational model, a single row of a relation is called a Computer Science/Informatics Practices
Relational data model
Easy
8 The set of all permissible values that an attribute can take is called its Computer Science/Informatics Practices
Relational data model
Medium
9 A table has degree 4 and cardinality 10. Three new rows are inserted and one column is dropped. What are the … Computer Science/Informatics Practices
Relational data model
Medium
10 Which of the following is NOT a property of a relation in the relational model? Computer Science/Informatics Practices
Relational data model
Hard
11 A relation has three candidate keys. How many alternate keys does it have once a primary key is chosen? Computer Science/Informatics Practices
Keys
Easy
12 Which constraint must a primary key always satisfy? Computer Science/Informatics Practices
Keys
Easy
13 In tables EMP(EmpNo, Name, DeptNo) and DEPT(DeptNo, DName), DeptNo in EMP is best described as Computer Science/Informatics Practices
Keys
Medium
14 In a SECTION table, RollNo repeats across classes, but each combination of Class and RollNo is unique. What i… Computer Science/Informatics Practices
Keys
Medium
15 A row is inserted into ORDERS with CustID = 'C9', but no customer with ID 'C9' exists in CUSTOMER, where Cust… Computer Science/Informatics Practices
Keys
Hard
16 Which relational algebra operation extracts only certain columns of a relation? Computer Science/Informatics Practices
Relational algebra
Easy
17 Relation R has degree 3 and cardinality 4; relation S has degree 2 and cardinality 5. What are the degree and… Computer Science/Informatics Practices
Relational algebra
Easy
18 A has 6 tuples and B has 4 tuples; 3 tuples are common and both are union compatible. How many tuples are in … Computer Science/Informatics Practices
Relational algebra
Medium
19 For union compatible relations A and B, what does A − B return? Computer Science/Informatics Practices
Relational algebra
Medium
20 Which statement about union compatibility is correct? Computer Science/Informatics Practices
Relational algebra
Hard
21 Which of these is a DDL command? Computer Science/Informatics Practices
SQL and MySQL basics
Easy
22 Which constraint supplies a value for a column automatically when none is given during INSERT? Computer Science/Informatics Practices
SQL and MySQL basics
Easy
23 A column is declared CHAR(10) and the value 'RAVI' is stored. How many characters of storage does the value o… Computer Science/Informatics Practices
SQL and MySQL basics
Medium
24 Why is SQL described as a non-procedural language? Computer Science/Informatics Practices
SQL and MySQL basics
Medium
25 A column Email has a UNIQUE constraint but no NOT NULL constraint. Which statement is correct? Computer Science/Informatics Practices
SQL and MySQL basics
Hard
26 Which command removes a table along with its structure from the database? Computer Science/Informatics Practices
DDL commands
Easy
27 Which statement adds a column Fees of type FLOAT to the table Student? Computer Science/Informatics Practices
DDL commands
Easy
28 The Name column of Student is VARCHAR(20) and must be increased to VARCHAR(50). Which clause of ALTER TABLE i… Computer Science/Informatics Practices
DDL commands
Medium
29 After ALTER TABLE Student ADD City VARCHAR(20); is run on a table that already has 8 rows, what value does Ci… Computer Science/Informatics Practices
DDL commands
Medium
30 A student runs DELETE FROM Marks; and then DESCRIBE Marks;. What is the result? Computer Science/Informatics Practices
DDL commands
Hard
31 Which query lists names of students whose names start with the letter S? Computer Science/Informatics Practices
DML and queries
Easy
32 Which clause is used to show only one copy of each repeated city? Computer Science/Informatics Practices
DML and queries
Easy
33 Marks values in a table are 40, 50, 65, 80 and 90. How many rows does WHERE Marks BETWEEN 50 AND 80 return? Computer Science/Informatics Practices
DML and queries
Medium
34 Which condition correctly finds students whose phone number has not been entered? Computer Science/Informatics Practices
DML and queries
Medium
35 Table Emp has 10 rows, 4 of which have Dept = 'HR'. A user meant to run UPDATE Emp SET Bonus = 500 WHERE Dept… Computer Science/Informatics Practices
DML and queries
Hard
36 What does SELECT MOD(29, 6); return? Computer Science/Informatics Practices
Math and text functions
Easy
37 What is the output of SELECT LEFT('NETWORK', 3);? Computer Science/Informatics Practices
Math and text functions
Easy
38 What does SELECT SUBSTRING('INFORMATICS', 3, 4); return? Computer Science/Informatics Practices
Math and text functions
Medium
39 What does SELECT ROUND(3478.56, -2); return? Computer Science/Informatics Practices
Math and text functions
Medium
40 What is the output of SELECT INSTR('MISSISSIPPI', 'SS') + LENGTH(TRIM(' AB '));? Computer Science/Informatics Practices
Math and text functions
Hard
41 What does SELECT MONTH('2023-11-05'); return? Computer Science/Informatics Practices
Date functions
Easy
42 Which function returns the name of the weekday for a given date? Computer Science/Informatics Practices
Date functions
Easy
43 What is returned by SELECT DATE('2022-07-19 16:45:10');? Computer Science/Informatics Practices
Date functions
Medium
44 Which query lists employees who joined in the month of March of any year, from table Emp with column DOJ? Computer Science/Informatics Practices
Date functions
Medium
45 What is the output of SELECT DAY('2024-02-29') + MONTH('2024-02-29');? Computer Science/Informatics Practices
Date functions
Hard
46 Which function counts all rows of a table, including rows with NULL values? Computer Science/Informatics Practices
Aggregate functions and grouping
Easy
47 Which clause is used to apply a condition on groups formed by GROUP BY? Computer Science/Informatics Practices
Aggregate functions and grouping
Easy
48 Column Bonus has the values 100, NULL, 300 and NULL. What does SELECT AVG(Bonus) return? Computer Science/Informatics Practices
Aggregate functions and grouping
Medium
49 Table Emp has Dept values A, B, A, C, B, A. How many rows does SELECT Dept, COUNT(*) FROM Emp GROUP BY Dept H… Computer Science/Informatics Practices
Aggregate functions and grouping
Medium
50 Which query is valid in SQL for finding departments whose total salary exceeds 50000, considering only employ… Computer Science/Informatics Practices
Aggregate functions and grouping
Hard