Computer Knowledge
Database and SQL
3,929 Questions
Master structured query language commands, database joins, table constraints, and alias generation. This section covers relational database management concepts and query outputs essential for technical aptitude. These technical questions feature prominently in banking IT officer exams and computer knowledge sections.
SQL queries and aliasesDatabase table constraintsDatabase joins and transformationsStored procedures and functions
Database and SQL Questions
-
First Normal Form (1 NF).
-
Second Normal Form (2 NF).
-
Third Normal Form (3 NF).
-
All of the above.
-
Only (2) and (3).
E
Correct answer
Explanation
These are true statements.
-
A column indexing makes the fast access for selecting the data.
-
A column indexing makes the DML (Data Manipulation Language) operations slow down.
-
More than one indexes are possible in a particular table.
-
Indexers can be applied on a part of a column.
-
None of the above
E
Correct answer
Explanation
All of the above are the true statements.
-
It affects the database optimization.
-
Due to update anomaly, we need to update thousands of rows in the table.
-
It makes database inconsistent.
-
All of the above.
-
Only (2) and (3).
E
Correct answer
Explanation
These are the true statement about update anomaly.
-
Schema definition
-
Liaising with users
-
Defining security and integrity checks
-
Defining backup/Recovery procedures
-
Specifying primary key
E
Correct answer
Explanation
This is not the role of the DBA in DBMS as specification of primary key is done by the user.
-
UNION
-
INTERSECT
-
JOIN
-
PRODUCT
-
DIFFERENCE
C
Correct answer
Explanation
This operation in DBMS is used to retrieve combination of tuples in two relations based on a common field in both the relations.
-
Tuples are unordered
-
Attributes are unordered
-
Attribute values are atomic
-
Duplicate tuples
-
Presence of a primary key
D
Correct answer
Explanation
This is not the property of a relation in DBMS as duplicate tuples will lead to inconsistent data in a relation.
-
True
-
False
-
Can't say
-
Sometimes
-
None of these
B
Correct answer
Explanation
MS-Access allows objects (tables, queries, forms, reports, macros, and modules) to be renamed by right-clicking and selecting Rename, or by selecting and pressing F2. The statement is false because renaming is a standard feature available for all database objects in Access.
-
Select
-
Drop
-
Grant
-
Revoke
-
Update
B
Correct answer
Explanation
It is an SQL command of data definition language which deletes an entire table, a view of a table or other objects in the database.
-
User-defined integrity
-
Entity integrity
-
Domain integrity
-
Referential integrity
-
Unique integrity
D
Correct answer
Explanation
In referential integrity, rows cannot be deleted, which are used by other records.
-
Full join
-
Left join
-
Cartesian join
-
Inner join
-
Self join
D
Correct answer
Explanation
Inner join operation returns row when there is a match in both tables.
-
projection operation
-
join operation
-
rename operation
-
selection operation
-
delete operation
C
Correct answer
Explanation
‘AS’ clause is used in SQL for rename operation.
-
The data type char
-
The data type nvarchar
-
The data type varchar
-
The data type varbinary
-
The data type nchar
B
Correct answer
Explanation
The data type nvarchar has maximum length of 4000 characters with variable length unicode.
-
Exists operator
-
Unique operator
-
All operator
-
Any operator
-
In operator
A
Correct answer
Explanation
Exists operator is used to search the presence of a row in a specified table that meets certain criteria.
-
DDL only
-
DML only
-
DCL only
-
DDL, DML and DCL
D
Correct answer
Explanation
This is the right answer because SQL commands fall into three categories like DDL (Data Definition Language), DML (Date Manipulation Language) and DCL (Data Control Language). All these categories are a part of the SQL commands and SQL commands are also terminated by a semicolon (;) in Oracle. So, this is the right answer.
-
Authorise
-
Grant
-
Allow
-
Access
-
Permit
B
Correct answer
Explanation
Grant is used for authorisation.