Computer Knowledge
Database and SQL
4,213 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
-
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.
-
usermod -u 555 ABC
-
usermod -u ABC 555
-
usermod 555 ABC
-
usermod ABC -u 555
-
useradd-u 555 jim
A
Correct answer
Explanation
Each Linux user has a unique identification number known as User ID(UID) which is assigned automatically. To change its value, the command 'usermod -u UID username' can be used.
-
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.
-
Sub schema
-
Schema
-
View
-
Table
-
Trigger
A
Correct answer
Explanation
The external view is defined by sub schema.
-
view
-
cursor
-
transaction
-
trigger
-
database
D
Correct answer
Explanation
It is the store procedure that is fired automatically.
-
JOIN
-
Projection
-
Selection
-
Difference
-
Intersection
C
Correct answer
Explanation
This is an operation that selects only some of the tuples in the relation.