Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

DBMS → Database Security 3

The tuples of the relations can be of ________ order.
Any
click to copy
Choose the correct command to delete an attribute A from a relation R
alter table R drop A
click to copy
The UPDATE SQL clause can _____________
update more than one row at a time
click to copy

DBMS → PL/SQL 3

Choose the correct statement regarding superkeys
A superkey is an attribute or a group of multiple attributes that can uniquely identify a tuple
click to copy
create table apartment(ownerID varchar (5), ownername varchar(25), floor numeric(4,0),<br>primary key (ownerID:));<br>Choose the correct option regarding the above statement
It creates a relation with three attributes ownerID, ownername, floor in which ownerID cannot be null.
click to copy
The UNION SQL clause can be used with _____________
SELECT clause only
click to copy

DBMS → Introduction to DBMS 3

What is an Instance of a Database?
The state of the database system at any given point of time
click to copy
What does the notnull integrity constraint do?
It ensures that all tuples have a finite value on a specified attribute
click to copy
Which SQL statement is used to return only different values?
SELECT DISTINCT
click to copy

DBMS → Database Architecture 3

What is a foreign key?
A foreign key is an attribute of a relation that is a primary key of another relation
click to copy
Which SQL function is used to count the number of rows in a SQL query?
COUNT(*)
click to copy
Which SQL keyword is used to sort the result-set?
ORDER BY
click to copy

DBMS → Data Models 2

What action does ⋈ operator perform in relational algebra
Output specified attributes from all rows of the input relation and remove duplicate tuples from the output
click to copy
Which SQL keyword is used to retrieve a maximum value?
MAX
click to copy

DBMS → ER Model 2

What does the “x” operator do in relational algebra?
Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)
click to copy
Which of the following SQL clauses is used to DELETE tuples from a database table?
DELETE
click to copy

DBMS → Relational Model 2

An attribute is a __________ in a relation.
Column
click to copy
___________removes all rows from a table without logging the individual row deletions.
TRUNCATE
click to copy

DBMS → Normalization 2

What is the method of specifying a primary key in a schema description?
By underlining it using a bold line
click to copy
Which of the following is not a DDL command?
UPDATE
click to copy

DBMS → Functional Dependency 2

Statement 1: A tuple is a row in a relation Statement 2: Existence of multiple foreign keys in a same relation is possible
Both the statements are true
click to copy
Which of the following are TCL commands?
ROLLBACK and SAVEPOINT
click to copy

DBMS → SQL Basics 2

Choose the option that correctly explains in words, the function of the following relational algebra expression σyear≥2009 (book ⋈ borrow)
Selects all the tuples from the natural join of book and borrow wherever the year is lesser than 2009
click to copy
________________ is not a category of SQL command.
SCL
click to copy

DBMS → DDL Commands 2

State true or false: If a relation consists of a foreign key, then it is called a referenced relation of the foreign key dependency.
FALSE
click to copy
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default ______________
ASC
click to copy

DBMS → DML Commands 2

Which of the following information does an SQL DDL not specify?
The operations on the tuples
click to copy
Which of the following statement is true?
DELETE does not free the space containing the table and TRUNCATE free the space containing the table
click to copy

DBMS → Joins 2

Which of the following data types does the SQL standard not support?
String(n)
click to copy
What is the purpose of the SQL AS clause?
The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column
click to copy

DBMS → Views 2

Which command is used to create a new relation in SQL
create table( , …)
click to copy
What does DML stand for?
Data Manipulation language
click to copy

DBMS → Indexes 2

If a1, a2, a3 are attributes in a relation and S is another relation, which of the following is an incorrect specification of an integrity constraint?
foreign key(a1, a2)
click to copy
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?
SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
click to copy

DBMS → Transactions 2

What is the syntax to load data into the database? (Consider D as the database and a, b, c as datA:)
insert into D values (a, b, C:);
click to copy
With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?
SELECT * FROM Persons ORDER BY FirstName DESC
click to copy

DBMS → Concurrency Control 2

Which of the following commands do we use to delete a relation (R) from a database?
drop table R
click to copy
With SQL, how can you return the number of not null records in the “Persons” table?
SELECT COUNT(*) FROM Persons
click to copy

DBMS → Deadlock 2

Which of the following commands do we use to delete all the tuples from a relation (R)?
delete from R
click to copy
What does the ALTER TABLE clause do?
The SQL ALTER TABLE clause modifies a table definition by altering, adding, or deleting table columns and/or constraints
click to copy